Saving incoming mp4 stream (e.g. as YUV?)

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
tanir
New Cone
New Cone
Posts: 8
Joined: 28 Jun 2007 14:48

Saving incoming mp4 stream (e.g. as YUV?)

Postby tanir » 06 Jul 2007 14:16

Hi,

I am trying to save an incoming RTP mp4 stream into my hard drive. To do this, I use the following command line:

vlc -vvv udp:// :demux=dump :demuxdump-file="incoming.mp4" --drop-late-frames --file-logging --logfile="C:\mylog.txt" :udp-caching=3000

Problems:

1) I can not view this video at the same time. Normally, VLC allows you to view what you are saving in real-time. For example, I use the same command for 3gp streams and i am able to save and view at the same time.
2) If I save it using the above commandline, then the saved video freezes after a while. This is weird because it does not freeze when I am watching the same thing without saving using the command: vlc -vvv udp:// --drop-late-frames :udp-caching=3000. What is the difference?
3) Last but not the least, can i save any incoming rtp stream in uncompressed YUV or RGB format (as it is being decoded in real time)?

Thanks in advance.
Tanir

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby dionoea » 06 Jul 2007 15:58

you can try --sout "#std{mux=mp4,access=file,dst=file.mp4}" instead of demuxdump (that won't recode the video so you won't lose in terms of quality).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

tanir
New Cone
New Cone
Posts: 8
Joined: 28 Jun 2007 14:48

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby tanir » 10 Jul 2007 16:57

Thank you for the reply. In this case i get this error at the client side repeatedly:

[00000297] main stream output warning: trying to send non-dated packet to stream output!
[00000297] main stream output warning: trying to send non-dated packet to stream output!
[00000297] main stream output warning: trying to send non-dated packet to stream output!
....

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby dionoea » 10 Jul 2007 17:33

mux=ts should work.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Arateris
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2007 11:51

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby Arateris » 23 Aug 2007 16:48

Hy!

I'm having the same problem, trying to save into file an incoming h264/RTP stream (via SDP configuration)
I have the multiple errors : "trying to send non-dated packet to stream output!" (using VLC 0.8.6.c, windows XP)
whatever the mux output...

Did you manage to fix your problem ?

Arateris
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2007 11:51

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby Arateris » 27 Aug 2007 09:07

up!
hasn't anyone faced this problem before while streaming video??

thanks.

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 14 Nov 2007 18:06

I'm trying to save a live stream streamed by VLC with the rtp module so every elementary stream uses a different port.

VLC displays it correctly for example with the code 'vlc http://<someip>:8080/file.sdp' but when I try to store that stream into a file I only get the audio.

After much looking around, trying to get SDP information with RTSP or HTTP protocol doesn't change anything.

Just changed the above code line to 'vlc http://<someip>:8080/file.sdp --sout="#display" and only the audio plays, no video at all and many messages line saying: "main stream output warning: trying to send non-dated packet to stream output!". So I suposed that the video packet lost the date in the transition between the RTP access module and the "stream out".

I'm going to try two other things:
* video only streaming by RTP.
* audio/video muxed in TS with only one UDP port.

Tried in Windows and streaming with multicast address.

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 14 Nov 2007 18:47

* Streaming only raw video with RTP by an SDP anounce, same results. It plays perfect without sending the output to the steam output module, but when I pass the stream to sout (with anyting like --sout="#display" or to a file), no video, (no audio of course, not present in this stream) and the same errors:
main stream output warning: trying to send non-dated packet to stream output!

* Streaming UDP or RTP with MPEG-TS mux to a broadcast address I get the following error:
packetizer_h264 warning: waiting for SPS/PPS (no idea what this could mean)
I only get the sound and no video so I haven't tried to stream it to a file or --sout "#display"


Next try: Try to change the codec to MPEG4 SP/ASP

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 15 Nov 2007 14:06

Finally the problem was the handle of VLC of the H264 codec. Streaming files encoded with MPEG-4@SP there's no problem and I can save to a file the streaming. Either RTP with differents ports or a MPEG-TS over UDP or RTP.

