LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2009, 05:56 PM   #1
ozegoods
Member
 
Registered: Oct 2004
Location: United States
Distribution: Mandriva 2010.1 KDE4
Posts: 38

Rep: Reputation: 0
mencoder, merge subtitles to 3gp video for mobile phone


I want to merge the subtitles into a 3gp video to play on my mobile phone. I can create a 3gp video that works, but without subtitles, using the following line:
Code:
mencoder -dvd-device movie.iso dvd://3 -chapter 2-4 -vf crop=374:306:69:43,scale=176:144,hqdn3d=4:3:6 -af channels=1,resample=8000:0:2 -srate 8000 -oac lavc -ovc lavc -lavcopts vcodec=h263p:mbd=2:vbitrate=160:acodec=libamr_nb:abitrate=12200 -of lavf -o out-file.3gp
mplayer will play the clip with subtitles displayed, using the following command:
Code:
mplayer -dvd-device movie.iso dvd://3 -chapter 2-4 -subcc
What mencoder command would merge subtitles into the video image when doing the conversion to 3gp?
 
Old 05-05-2009, 06:53 PM   #2
isamuede
Member
 
Registered: Jun 2008
Posts: 57

Rep: Reputation: 16
You need to dump the sub I dont recall it but you can go to opensubs.org [or googleit with open subs]. Be sure you have in your .mplayer dir a font.ttf and only add to :

mencoder -dvd-device movie.iso dvd://3 -chapter 2-4 -vf crop=374:306:69:43,scale=176:144,hqdn3d=4:3:6 -af channels=1,resample=8000:0:2 -srate 8000 -oac lavc -ovc lavc -lavcopts vcodec=h263p:mbd=2:vbitrate=160:acodec=libamr_nb:abitrate=12200 -of lavf -o out-file.3gp

-sub /path/to/sub.srt

Hope this helps =)!
 
Old 05-05-2009, 11:06 PM   #3
ozegoods
Member
 
Registered: Oct 2004
Location: United States
Distribution: Mandriva 2010.1 KDE4
Posts: 38

Original Poster
Rep: Reputation: 0
Thanks for the tip, but I'm still confused. Are you saying that even though the subtitles are on the DVD, and I can display them using the -subcc command in mplayer, that mencoder can't use those subtitles until they are first dumped to a separate file?

Last edited by ozegoods; 05-05-2009 at 11:45 PM.
 
Old 05-06-2009, 11:50 AM   #4
isamuede
Member
 
Registered: Jun 2008
Posts: 57

Rep: Reputation: 16
the subs in the dvd are a bitmap like format; to dump it you need to add the -dumpsrtsub or the -dumpsub from mplayer first, the first give you a srt sub [text] the second its the raw 'bitmap'; then you can use mencoder with the -sub option. I told you the site because there are already so much titles dumped as srt in these page.
Well hope I help you.
 
Old 05-06-2009, 12:07 PM   #5
ozegoods
Member
 
Registered: Oct 2004
Location: United States
Distribution: Mandriva 2010.1 KDE4
Posts: 38

Original Poster
Rep: Reputation: 0
Thanks for the explanation about dumping subtitles. I have not read anything saying that mencoder can't use the same subtitles as mplayer. Wouldn't it be easier to have mencoder read the subtitles directly from the DVD (or ISO file of the DVD) rather that first dumping them?
 
Old 05-06-2009, 12:45 PM   #6
isamuede
Member
 
Registered: Jun 2008
Posts: 57

Rep: Reputation: 16
Well, it can be done this way [from http://www.mplayerhq.hu/DOCS/HTML/en...ractsub.html]:
10.9. Extracting DVD subtitles to VOBsub file

MEncoder is capable of extracting subtitles from a DVD into VOBsub formatted files. They consist of a pair of files ending in .idx and .sub and are usually packaged in a single .rar archive. MPlayer can play these with the -vobsub and -vobsubid options.

You specify the basename (i.e without the .idx or .sub extension) of the output files with -vobsubout and the index for this subtitle in the resulting files with -vobsuboutindex.

If the input is not from a DVD you should use -ifo to indicate the .ifo file needed to construct the resulting .idx file.

If the input is not from a DVD and you do not have the .ifo file you will need to use the -vobsubid option to let it know what language id to put in the .idx file.

Each run will append the running subtitle if the .idx and .sub files already exist. So you should remove any before starting.

Example 10.5. Copying two subtitles from a DVD while doing two pass encoding

rm subtitles.idx subtitles.sub
mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \
-vobsubout subtitles -vobsuboutindex 0 -sid 2
mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \
-vobsubout subtitles -vobsuboutindex 1 -sid 5

------------------------------------------------------------------------------
my 2cents: sometimes you have another source besides the dvd and its more flexible using a srt you can edit rather than a binarie bitmap.=)!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mencoder/ffmpeg convert video(wmv) for Windows Mobile? paulx Linux - Software 2 06-26-2006 11:24 AM
ffmpeg and 3gp (mobile) files production riccisit Linux - Software 1 10-05-2005 01:23 AM
mencoder and subtitles help ZeroKun Linux - Software 0 07-19-2005 10:36 AM
stream 3gp files for mobile devices dtra Linux - General 1 04-01-2005 07:02 AM
Subtitles in Mencoder gwroy20 Linux - Software 2 05-15-2003 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration