[FFmpeg-user] Problems dumping H264 stream from Axis camera
paulj at fastmail.es
paulj at fastmail.es
Thu Aug 23 14:50:48 CEST 2012
Hi all:
I'm trying to dump the H264 stream from an Axis M-1011 camera to disk. I used to
have a ffmpeg binary compiled from around a year ago, and this command line used to work:
ffmpeg -t 00:00:30 -f rtsp -i rtsp://root:root@192.168.1.129:554/axis-
media/media.amp?streamprofile=Quality?tcp -vcodec copy -acodec copy axis.mp4
However, yesterday I downloaded the newest git source and compiled it, and with the
new binary I get this error:
[paulo at webserver ~]$ ffmpeg -t 00:00:30 -rtsp_transport tcp -i
rtsp://root:root@192.168.1.129:554/axis-media/media.amp?streamprofile=Quality?tcp -
vcodec copy -acodec copy axis.mp4
ffmpeg version N-43821-gf92f493 Copyright (c) 2000-2012 the FFmpeg developers
built on Aug 23 2012 12:47:11 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-50)
configuration: --enable-encoder=libx264 --enable-libx264 --enable-runtime-cpudetect --
enable-libmp3lame --enable-gpl
libavutil 51. 70.100 / 51. 70.100
libavcodec 54. 54.100 / 54. 54.100
libavformat 54. 25.104 / 54. 25.104
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 13.100 / 3. 13.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[rtsp @ 0xa9445c0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://root:root@192.168.1.129:554/axis-
media/media.amp?streamprofile=Quality?tcp':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.099878, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuvj420p, 640x480 [SAR 1:1 DAR 4:3], 30 tbr, 90k
tbn, 180k tbc
-t is not an input option, keeping it for the next output; consider fixing your command line.
Output #0, mp4, to 'axis.mp4':
Metadata:
title : Media Presentation
encoder : Lavf54.25.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 640x480 [SAR 1:1 DAR 4:3],
q=2-31, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0xaa897a0] pts (0) < dts (1) in stream 0
av_interleaved_write_frame(): Invalid argument
After searching for a bit, I get that the "pts < dts" error happens with B-frames being
sent out of order (so to speak) in the H264 stream. What I don't understand is why it used to
work before, and it doesn't now.
I also found someone on the net who suggested using "-vcodec libx264" instead. This
way it works, but if I'm not mistaken, using this ffmpeg would be reencoding the video stream
coming from the camera, instead of just dumping it unmodified, and I'd rather not do that.
Thanks for any suggestions,
Paulo.
-------------------------------------------
"Oh, don't worry kids. Most of you will
never fall in love. You'll just marry
for fear of dying alone."
The Simpsons.
-------------------------------------------
More information about the ffmpeg-user
mailing list