[FFmpeg-user] From mpeg2 to mpeg4

Lorenzo Travaglio lorenzo.travaglio at fastwebnet.it
Sun Oct 23 20:41:53 CEST 2011


On Sun, 23/10/2011 17:34, Jonathan Isom wrote:
 > Hi
 >    The first thing just about anybody on this list will tell you is
 > that you are using  a
 > very old(2009) version. You should try to install a recent version.
 > FFmpeg is under
 > constant development so many options have changed and codecs improved.
 >   It would
 > also be beneficial to know the command line you tried. Also are you
 > wanting just
 > mpeg4 or mpeg4 AVC(aka h.264)?

Thank you Jonathan for your answer.
This package is declared as "up-to-date" by apt-get. However I will try 
to download the source and to recompile even because some switches like 
'-a' to change the aspect ratio do not work.

I tried many command line like "ffmpeg -i prova.mpg -vcodec mpeg4 
prova4.mpg" but the results are very poor. In this particular case I 
obtained a reduced but not visible file. In other cases I obtained 
reduced versions but video was very poor, as with "ffmpeg -i prova.mpg 
-s 720*368 prova3.mpg" or "ffmpeg -i prova.mpg -r 50 prova2.mpg".

The file "prova.mpg" is the result of a cut made on the record of one tv 
program to remove commercials and other not interesting parts. The cut 
has been made by mpgtx.

Before reply to your question I admit to ignore the difference between 
the two formats you ask. I would try with this small video and to check 
if the tv decoder is able to read the format. Not all formats are read 
by my DTV decoder.

Here I enclose the output of the -vcodec mpeg4 command line. I don't 
know if the errors reported are important or not.

Thank you
Lorenzo

----
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.2, Copyright (c) 2000-2009 
Fabrice Bellard, et al.
   configuration: --extra-version=4:0.5.1-1ubuntu1.2 --prefix=/usr 
--enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib 
--enable-libgsm --enable-libschroedinger --enable-libspeex 
--enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib 
--disable-stripping --disable-vhook --enable-runtime-cpudetect 
--enable-gpl --enable-postproc --enable-swscale --enable-x11grab 
--enable-libdc1394 --enable-shared --disable-static
   libavutil     49.15. 0 / 49.15. 0
   libavcodec    52.20. 1 / 52.20. 1
   libavformat   52.31. 0 / 52.31. 0
   libavdevice   52. 1. 0 / 52. 1. 0
   libavfilter    0. 4. 0 /  0. 4. 0
   libswscale     0. 7. 1 /  0. 7. 1
   libpostproc   51. 2. 0 / 51. 2. 0
   built on Sep 16 2011 17:04:18, gcc: 4.4.3

Seems stream 0 codec frame rate differs from container frame rate: 50.00 
(50/1) -> 25.00 (25/1)
Input #0, mpeg, from 'prova.mpg':
   Duration: 00:09:03.69, start: 0.180600, bitrate: 5183 kb/s
     Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 
DAR 16:9], 4624 kb/s, 25 tbr, 90k tbn, 50 tbc
     Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
Output #0, mpeg, to 'prova4.mpg':
     Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 
q=2-31, 200 kb/s, 90k tbn, 25 tbc
     Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg2video @ 0x8ec3b90]00 motion_type at 16 1e=69.05 bitrate= 
470.5kbits/s
[mpeg2video @ 0x8ec3b90]00 motion_type at 8 2
[mpeg2video @ 0x8ec3b90]ac-tex damaged at 2 3
[mpeg2video @ 0x8ec3b90]00 motion_type at 5 4
[mpeg2video @ 0x8ec3b90]ac-tex damaged at 5 5
[mpeg2video @ 0x8ec3b90]invalid mb type in B Frame at 10 6
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 7
[mpeg2video @ 0x8ec3b90]00 motion_type at 2 8
[mpeg2video @ 0x8ec3b90]invalid cbp at 26 9
[mpeg2video @ 0x8ec3b90]00 motion_type at 10 10
[mpeg2video @ 0x8ec3b90]00 motion_type at 34 11
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 12
[mpeg2video @ 0x8ec3b90]00 motion_type at 2 13
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 14
[mpeg2video @ 0x8ec3b90]00 motion_type at 11 15
[mpeg2video @ 0x8ec3b90]invalid mb type in B Frame at 1 16
[mpeg2video @ 0x8ec3b90]mb incr damaged
[mpeg2video @ 0x8ec3b90]00 motion_type at 7 18
[mpeg2video @ 0x8ec3b90]00 motion_type at 43 19
[mpeg2video @ 0x8ec3b90]00 motion_type at 14 20
[mpeg2video @ 0x8ec3b90]00 motion_type at 6 21
[mpeg2video @ 0x8ec3b90]00 motion_type at 11 22
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 23
[mpeg2video @ 0x8ec3b90]00 motion_type at 3 24
[mpeg2video @ 0x8ec3b90]00 motion_type at 3 26
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 27
[mpeg2video @ 0x8ec3b90]00 motion_type at 3 28
[mpeg2video @ 0x8ec3b90]00 motion_type at 13 29
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 30
[mpeg2video @ 0x8ec3b90]00 motion_type at 4 31
[mpeg2video @ 0x8ec3b90]00 motion_type at 8 32
[mpeg2video @ 0x8ec3b90]00 motion_type at 4 34
[mpeg2video @ 0x8ec3b90]00 motion_type at 1 35
[mpeg2video @ 0x8ec3b90]Warning MVs not available
[mpeg2video @ 0x8ec3b90]concealing 1575 DC, 1575 AC, 1575 MV errors
frame=13590 fps=116 q=31.0 Lsize=   31120kB time=543.36 bitrate= 
469.2kbits/s
video:26616kB audio:4245kB global headers:0kB muxing overhead 0.838791%
----


More information about the ffmpeg-user mailing list