I think its a VLC bug because it plays normally when you DON'T activate any stream out option, the network stream was played by VLC perfectly. But, when you try to activate any stream out module (even with the display module alone with --sout="#display"), there's problems with the H264 video.

I'm going to do better tests, but aparenly event if I open this file (mp4 H264 encoded video) locally and try to stream out to a file, it doesn't save video. (Tested on a MacOS X VLC 0.8.6c).

Tried VLC version 0.8.6c in Windows. Haven't tested trunk version (future 0.9.0) so don't know if its a fixed problem.

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 21 Nov 2007 18:36

I think, all is related to this:
https://trac.videolan.org/vlc/ticket/121

VLC have trouble making copies of H264 stream to process.

Just with --sout:#display you have errors.

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 18 Feb 2008 09:48

The above ticket is incorrect, but I don't remenber the good one.

Anyway, it's solved for the next release.

Tested with a windows build. Thanks j-b.

PhilipX
New Cone
New Cone
Posts: 2
Joined: 26 Feb 2008 19:39

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby PhilipX » 26 Feb 2008 19:48

Hi,

I also want to save an incoming h264 over RTP stream (if possible multiplexed with the audio which is send over another port but currently that is less important). Vice, I cheched your previous comments and as you mentioned changing to simple profile indeed makes --sout possible. Still, it would be much better for me if didn't had to change the profile settings! So if anyone knows how to solve this problem, please let me know!Ps, Vice, do you have the link to the correct ticket?? Thanx a lot!

Regards, Philip

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 26 Feb 2008 23:22

The problem have been fixed for the next release!!!
Just wait a few days for the final binaries of the bugfix version 0.8.6e.
I've tried a preliminary build that works fine.

check:
http://trac.videolan.org/vlc/browser/tags/0.8.6e/NEWS

Code: Select all

Stream output: * Fixed waiting for SPS/PPS problem in H.264 packetizer
Thanks to all the developpers of VLC media player.

Now I have some sync problems with RTP streams of audio from a hardware encoder with RTP payload type 8, 10 and 11. I just ear a few initials seconds. I'll post more details in another thread.

Can I ask you how you generate the RTP stream? From what device/software? I'm trying to complete a list of hardware MPEG4/H264 servers.

PhilipX
New Cone
New Cone
Posts: 2
Joined: 26 Feb 2008 19:39

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby PhilipX » 27 Feb 2008 11:30

Can I ask you how you generate the RTP stream? From what device/software? I'm trying to complete a list of hardware MPEG4/H264 servers.
For my current setup, I use VLC to generate the RTP streams. I first transcode the files with Digital Rapids AVC in order to have a good target bit rate and then I use VLC to stream. So I don't use VLC to do the h264-transcoding 'on-the-fly'. VLC does the job just great, however for another project, I use Helix Mobile Producer because of (as far as I know) VLC's lack of RTCP-support (server side).

vice
Blank Cone
Blank Cone
Posts: 61
Joined: 18 Oct 2007 13:43

Re: Saving incoming mp4 stream (e.g. as YUV?)

Postby vice » 29 Feb 2008 00:07

I'm not really sure if the H264 packetizer problem is solved.

Found a few diference between broadcast with VLC a H264 encoded file by RTP multicast and the same file served by VoD. (used TED Talks downladed files).

RTP multicast:

Code: Select all

new TEB broadcast enabled loop setup TEB input "C:\local\TED\ted_anderson_c_2002.mp4" setup TEB output #rtp{dst=224.1.1.1,sdp=sap,name=TEB}
With this latest version of VLC (the 0.8.6e) the image is shown but the video freezes for a few seconds regularly with PTS is out of range (this is the best case). Sometimes the VLC crashes trying to open the stream announced by SAP.

VoD:

Code: Select all

new TED vod enabled setup TED input "C:\local\TED\ted_anderson_c_2002.mp4"
A lot of messages "packetizer_h264 warning: waiting for SPS/PPS" and no image at all, only audio until I move the slider and the audio stops.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 16 guests