Hi all I am using lattest ffmpeg (2.0.2) with a rtsp stream in h264. I want to save decoded images from stream:
./ffmpeg -i "rtsp://192.168.0.95:554/profile1" -y %6d.jpg -log-level debug The problem is that I always get corrupt images (example attached). I think the problem is [h264 @ 0x1c28d60] RTP: missed 146 packets [AVIOContext @ 0x7f3190016d20] Statistics: 0 seeks, 3 writeouts [h264 @ 0x1f82300] concealing 2237 DC, 2237 AC, 2237 MV errors in I frame [h264 @ 0x1fc7160] Frame num gap 8 6 RTP missed packets. I attach the full log. Anyone can help me? Thanks in advance Best Regards Rafa L.
./ffmpeg -i "rtsp://root:[email protected]:554/profile1" -y %6d.jpg -loglevel debug ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers built on Oct 15 2013 12:00:31 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --prefix=/opt/ffmpeg-2.0.2 --arch=x86_64 --target-os=linux --enable-pic --enable-shared libavutil 52. 38.100 / 52. 38.100 libavcodec 55. 18.102 / 55. 18.102 libavformat 55. 12.100 / 55. 12.100 libavdevice 55. 3.100 / 55. 3.100 libavfilter 3. 79.101 / 3. 79.101 libswscale 2. 3.100 / 2. 3.100 libswresample 0. 17.102 / 0. 17.102 Splitting the commandline. Reading option '-i' ... matched as input file with argument 'rtsp://root:[email protected]:554/profile1'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '%6d.jpg' ... matched as output file. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input file rtsp://root:[email protected]:554/profile1. Successfully parsed a group of options. Opening an input file: rtsp://root:[email protected]:554/profile1. [rtsp @ 0x1c24880] SDP: v=0 o=- 0 0 IN IP4 192.168.0.95 s=rtsp://192.168.0.95/profile1 c=IN IP4 0.0.0.0 t=0 0 m=application 0 RTP/AVP 122 a=rtpmap:122 vnd.onvif.metadata/90000 a=control:rtsp://192.168.0.95/profile1/METAEnc m=audio 0 RTP/AVP 0 a=rtpmap:0 PCMU/8000/1 a=control:rtsp://192.168.0.95/profile1/G711Enc m=video 0 RTP/AVP 99 a=rtpmap:99 H264/90000 a=fmtp:99 sprop-parameter-sets=Z0LgKdoBQB5puAgIMBAAAA==,aM48gA==;packetization-mode=1;profile-level-id=42e029 a=control:rtsp://192.168.0.95/profile1/AVCESEnc a=framerate:30.0 [rtsp @ 0x1c24880] audio codec set to: pcm_mulaw [rtsp @ 0x1c24880] audio samplerate set to: 8000 [rtsp @ 0x1c24880] audio channels set to: 1 [rtsp @ 0x1c24880] video codec set to: h264 [NULL @ 0x1c28d60] Extradata set to 0x1c26a60 (size: 28)! [NULL @ 0x1c28d60] RTP Packetization Mode: 1 [NULL @ 0x1c28d60] RTP Profile IDC: 42 Profile IOP: e0 Level: 29 [rtsp @ 0x1c24880] hello state=0 [h264 @ 0x1c28d60] Current profile doesn't provide more RBSP data in PPS, skipping [rtsp @ 0x1c24880] All info found rfps: 29.416667 0.019897 rfps: 29.500000 0.016543 rfps: 29.583333 0.013703 rfps: 29.666667 0.011375 rfps: 29.750000 0.009560 Last message repeated 1 times rfps: 29.833333 0.008258 Last message repeated 1 times rfps: 29.916667 0.007469 Last message repeated 1 times rfps: 30.000000 0.007193 Last message repeated 1 times rfps: 30.083333 0.007429 rfps: 30.166667 0.008179 rfps: 30.250000 0.009441 rfps: 30.333333 0.011217 rfps: 30.416667 0.013505 rfps: 30.500000 0.016306 rfps: 30.583333 0.019620 rfps: 44.833333 0.019723 rfps: 44.916667 0.019509 Last message repeated 1 times rfps: 45.000000 0.019809 Last message repeated 1 times rfps: 29.970030 0.007233 Last message repeated 1 times Guessed Channel Layout for Input Stream #0.1 : mono Input #0, rtsp, from 'rtsp://root:[email protected]:554/profile1': Metadata: title : rtsp://192.168.0.95/profile1 Duration: N/A, start: 0.177000, bitrate: 64 kb/s Stream #0:0, 0, 1/90000: Data: none, 0/1 Stream #0:1, 18, 1/8000: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s Stream #0:2, 28, 1/90000: Video: h264 (Constrained Baseline), yuvj420p, 1280x960, 1/180000, 30 tbr, 90k tbn, 180k tbc Successfully opened the file. Parsing a group of options: output file %6d.jpg. Successfully parsed a group of options. Opening an output file: %6d.jpg. Successfully opened the file. detected 4 logical cores [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'video_size' to value '1280x960' [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'pix_fmt' to value '12' [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'time_base' to value '1/90000' [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'pixel_aspect' to value '0/1' [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:2 @ 0x1dbc000] Setting 'frame_rate' to value '30/1' [graph 0 input from stream 0:2 @ 0x1dbc000] w:1280 h:960 pixfmt:yuvj420p tb:1/90000 fr:30/1 sar:0/1 sws_param:flags=2 [format @ 0x1d5c6e0] compat: called with args=[yuvj420p|yuvj422p|yuvj444p] [format @ 0x1d5c6e0] Setting 'pix_fmts' to value 'yuvj420p|yuvj422p|yuvj444p' [AVFilterGraph @ 0x1dbbf60] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed [mjpeg @ 0x1dbaea0] intra_quant_bias = 96 inter_quant_bias = 0 [mjpeg @ 0x1c151c0] intra_quant_bias = 96 inter_quant_bias = 0 [mjpeg @ 0x1c24200] intra_quant_bias = 96 inter_quant_bias = 0 [mjpeg @ 0x1d57060] intra_quant_bias = 96 inter_quant_bias = 0 [mjpeg @ 0x1c8b7e0] intra_quant_bias = 96 inter_quant_bias = 0 Output #0, image2, to '%6d.jpg': Metadata: title : rtsp://192.168.0.95/profile1 encoder : Lavf55.12.100 Stream #0:0, 0, 1/90000: Video: mjpeg, yuvj420p, 1280x960, 1/30, q=2-31, 200 kb/s, 90k tbn, 30 tbc Stream mapping: Stream #0:2 -> #0:0 (h264 -> mjpeg) Press [q] to stop, [?] for help [AVIOContext @ 0x7f3198266ae0] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f31986a1f00] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f319869a460] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f31986a3ec0] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x3cf1c00] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x40967a0] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x457a3c0] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x3016340] Statistics: 0 seeks, 5 writeouts [AVIOContext @ 0x32e51c0] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x32e51c0] Statistics: 0 seeks, 5 writeouts [AVIOContext @ 0x1dbc760] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x2bc2ec0] Statistics: 0 seeks, 5 writeouts [AVIOContext @ 0x32e51c0] Statistics: 0 seeks, 5 writeouts [AVIOContext @ 0x1dd7440] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x1dc8000] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f3190017660] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f31900169c0] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f31900166c0] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f3190016840] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f3190016860] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f3190016ac0] Statistics: 0 seeks, 4 writeouts [AVIOContext @ 0x7f3190266f00] Statistics: 0 seeks, 3 writeouts [h264 @ 0x1c28d60] RTP: missed 146 packets [AVIOContext @ 0x7f3190016d20] Statistics: 0 seeks, 3 writeouts [h264 @ 0x1f82300] concealing 2237 DC, 2237 AC, 2237 MV errors in I frame [h264 @ 0x1fc7160] Frame num gap 8 6 [AVIOContext @ 0x7f3190018680] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f3190016d20] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f319025c740] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f3190016ac0] Statistics: 0 seeks, 3 writeouts *** 6 dup! [AVIOContext @ 0x7f3190016ac0] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0x7f3190033960] Statistics: 0 seeks, 3 writeouts
<<attachment: corrupted.jpg>>
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
