[FFmpeg-user] Issues with mpeg2video decoder

Ilir Pruthi ipruthi at gmail.com
Mon Sep 29 02:49:18 CEST 2014


Hello everyone,

I am having problems decoding a specific live stream encoded in MPEG2/MP2.
I am using FFmpeg 2.4. The reason I am convinced it's decoder related is
because I get the same error when I try to convert the stream and when I
copy the tracks over. I noticed that FFmpeg quits after around 1 minute.

Aside from the possibility that this could be source-related, is there any
way I can know for sure what is causing this disruption?


Here is command/output for when I try to encode:

me at my-server:~/ffmpeg_test$ ffmpeg -i "http://MY_SOURCE" -acodec libmp3lame
-ac 2 -ar 44100 -ab 128k -vcodec libx264 -bufsize 1200k -maxrate 1100k -f
mpegts -y output.ts
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 28 2014 22:47:18 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --prefix=/home/myserver/ffmpeg_build
--extra-cflags=-I/home/myserver/ffmpeg_build/include
--extra-ldflags=-L/home/myserver/ffmpeg_build/lib
--bindir=/home/myserver/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-nonfree
  libavutil      54.  7.101 / 54.  7.101
  libavcodec     56.  1.101 / 56.  1.101
  libavformat    56.  7.101 / 56.  7.101
  libavdevice    56.  1.100 / 56.  1.100
  libavfilter     5.  1.102 /  5.  1.102
  libswscale      3.  1.100 /  3.  1.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  1.100 / 53.  1.100
[mpeg2video @ 0x1ff8b40] Invalid frame dimensions 0x0.
    Last message repeated 4 times
Input #0, mpegts, from 'http://MY_SOURCE':
  Duration: N/A, start: 59114.049089, bitrate: 128 kb/s
  Program 8010
    Stream #0:0[0x110]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 128 kb/s
    Stream #0:1[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 3000 kb/s, 25 fps, 25 tbr,
90k tbn, 50 tbc
[libx264 @ 0x2028aa0] using SAR=16/15
[libx264 @ 0x2028aa0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2028aa0] profile High, level 3.0
Output #0, mpegts, to 'output.ts':
  Metadata:
    encoder         : Lavf56.7.101
    Stream #0:0: Video: h264 (libx264), yuv420p, 720x576 [SAR 16:15 DAR
4:3], q=-1--1, max. 1100 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.1.101 libx264
    Stream #0:1: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc56.1.101 libmp3lame
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (mp2 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[mpegts @ 0x1fe9e20] PES packet size mismatchme=00:01:08.67
bitrate=1090.6kbits/s dup=6 drop=0
    Last message repeated 1 times
[mp2 @ 0x209d0a0] incomplete frame
Error while decoding stream #0:0: Invalid data found when processing input
[mpeg2video @ 0x209d540] ac-tex damaged at 27 32
[mpeg2video @ 0x209d540] Warning MVs not available
[mpeg2video @ 0x209d540] concealing 180 DC, 180 AC, 180 MV errors in P frame
frame= 1730 fps= 28 q=-1.0 Lsize=    9374kB time=00:01:09.12
bitrate=1111.0kbits/s dup=6 drop=0
video:7401kB audio:1080kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 10.522927%
[libx264 @ 0x2028aa0] frame I:25    Avg QP:18.38  size: 16628
[libx264 @ 0x2028aa0] frame P:1305  Avg QP:21.98  size:  4940
[libx264 @ 0x2028aa0] frame B:400   Avg QP:23.09  size:  1790
[libx264 @ 0x2028aa0] consecutive B-frames: 60.1% 24.4%  8.3%  7.2%
[libx264 @ 0x2028aa0] mb I  I16..4: 40.1% 58.8%  1.0%
[libx264 @ 0x2028aa0] mb P  I16..4:  3.4% 10.4%  0.3%  P16..4: 23.8%  7.4%
 3.7%  0.0%  0.0%    skip:51.1%
[libx264 @ 0x2028aa0] mb B  I16..4:  0.4%  2.0%  0.1%  B16..8: 20.0%  3.3%
 0.7%  direct: 1.6%  skip:72.0%  L0:46.3% L1:44.8% BI: 8.9%
[libx264 @ 0x2028aa0] 8x8 transform intra:72.6% inter:85.2%
[libx264 @ 0x2028aa0] coded y,uvDC,uvAC intra: 44.9% 55.8% 15.7% inter:
12.9% 17.5% 0.9%
[libx264 @ 0x2028aa0] i16 v,h,dc,p: 40% 42%  6% 12%
[libx264 @ 0x2028aa0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 23% 33%  2%  3%
 4%  3%  3%  3%
[libx264 @ 0x2028aa0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 21% 13%  4%  8%
 9%  6%  5%  4%
[libx264 @ 0x2028aa0] i8c dc,h,v,p: 54% 22% 17%  7%
[libx264 @ 0x2028aa0] Weighted P-Frames: Y:2.8% UV:0.5%
[libx264 @ 0x2028aa0] ref P L0: 69.4% 16.5%  9.4%  4.5%  0.2%
[libx264 @ 0x2028aa0] ref B L0: 83.9% 12.2%  3.9%
[libx264 @ 0x2028aa0] ref B L1: 96.7%  3.3%
[libx264 @ 0x2028aa0] kb/s:876.16
me at my-server:~/ffmpeg_test$



Here is my command/output when I copy audio and video codecs:

me at my-server:~/asm/output$ ffmpeg -i "http://MY_SOURCE" -acodec copy
-vcodec copy -f mpegts -y output.ts
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 28 2014 22:47:18 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --prefix=/home/myserver/ffmpeg_build
--extra-cflags=-I/home/myserver/ffmpeg_build/include
--extra-ldflags=-L/home/myserver/ffmpeg_build/lib
--bindir=/home/myserver/bin --enable-gpl --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-nonfree
  libavutil      54.  7.101 / 54.  7.101
  libavcodec     56.  1.101 / 56.  1.101
  libavformat    56.  7.101 / 56.  7.101
  libavdevice    56.  1.100 / 56.  1.100
  libavfilter     5.  1.102 /  5.  1.102
  libswscale      3.  1.100 /  3.  1.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  1.100 / 53.  1.100
[mpeg2video @ 0x28bd960] Invalid frame dimensions 0x0.
    Last message repeated 4 times
Input #0, mpegts, from 'http://MY_SOURCE':
  Duration: N/A, start: 59373.487300, bitrate: 128 kb/s
  Program 8010
    Stream #0:0[0x110]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 128 kb/s
    Stream #0:1[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 3000 kb/s, 25 fps, 25 tbr,
90k tbn, 50 tbc
Output #0, mpegts, to 'output.ts':
  Metadata:
    encoder         : Lavf56.7.101
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p,
720x576 [SAR 16:15 DAR 4:3], q=2-31, max. 3000 kb/s, 25 fps, 90k tbn, 25 tbc
    Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, 128
kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mpegts @ 0x28b6d00] PES packet size mismatchme=00:01:18.68
bitrate=3392.8kbits/s
    Last message repeated 1 times
frame= 1973 fps= 28 q=-1.0 Lsize=   32784kB time=00:01:19.09
bitrate=3395.5kbits/s
video:28863kB audio:1236kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 8.919799%
me at my-server:~/ffmpeg_test$


Thank you,

-Ilir


More information about the ffmpeg-user mailing list