Streaming RTSP-stream into file - no video data

About encoding, codec settings, muxers and filter usage
_eXile_
New Cone
New Cone
Posts: 4
Joined: 05 Sep 2007 12:40

Streaming RTSP-stream into file - no video data

Postby _eXile_ » 05 Sep 2007 13:54

Hi,

I try to stream a RTSP-stream into a file. However, when I play the created file, it has apparently no video data in it. As I am not that experienced with the vlc command line options, I tried to set the streaming options with the GUI:

I hit CTRL-N, checked the "RTSP" option and set the "URL" to "rtsp://c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4". Then I checked the "Stream/Save" option, an went into the "Settings..." dialoge.

In the settings-dialoge I checked "File" and set the "Filename" to "movie.mpeg". Under "Transcoding options" I checked "Video codec" and "Audio codec". All other settings were not changed. The resulting sout-MRL is:

Code: Select all

:sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=file,mux=ts,dst="movie.mpeg"}}
I hit "OK" twice and waited 10 seconds until the streaming started and waited until the streaming ended. Then I opened the created movie.mpeg file normally and I can see no video output. There are no video tracks available.

The output while streaming is:

Code: Select all

main debug: creating new input thread main debug: waiting for thread completion main debug: thread 3888 (input) created at priority 1 (input/input.c:265) main debug: stream=`transcode' main debug: looking for sout stream module: 1 candidate main debug: stream=`duplicate' main debug: looking for sout stream module: 1 candidate stream_out_duplicate debug: creating 'duplicate' stream_out_duplicate debug: * adding `std{access=file,mux=ts,dst=movie.mpeg}' main debug: stream=`std' main debug: looking for sout stream module: 1 candidate main debug: set sout option: sout-standard-access to file main debug: set sout option: sout-standard-mux to ts main debug: set sout option: sout-standard-dst to movie.mpeg stream_out_standard debug: creating `file/ts://movie.mpeg' stream_out_standard debug: extension is mpeg stream_out_standard debug: extension -> mux=ps stream_out_standard debug: using `file/ts://movie.mpeg' main debug: looking for sout access module: 1 candidate access_output_file debug: file access output opened (`movie.mpeg') main debug: using sout access module "access_output_file" stream_out_standard debug: access opened main debug: looking for sout mux module: 1 candidate mux_ts debug: shaping=200000 pcr=70000 dts_delay=400000 main debug: using sout mux module "mux_ts" main debug: muxer support adding stream at any time main debug: muxer prefers to wait for all ES before starting to mux stream_out_standard debug: mux opened main debug: using sout stream module "stream_out_standard" main debug: using sout stream module "stream_out_duplicate" main debug: set sout option: sout-transcode-vcodec to mp4v main debug: set sout option: sout-transcode-vb to 1024 main debug: set sout option: sout-transcode-scale to 1 main debug: set sout option: sout-transcode-acodec to mpga main debug: set sout option: sout-transcode-ab to 192 main debug: set sout option: sout-transcode-channels to 2 stream_out_transcode debug: codec audio=mpga 0Hz 2 channels 192Kb/s stream_out_transcode debug: codec video=mp4v 0x0 scaling: 1.000000 1024kb/s main debug: using sout stream module "stream_out_transcode" main debug: `rtsp://c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4' gives access `rtsp' demux `' path `c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4' main debug: creating demux: access='rtsp' demux='' path='c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4' main debug: looking for access_demux module: 1 candidate live555 debug: RTP subsession 'audio/MPEG4-GENERIC' live555 debug: RTP subsession 'video/H264' main debug: selecting program id=0 main debug: using access_demux module "live555" main debug: looking for packetizer module: 17 candidates packetizer_mpeg4audio debug: running MPEG4 audio packetizer packetizer_mpeg4audio debug: AAC 48000Hz 1024 samples/frame main debug: using packetizer module "packetizer_mpeg4audio" main debug: stream out mode -> no decoder thread main debug: looking for packetizer module: 17 candidates packetizer_h264 debug: found NAL_SPS main debug: using packetizer module "packetizer_h264" main debug: stream out mode -> no decoder thread main debug: starting in async mode main debug: `rtsp://c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4' successfully opened live555 warning: no data received in 10s. Switching to TCP live555 debug: RTP subsession 'audio/MPEG4-GENERIC' live555 debug: RTP subsession 'video/H264' packetizer_h264 debug: found NAL_PPS live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main debug: adding a new input stream_out_transcode debug: creating audio transcoding from fcc=`mp4a' to fcc=`mpga' main debug: looking for decoder module: 28 candidates main debug: using decoder module "faad" main debug: looking for encoder module: 10 candidates ffmpeg debug: libavcodec initialized (interface 3349504 ) ffmpeg debug: found encoder MPEG Audio layer 1/2 main debug: using encoder module "ffmpeg" main debug: looking for audio filter2 module: 5 candidates audio_format debug: fl32->s16l, bits per sample: 32 main debug: using audio filter2 module "audio_format" stream_out_duplicate debug: duplicated a new stream codec=mpga (es=0 group=0) main debug: adding a new input mux_ts debug: adding input codec=mpga pid=68 mux_ts debug: new PCR PID is 68 stream_out_duplicate debug: - added for output 0 faad warning: decoded zero sample main warning: clock gap, unexpected stream discontinuity live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main debug: adding a new input stream_out_transcode debug: creating video transcoding from fcc=`h264' to fcc=`mp4v' main debug: looking for decoder module: 28 candidates ffmpeg debug: libavcodec already initialized ffmpeg debug: postprocessing disabled ffmpeg debug: ffmpeg codec (h264) started main debug: using decoder module "ffmpeg" main debug: looking for encoder module: 10 candidates ffmpeg debug: libavcodec already initialized ffmpeg debug: found encoder MPEG-4 Video main debug: using encoder module "ffmpeg" main debug: removing module "ffmpeg" main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! [...] main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! main debug: control type=0 main debug: control: stopping input main debug: closing input main debug: removing module "live555" main debug: removing module "packetizer_mpeg4audio" main debug: killing decoder fourcc `mp4a', 0 PES in FIFO main debug: removing an input main debug: removing module "faad" main debug: removing module "ffmpeg" main debug: removing module "audio_format" mux_ts debug: removing input pid=68 mux_ts debug: new PCR PID is 8191 main warning: no more input streams for this mux main debug: removing module "packetizer_h264" main debug: killing decoder fourcc `h264', 0 PES in FIFO main debug: removing an input ffmpeg debug: ffmpeg codec (h264) stopped main debug: removing module "ffmpeg" main debug: destroying sout main debug: destroying chain... (name=transcode) main debug: destroying chain... (name=duplicate) stream_out_duplicate debug: closing a duplication main debug: destroying chain... (name=std) main debug: removing module "mux_ts" access_output_file debug: file access output closed main debug: removing module "access_output_file" main debug: removing module "stream_out_standard" main debug: destroying chain done main debug: removing module "stream_out_duplicate" main debug: destroying chain done main debug: removing module "stream_out_transcode" main debug: destroying chain done main debug: thread times: real 0m16.954379s, kernel 0m0.190273s, user 0m0.370532s main debug: thread 3888 joined (input/input.c:412)
And the output while playback is:

