[MEncoder-users] encoding to mpg

Lobster lobo at lobs.sytes.net
Wed Oct 13 01:19:39 CEST 2010


  On 13/10/2010 11:47 a.m., Olive wrote:
>
>> May I ask what the codecs of the source files/s are that you are
>> interested in playing?
> Some various formats. For example, the site:
> http://oldcinemovies.fr/accueil_058.htm have public domain old movies,
> some of them are worth watching. i would like to convert whatever they
> give to me (usually mplayer<file>  play the file perfectly). Also some
> avi file from my digital camera. But is it really important as long as
> mplayer can play them?
>
Well if they were using codecs the TV could accept they may just require 
a remux to a
container the TV knows about, This would be fast and lossless (video and 
audio quality) wise.

>> I also notice the TV can record to file from what you are watching.
>> This may give a clue
>> as to one format it will support.
> This is the output of mplayer when playing a file recorded from the TV:
>
> ----------------------------------------------
> MPlayer SVN-r32227-4.5.1 (C) 2000-2010 MPlayer Team
> 159 audio&  348 video codecs
> mplayer: could not connect to socket
> mplayer: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote
> control.
>
> Playing test.mpg.
> MPEG-PS file format detected.
> VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  15000.0 kbps (1875.0
> kbyte/s) Failed to open VDPAU backend libvdpau_nvidia.so: cannot open
> shared object file: No such file or directory [vdpau] Error when
> calling vdp_device_create_x11: 1
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
> ==========================================================================
> ==========================================================================
> Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 48000 Hz,
> 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000) Selected audio
> codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
> ==========================================================================
> AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) Starting playback...
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> VO: [xv] 720x576 =>  1024x576 Planar YV12
> A:   3.3 V:   3.3 A-V: -0.002 ct: -0.193  73/ 73  7%  3%  0.5% 0 0
>
> Exiting... (Quit)
> ---------------------------------------------------------
>
> ( I have also put a test (4mb) file recorded from my TV here:
> http://sharesend.com/6i12e ). Actually ffmpeg -i<infile>  outfile works
> but I observe a very significant decrease in the quality ).
>
Ok, well as I expected it looks to be fairly dvd compliant.

>> I might suggest one thing you could try to do is make a "dvd
>> compliant" file and see if that
>> will play.
>>
>> `mencoder -ovc lavc -oac lavc -of mpeg -mpegopts format=dvd:tsaf -vf
>> scale=720:576,hardup -ofps 25 -srate 48000 -af lavcresample=48000
>> -lavcopts
>> vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9500:vbitrate=5100:keyint=15:mbd=2:trell:mv0:precmp=2:cmp=2:subcmp=3:vstrict=0:acodec=ac3:abitrate=224
>> -o outfile.mpg<inputfile>`
>
> I have remove the option "hardup" since it gives an error. This give me
> a file where the image is OK but no sound.
>
Ok my bad here that option should be harddup (I didn't press d hard 
enough the second time)

change acodec=ac3 to be acodec=mp2   and you should have sound.

you could also add :aspect=16/9 for 16/9 video content or :aspect=4/3  
for 4/3 content
and iirc you may use :aspect=auto  where mencoder will try to use the 
source files aspect.




More information about the MEncoder-users mailing list