[MPlayer-users] Hard code subtitles

lartc lartc at manchotnetworks.net
Mon Apr 7 16:10:54 CEST 2008


hi

mplayer can do the job, but your going to have to transcode, mux, and do
a lot of work.

this is easier (using vlc):

#!/bin/bash

INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mp2v"
VIDEO_BITRATE="4096"
VIDEO_FPS="25"
AUDIO_CODEC="a52"
AUDIO_BITRATE="192"
AUDIO_SAMPLERATE="48000"
AUDIO_CHANNELS="2"
MUXER="ps"
SUBTITLE_TRACK="1"

exec /usr/bin/vlc -I dummy "${INPUT}" --sout "#transcode{vcodec=
${VIDEO_CODEC},\
vb=${VIDEO_BITRATE},fps=${VIDEO_FPS},acodec=${AUDIO_CODEC},ab=
${AUDIO_BITRATE},\
samplerate=${AUDIO_SAMPLERATE},channels=
${AUDIO_CHANNELS},soverlay,audio-sync}:\
standard{access=file,mux=${MUXER},dst=${OUTPUT}}" --sub-track=
${SUBTITLE_TRACK} \
vlc:quit >/dev/null 2>&1


the lines have been wrapped, so each long line ends with a "\" excepting
the last



cheers

charles




On Mon, 2008-04-07 at 15:03 +0100, Gonçalo Gomes wrote:
> Hello,
> 
> I'm trying to hard code a specific DVD subtitle to a mpeg file (just copying
> the audio and video stream) and when i select the subtitle (-sid 5) it
> detects it but it doesn't add it to the mpg file.
> I'm using the following entry;
> 
> c:\>mencoder.exe dvd://1 -dvd-device "c:\(...)\VIDEO_TS" -oac copy -ovc copy
> -sid 5 -of mpeg -o test.mpg
> 
> Is there a solution for this? How can hard code a subtitle?
> 
> Thanks in advance





More information about the MPlayer-users mailing list