Code: Select all

main debug: creating new input thread main debug: waiting for thread completion main debug: thread 3960 (input) created at priority 1 (input/input.c:265) main debug: drive letter C: found in source main debug: `C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' gives access `' demux `' path `C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' main debug: creating demux: access='' demux='' path='C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' main debug: looking for access_demux module: 1 candidate dvdnav warning: cannot open dvdnav main debug: creating access '' path='C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' main debug: looking for access2 module: 5 candidates vcd debug: trying .cue file: C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.cue vcd debug: could not find .cue file access_file debug: opening file `C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' main debug: using access2 module "access_file" main debug: pre-buffering... main debug: received first data for our buffer main debug: creating demux: access='' demux='' path='C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' main debug: looking for demux2 module: 45 candidates main debug: using demux2 module "ts" main debug: looking for a subtitle file in C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\ ts debug: DEMUX_SET_GROUP 0 00000000 main debug: `C:\Dokumente und Einstellungen\User\Desktop\vlc-0.8.6c-win32\vlc-0.8.6c\movie.mpeg' successfully opened ts debug: PATCallBack called ts debug: new PAT ts_id=3093 version=26 current_next=1 ts debug: * number=1 pid=66 ts debug: PMTCallBack called ts debug: new PMT program number=1 version=4 pid_pcr=68 ts debug: * es pid=68 type=3 fcc=mpga main debug: selecting program id=1 main debug: looking for decoder module: 28 candidates main debug: using decoder module "mpeg_audio" main debug: thread 4552 (decoder) created at priority 2 (input/decoder.c:159) mpeg_audio debug: MPGA channels:2 samplerate:48000 bitrate:192 main debug: looking for audio output module: 3 candidates aout_directx debug: OpenAudio aout_directx debug: aout_directx debug: found device: Vinyl AC'97 Audio (WAVE) aout_directx debug: found device: Modem Nr. 0 Line-Out (emuliert) aout_directx debug: device supports 2 channels aout_directx debug: device supports 1 channel aout_directx debug: creating DirectSoundThread main debug: thread 4108 (DirectSound Notification Thread) created at priority 15 (directx.c:372) aout_directx debug: DirectSoundThread ready main debug: using audio output module "aout_directx" main debug: output 's16l' 48000 Hz Stereo frame=1 samples/4 bytes main debug: mixer 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes main debug: filter(s) 'fl32'->'s16l' 48000 Hz->48000 Hz Stereo->Stereo main debug: looking for audio filter module: 24 candidates main debug: using audio filter module "float32tos16" main debug: found a filter for the whole conversion main debug: looking for audio mixer module: 3 candidates main debug: using audio mixer module "trivial_mixer" main debug: input 'mpga' 48000 Hz Stereo frame=1152 samples/1161 bytes main debug: filter(s) 'mpga'->'fl32' 48000 Hz->48000 Hz Stereo->Stereo main debug: looking for audio filter module: 24 candidates main debug: using audio filter module "mpgatofixed32" main debug: found a filter for the whole conversion main debug: filter(s) 'fl32'->'fl32' 52800 Hz->48000 Hz Stereo->Stereo main debug: looking for audio filter module: 24 candidates main debug: using audio filter module "bandlimited_resampler" main debug: found a filter for the whole conversion ts debug: eof ? main debug: EOF reached main debug: waiting decoder fifos to empty main debug: waiting decoder fifos to empty main debug: closing input ts debug: pid list: ts debug: - pid[0] seen ts debug: - pid[66] seen main debug: removing module "mpeg_audio" main debug: thread times: real 0m6.289043s, kernel 0m0.050072s, user 0m0.020028s main debug: thread 4552 joined (input/decoder.c:191) main debug: killing decoder fourcc `mpga', 0 PES in FIFO main debug: removing module "mpgatofixed32" main debug: removing module "bandlimited_resampler" aout_directx debug: closing audio device aout_directx debug: DirectSoundThread exiting main debug: thread times: real 0m6.339115s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 4108 joined (directx.c:598) main debug: removing module "aout_directx" main debug: removing module "float32tos16" main debug: removing module "trivial_mixer" main debug: Program doesn't contain anymore ES ts debug: - pid[68] seen ts debug: - pid[8191] seen main debug: removing module "ts" main debug: removing module "access_file" main debug: thread times: real 0m6.519374s, kernel 0m0.020028s, user 0m0.000000s main debug: thread 3960 joined (input/input.c:412) main: nothing to play
I hope you can help me with getting the video data streamed into the file. :wink:

