#1732: avienc: inserts too many (>90%) empty packets ------------------------------------+------------------------------------ Reporter: Andrew | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: avi | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------
Comment (by Andrew): > Is this only reproducible with network input or also if you use an > input file? muxing file: insert 1 empty per packet {{{ % ./ffmpeg -i /tmp/7b0de690da55.mp4 -vcodec copy -an -frames 20 -y /var/tmp/a.avi ffmpeg version N-44432-g59db014 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 13 2012 19:13:56 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-version3 --enable-runtime-cpudetect libavutil 51. 73.100 / 51. 73.100 libavcodec 54. 55.100 / 54. 55.100 libavformat 54. 27.100 / 54. 27.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 16.103 / 3. 16.103 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/7b0de690da55.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 1942-06-26 18:41:39 Duration: 00:00:59.76, start: 0.000000, bitrate: 364 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 464x348, 265 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s Metadata: creation_time : 1942-06-26 18:41:39 handler_name : IsoMedia File Produced by Google, 5-11-2011 Output #0, avi, to '/var/tmp/a.avi': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 ISFT : Lavf54.27.100 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 464x348, q=2-31, 265 kb/s, 30 fps, 60 tbn, 60 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 1 from 2, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 2 from 4, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 3 from 6, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 4 from 8, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 5 from 10, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 6 from 12, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 7 from 14, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 8 from 16, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 9 from 18, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 10 from 20, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 11 from 22, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 12 from 24, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 13 from 26, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 14 from 28, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 15 from 30, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 16 from 32, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 17 from 34, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 18 from 36, 50% [avi @ 0x9ce6340] V: insert 1 empty pkt, total empty 19 from 38, 50% frame= 20 fps=0.0 q=-1.0 Lsize= 40kB time=00:00:00.65 bitrate= 501.8kbits/s video:33kB audio:0kB subtitle:0 global headers:0kB muxing overhead 19.547307% }}} muxing file with transcoding : have no inserted empty packet {{{ % ./ffmpeg -i /tmp/7b0de690da55.mp4 -vcodec mpeg4 -an -frames 100 -y /var/tmp/a.avi ffmpeg version N-44432-g59db014 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 13 2012 19:13:56 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-version3 --enable-runtime-cpudetect libavutil 51. 73.100 / 51. 73.100 libavcodec 54. 55.100 / 54. 55.100 libavformat 54. 27.100 / 54. 27.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 16.103 / 3. 16.103 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/7b0de690da55.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 1942-06-26 18:41:39 Duration: 00:00:59.76, start: 0.000000, bitrate: 364 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 464x348, 265 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s Metadata: creation_time : 1942-06-26 18:41:39 handler_name : IsoMedia File Produced by Google, 5-11-2011 Output #0, avi, to '/var/tmp/a.avi': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 ISFT : Lavf54.27.100 Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 464x348, q=2-31, 200 kb/s, 30 tbn, 30 tbc Metadata: creation_time : 1970-01-01 00:00:00 handler_name : VideoHandler Stream mapping: Stream #0:0 -> #0:0 (h264 -> mpeg4) Press [q] to stop, [?] for help frame= 100 fps=0.0 q=4.3 Lsize= 181kB time=00:00:03.33 bitrate= 443.8kbits/s video:173kB audio:0kB subtitle:0 global headers:0kB muxing overhead 4.600627% }}} videolinux2 2 avi muxing: - insert 1 empty per packet {{{ % ./ffmpeg -f video4linux2 -i /dev/video0 -vcodec copy -frames 10 -y /var/tmp/a.avi ffmpeg version N-44432-g59db014 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 13 2012 19:13:56 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-version3 --enable-runtime-cpudetect libavutil 51. 73.100 / 51. 73.100 libavcodec 54. 55.100 / 54. 55.100 libavformat 54. 27.100 / 54. 27.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 16.103 / 3. 16.103 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 [video4linux2,v4l2 @ 0x8fd2560] Estimating duration from bitrate, this may be inaccurate Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1347609615.886965, bitrate: 165888 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 165888 kb/s, 25 tbr, 1000k tbn, 25 tbc Output #0, avi, to '/var/tmp/a.avi': Metadata: ISFT : Lavf54.27.100 Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, q=2-31, 165888 kb/s, 50 tbn, 50 tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 1 from 2, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 2 from 4, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 3 from 6, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 4 from 8, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 5 from 10, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 6 from 12, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 7 from 14, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 8 from 16, 50% [avi @ 0x8fcc960] V: insert 1 empty pkt, total empty 9 from 18, 50% frame= 10 fps=0.0 q=-1.0 Lsize= 8106kB time=00:00:00.38 bitrate=174748.2kbits/s video:8100kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.074002% }}} videolinux2 2 avi muxing with encoding: - have no inserted empty packet {{{ % ./ffmpeg -f video4linux2 -i /dev/video0 -vcodec mjpeg -frames 10 -y /var/tmp/a.avi ffmpeg version N-44432-g59db014 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 13 2012 19:13:56 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-version3 --enable-runtime-cpudetect libavutil 51. 73.100 / 51. 73.100 libavcodec 54. 55.100 / 54. 55.100 libavformat 54. 27.100 / 54. 27.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 16.103 / 3. 16.103 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 [video4linux2,v4l2 @ 0xafa8560] Estimating duration from bitrate, this may be inaccurate Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1347609689.123361, bitrate: 165888 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 165888 kb/s, 25 tbr, 1000k tbn, 25 tbc Output #0, avi, to '/var/tmp/a.avi': Metadata: ISFT : Lavf54.27.100 Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 720x576, q=2-31, 200 kb/s, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo -> mjpeg) Press [q] to stop, [?] for help frame= 10 fps=0.0 q=0.0 Lsize= 93kB time=00:00:00.40 bitrate=1911.4kbits/s video:88kB audio:0kB subtitle:0 global headers:0kB muxing overhead 6.610446% }}} rtsp 2 avi muxing with transcoding: have no inserted empty packet after first 9 packets {{{ % ./ffmpeg -rtsp_transport tcp -i 'rtsp://axis1031/axis- media/media.amp?videocodec=mpeg4&video=1&audio=0' -vcodec mjpeg -an -y /var/tmp/b.avi ffmpeg version N-44432-g59db014 Copyright (c) 2000-2012 the FFmpeg developers built on Sep 13 2012 19:13:56 with gcc 4.4.5 (Debian 4.4.5-8) configuration: --enable-version3 --enable-runtime-cpudetect libavutil 51. 73.100 / 51. 73.100 libavcodec 54. 55.100 / 54. 55.100 libavformat 54. 27.100 / 54. 27.100 libavdevice 54. 2.100 / 54. 2.100 libavfilter 3. 16.103 / 3. 16.103 libswscale 2. 1.101 / 2. 1.101 libswresample 0. 15.100 / 0. 15.100 [rtsp @ 0x9dc35e0] Estimating duration from bitrate, this may be inaccurate Input #0, rtsp, from 'rtsp://axis1031/axis- media/media.amp?videocodec=mpeg4&video=1&audio=0': Metadata: title : Media Presentation Duration: N/A, start: 0.099878, bitrate: N/A Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 30.08 tbr, 90k tbn, 1k tbc Output #0, avi, to '/var/tmp/b.avi': Metadata: INAM : Media Presentation ISFT : Lavf54.27.100 Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 30.08 tbn, 30.08 tbc Stream mapping: Stream #0:0 -> #0:0 (mpeg4 -> mjpeg) Press [q] to stop, [?] for help [avi @ 0x9dd67a0] V: insert 1 empty pkt, total empty 1 from 3, 33% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 3 from 6, 50% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 5 from 9, 55% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 7 from 12, 58% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 9 from 15, 60% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 11 from 18, 61% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 13 from 21, 61% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 15 from 24, 62% [avi @ 0x9dd67a0] V: insert 2 empty pkt, total empty 17 from 27, 62% frame= 239 fps= 32 q=0.0 Lsize= 2672kB time=00:00:08.50 bitrate=2572.4kbits/s video:2660kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.442286% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1732#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://avcodec.org/mailman/listinfo/ffmpeg-trac