I am trying to open the NASA HDTV video stream from ustream.tv directly in vlc
. The problem that I have is that it only works sometimes. The command I am using is below:
ffmpeg -i "rtmp://ustreamlivefs.fplive.net/ustream2live-live/stream_live_1_1_6540154 swfUrl=http://www.ustream.tv/flash/viewer.swf live=1" -c copy -bsf h264_mp4toannexb -y -f mpegts pipe: | vlc -
When this works, it works very well and for as long as I leave the stream running. Frequently, however, it results in failure at start-up and gives output like this:
[h264 @ 0x2273760] AVC: nal size 21135391
[h264 @ 0x2273760] no frame!
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument
[mpegts @ 0x227b360] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)
av_interleaved_write_frame(): Invalid argument
[0x7fb5140014e8] main stream error: cannot pre fill buffer
A bit of background on the command: the ultimate target is not vlc
but distribution via DLNA for viewing on a TV - hence the need to convert to the mpegts
container format. The DLNA transfer is being effected with mediatomb
. This configuration suffers the same intermittent failure problem as the above example.
I am using ffmpeg version 1.1.3 on Arch Linux 64-bit.
I have tried searching for answers to this but I have been unable to find anything useful - everything I've seen is similar but different. Can I modify the command to make it more reliable and, if so, how?