[FFmpeg-user] Problems dumping H264 stream from Axis camera

paulj at fastmail.es paulj at fastmail.es
Mon Aug 27 11:43:21 CEST 2012


> On Thu, Aug 23, 2012 at 02:50:48PM +0200, paulj at fastmail.es wrote:
> > 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:
> > 
[snip]
> 
> whats the output with -fdebug ts -debug_ts
> ?
> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 

	Here it goes. Using the latest version:


[paulo at webserver ffmpeg]$ ./ffmpeg -fdebug ts -debug_ts -rtsp_transport tcp -i 
rtsp://root:root@192.168.1.129:554/axis-media/media.amp?streamprofile=Alta?tcp -vcodec 
copy -acodec copy -t 4 ../axis.mp4
ffmpeg version N-43928-g60924df Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 27 2012 11:36:04 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 --extra-cflags=-I/usr/local/include --extra-ldflags=-
L/usr/local/lib
  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.101 /  3. 13.101
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[rtsp @ 0xa952660] SDP:
v=0
o=- 1288182131882914 1288182131882914 IN IP4 192.168.1.129
s=Media Presentation
e=NONE
c=IN IP4 0.0.0.0
b=AS:50000
t=0 0
a=control:rtsp://192.168.1.129:554/axis-media/media.amp?streamprofile=Alta?tcp
a=range:npt=0.000000-
m=video 0 RTP/AVP 96
b=AS:50000
a=framerate:25.0
a=transform:1,0,0;0,1,0;0,0,1
a=control:rtsp://192.168.1.129:554/axis-media/media.amp/trackID=1?streamprofile=Alta?tcp
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-
sets=Z0IAKeNQFAe2AtwEBAaQeJEV,aM48gA==

[rtsp @ 0xa952660] video codec set to: h264
[NULL @ 0xa95a820] RTP Packetization Mode: 1
[NULL @ 0xa95a820] RTP Profile IDC: 42 Profile IOP: 0 Level: 29
[NULL @ 0xa95a820] Extradata set to 0xa95ac60 (size: 30)!
[rtsp @ 0xa952660] hello state=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=0, dts=NOPTS, size=1391, duration=0, 
flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=0, dts=NOPTS, size=1386, duration=0, 
flags=0
    Last message repeated 48 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=0, dts=NOPTS, size=599, duration=0, 
flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=8989, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=NOPTS, dts=NOPTS, size=69904, 
duration=0, flags=1
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=8989, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 6 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=8989, dts=NOPTS, size=202, duration=0, 
flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=15131, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=8989, dts=NOPTS, size=11295, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=15131, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 4 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=15131, dts=NOPTS, size=394, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=20823, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=15131, dts=NOPTS, size=8715, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=20823, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 3 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=20823, dts=NOPTS, size=441, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=26965, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=20823, dts=NOPTS, size=7376, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=26965, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 3 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=26965, dts=NOPTS, size=294, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=32658, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=26965, dts=NOPTS, size=7229, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=32658, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=32658, dts=NOPTS, size=1320, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=41646, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=32658, dts=NOPTS, size=6869, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=41646, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=41646, dts=NOPTS, size=1267, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=47789, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=41646, dts=NOPTS, size=6816, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=47789, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=47789, dts=NOPTS, size=1086, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=53931, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=47789, dts=47789, size=6635, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=53931, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=53931, dts=NOPTS, size=985, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=62920, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=53931, dts=53931, size=6534, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=62920, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=62920, dts=NOPTS, size=895, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=71908, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=62920, dts=62920, size=6444, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=71908, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=71908, dts=NOPTS, size=1018, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=74755, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=71908, dts=71908, size=6567, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=74755, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=74755, dts=NOPTS, size=664, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=77601, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=74755, dts=74755, size=6213, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=77601, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=77601, dts=NOPTS, size=327, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=80897, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=77601, dts=77601, size=5876, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=80897, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=80897, dts=NOPTS, size=417, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=83743, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=80897, dts=80897, size=5966, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=83743, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=83743, dts=NOPTS, size=61, duration=0, 
flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=86589, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=83743, dts=83743, size=5610, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=86589, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=86589, dts=NOPTS, size=141, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=89885, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=86589, dts=86589, size=5690, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=89885, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=89885, dts=NOPTS, size=184, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=92732, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=89885, dts=89885, size=5733, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=92732, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=92732, dts=NOPTS, size=293, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=95578, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=92732, dts=92732, size=5842, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=95578, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=95578, dts=NOPTS, size=256, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=98874, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=95578, dts=95578, size=5805, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=98874, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=98874, dts=NOPTS, size=140, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=101721, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=98874, dts=98874, size=5689, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=101721, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=101721, dts=NOPTS, size=218, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=104567, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=101721, dts=101721, size=5767, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=104567, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=104567, dts=NOPTS, size=90, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=107862, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=104567, dts=104567, size=5639, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=107862, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=107862, dts=NOPTS, size=283, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=110709, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=107862, dts=107862, size=5832, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=110709, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=110709, dts=NOPTS, size=307, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=113555, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=110709, dts=110709, size=5856, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=113555, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=113555, dts=NOPTS, size=237, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=116851, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=113555, dts=113555, size=5786, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=116851, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=116851, dts=NOPTS, size=303, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=119697, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=116851, dts=116851, size=5852, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=119697, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=119697, dts=NOPTS, size=136, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=122544, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=119697, dts=119697, size=5685, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=122544, dts=NOPTS, size=1386, 
duration=0, flags=0
    Last message repeated 2 times
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=122544, dts=NOPTS, size=201, 
duration=0, flags=0
[rtsp @ 0xa952660] ff_read_packet stream=0, pts=125839, dts=NOPTS, size=1391, 
duration=0, flags=0
[rtsp @ 0xa952660] read_frame_internal stream=0, pts=122544, dts=122544, size=5750, 
duration=0, flags=0
[rtsp @ 0xa952660] All info found
rfps: 29.500000 0.017510
rfps: 29.583333 0.013407
rfps: 29.666667 0.009912
rfps: 29.750000 0.007025
    Last message repeated 1 times
rfps: 29.833333 0.004745
    Last message repeated 1 times
rfps: 29.916667 0.003073
    Last message repeated 1 times
rfps: 30.000000 0.002009
    Last message repeated 1 times
rfps: 30.083333 0.001553
rfps: 30.166667 0.001704
    Last message repeated 1 times
rfps: 30.250000 0.002463
    Last message repeated 1 times
rfps: 30.333333 0.003831
    Last message repeated 1 times
rfps: 30.416667 0.005805
    Last message repeated 1 times
rfps: 30.500000 0.008388
rfps: 30.583333 0.011578
rfps: 30.666667 0.015376
rfps: 30.750000 0.019782
rfps: 59.666667 0.018980
rfps: 59.750000 0.015333
rfps: 59.833333 0.012293
rfps: 59.916667 0.009861
    Last message repeated 1 times
rfps: 60.000000 0.008036
    Last message repeated 1 times
rfps: 29.970030 0.002322
    Last message repeated 1 times
rfps: 59.940060 0.009287
    Last message repeated 1 times
[rtsp @ 0xa952660] 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=Alta?tcp':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.099878, bitrate: N/A
    Stream #0:0, 28, 1/90000: Video: h264 (Baseline), yuvj420p, 640x480 [SAR 1:1 DAR 4:3], 
1/180000, 30.08 tbr, 90k tbn, 180k tbc
Output #0, mp4, to '../axis.mp4':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf54.25.104
    Stream #0:0, 0, 1/90000: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 640x480 [SAR 1:1 
DAR 4:3], 1/90000, q=2-31, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
demuxer -> ist_index:0 type:video next_dts:NOPTS next_dts_time:NOPTS next_pts:NOPTS 
next_pts_time:NOPTS  pkt_pts:NOPTS pkt_pts_time:NOPTS pkt_dts:NOPTS 
pkt_dts_time:NOPTS off:-99878
demuxer -> ist_index:0 type:video next_dts:11 next_dts_time:1.1e-05 next_pts:11 
next_pts_time:1.1e-05  pkt_pts:0 pkt_pts_time:0 pkt_dts:NOPTS pkt_dts_time:NOPTS off:-
99878
[mp4 @ 0xaa9f360] pts (0) < dts (1) in stream 0
av_interleaved_write_frame(): Invalid argument



                                  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