[Home]Import Modules/Import Mplayer

Currently being edited!!

Transcode supports the use of mplayer as an import method via -x mplayer,mplayer, leveraging mplayer's miraculous ability to play ANYTHING.

 -x mplayer="-sub subfile -subpos 93 -subalign 2 -spuaa 20 -spugauss 0.5"

to get subtitles, otherwise refusing to be processed, merged into the stream.

When Mplayer is used to import content that tcprobe can't analyze, it may be necessary to run Mplayer in identify mode and use the results on the transcode command line. See MplayerProbe for an example of how this can be done relatively painlessly.

 transcode -H0 \ <- tells transcode not to probe
           -i your_movie_file \
           -x mplayer,mplayer \
           -f 23.976,1 \ <- framerate of input video stream
           -g 640x352 \ <- geometry of input video
           -n 0x1 \ <- mplayer will feed transcode raw pcm
           -e 44100,16,2 \ <- samplerate, bit-depth, and channels in source audio
           -y ffmpeg \ <- use lavc for encoding
           --export_prof dvd-pal \
           --import_asr 3 \ <- always set the import aspect ratio to be equal to the export asr that you are going to target!
           --export_asr 3 \
           -D0 \
           -N 0x2000 \
           -b 384 \
           -m new_movie_name.ac3 \
           -o new_movie_name

If the source file contains multiple video and/or audio streams, it is possible to Transcode these as well:

 mplayer -vo dummy -identify your_movie_file 2>&1 | grep -E "ID_VIDEO_ID|ID_AUDIO_ID"

This gives:


Based on that, say we want to Transcode the third video stream together with the second audio stream:

mplayer -vid 6 -aid 4 -vo dummy -identify your_movie_file 2>&1 | grep -E "VIDEO:|AUDIO:"


 VIDEO:  [SVQ3]  400x238  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
 AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)

Now build the Transode line:

 transcode -H0 \
           -i your_movie_file \
           -x mplayer="-vid 6 -aid 4",mplayer \
           -f 23.976 -g 400x238 \
           -n 0x1 \
           -e 44100,16,2 \
           -y ffmpeg \
           --export_prof dvd-pal \
           -D0 -N 0x2000 \
           -b 384 \
           -m new_movie_name.ac3 \
           -o new_movie_name

Leveraging Mplayer's filters:

 -x mplayer="-vf eq2=0.8:0.9:0.1:1.1 -vf yadif",mplayer

Transcode Wiki | Import Modules | Recent Changes | Preferences
Password required to edit | View other revisions
Last edited December 1, 2006 6:56 pm by tarazed.ligo.caltech.edu (diff)