[FFmpeg-user] Problems saving rtsp stream directly as mpegts

Jonathan Viney jonathan.viney at gmail.com
Mon Nov 3 02:18:50 CET 2014


Hi,

I am try to capture an rtsp stream with h264 from an IP camera directly
into an mpegts file.

ffmpeg -i rtsp://10.9.9.3:554/axis-media/media.amp -c copy -f mpegts out.ts

This seems to work fine, but the output file is not recognised by
ffmpeg/ffprobe.

ffmpeg -i out.ts

[h264 @ 0x7fa96501d200] decode_slice_header error
[h264 @ 0x7fa96501d200] no frame!
[h264 @ 0x7fa96501d200] non-existing PPS 0 referenced
[mpegts @ 0x7fa964802a00] decoding for stream 0 failed
[mpegts @ 0x7fa964802a00] Could not find codec parameters for stream 0
(Video: h264 ([27][0][0][0] / 0x001B)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
out.ts: Operation not permitted

Any idea why this is?

If I do it in two steps, first saving the stream as a .mp4, it converts to
mpegts fine with:

ffmpeg -i out.mp4 -c copy -bsf h264_mp4toannexb out.ts

Is it possible to do this in one step without the intermediary file?

Thanks,
-Jonathan.


More information about the ffmpeg-user mailing list