Regards,
eXile.

_eXile_
New Cone
New Cone
Posts: 4
Joined: 05 Sep 2007 12:40

Re: Streaming RTSP-stream into file - no video data

Postby _eXile_ » 05 Sep 2007 15:58

Hi,

Now I tried the command line and tried - according to the manual - these parameters:

Code: Select all

vlc -vvv rtsp://c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4 --sout file/ts:movie.mpeg
However, the file keeps being 0KB big, an vlc doesn't quit streaming! It simply stops one second before the end and doesn't close the stream. Can anyone else confirm this behavior with version 0.8.6c? Am I doing something wrong? The message log is still flooded with "main warning: trying to send non-dated packet to stream output!" ...

Edit:
After searching all day long, I've found a similar case at viewtopic.php?f=2&t=38877
I ask everybody who is ready is to test this with their vlc version, otherwise I will file a bug report :wink:

To test it simply run in your command line:

Code: Select all

vlc -vvv rtsp://c36000-o.m.core.cdn.streamfarm.net/36000zdf/ondemand/3546zdf/zdf/zdf/07/09/070905_toll_neu_f21_vh.mp4 --sout "#std{mux=ts,access=file,dst=movie.mpeg}"
An check the filesize of movie.mpeg.

Regards,
eXile.

_eXile_
New Cone
New Cone
Posts: 4
Joined: 05 Sep 2007 12:40

Re: Streaming RTSP-stream into file - no video data

Postby _eXile_ » 05 Sep 2007 19:44

Hi,

OK problem resolved - VLC just doesn't support it at the moment. When trying to stream it into a file as raw data, I get the warning:

Code: Select all

access_realrtsp warning: only real/helix rtsp servers supported for now
Which means, that ... um ... at least some time this problem will be fixed ;)

Regards,
eXile.

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

Re: Streaming RTSP-stream into file - no video data

Postby vice » 14 Nov 2007 18:09

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: Streaming RTSP-stream into file - no video data

Postby vice » 14 Nov 2007 18:49

* 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: Streaming RTSP-stream into file - no video data

Postby vice » 15 Nov 2007 14:05

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.

Martin Lindhe
New Cone
New Cone
Posts: 1
Joined: 19 Nov 2007 14:12

Re: Streaming RTSP-stream into file - no video data

Postby Martin Lindhe » 19 Nov 2007 14:15

Hello all. I am experiencing the same problem, with stream input as H264 i can play back the video locally but when i try to stream this out with vlc, i get the error "main stream output warning: trying to send non-dated packet to stream output!". I tried both with VLC 0.8.6c and current VLC-svn, same problem.

Is anyone aware of a fix/workaround to this problem?

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

Re: Streaming RTSP-stream into file - no video data

Postby Arateris » 20 Nov 2007 11:29

I don't know if this problem has been taken in account by the development team, and since my posts in the other topic, I didn't find a solution to this problem.
This is not really the good place to ask this, but is there a way to capture the video display? (with any soft), because when we try to capture directly, it give only a black square instead of the video. I know this problem for long and why, but I didn't find a solution to it.

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

Re: Streaming RTSP-stream into file - no video data

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: Streaming RTSP-stream into file - no video data

Postby vice » 18 Feb 2008 09:50

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.

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

Re: Streaming RTSP-stream into file - no video data

Postby vice » 26 Feb 2008 23:25

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.

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.

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

Re: Streaming RTSP-stream into file - no video data

Postby vice » 29 Feb 2008 00:02

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 “VLC stream-output (sout)”

Who is online

Users browsing this forum: Google [Bot] and 9 guests