LinuxQuestions.org
Help answer threads with 0 replies.
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 11-15-2006, 01:59 PM   #1
h4m574h
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Rep: Reputation: 0
Subtitle encoding MEncoder


Hello!

I was searching for a solution to "hard-sub" my subtitles to an avi file. I found a great solution in MEncoder and the code which I found on this forums.

The code goes like this:

mencoder -vop pp=de,scale=548:222 -oac copy -ovc lavc -lavcopts keyint=25:vcodec=mpeg4:vbitrate=679:vpass=1 -sub "Domino.srt" -o "Domino_with_subs.avi" "Domino.avi"

Almost everything works great, except the fact that my .srt subs are in Central-European encoding (ISO-8859-2), but MEncoder replaces CE-specific characters into strange symbols. Is there any way to fix this or am I forced to find another solution for hard-subbing my avis?
 
Old 11-30-2006, 01:16 PM   #2
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by h4m574h
Hello!

I was searching for a solution to "hard-sub" my subtitles to an avi file. I found a great solution in MEncoder and the code which I found on this forums.

The code goes like this:

mencoder -vop pp=de,scale=548:222 -oac copy -ovc lavc -lavcopts keyint=25:vcodec=mpeg4:vbitrate=679:vpass=1 -sub "Domino.srt" -o "Domino_with_subs.avi" "Domino.avi"

Almost everything works great, except the fact that my .srt subs are in Central-European encoding (ISO-8859-2), but MEncoder replaces CE-specific characters into strange symbols. Is there any way to fix this or am I forced to find another solution for hard-subbing my avis?
Hello, there is an option to specify your encoding of your liking.
Try adding "-subcp ISO-8859-2" on the above command.

Actually, i found your post searching for a solution to my problem. I want to do the same thing but using iso-8859-7. The solution i said above doesn't solve my problem, it might do it to yours. Please tell me the results.

Ah, there is also another option with which you mencoder tries to find out the encoding of the .srt file by your country. You have to know the initial characters of your country. For example, i would use "-subcp enca:gr:iso-8859-7", because i live in greece (so the subtitles are in greek) and if mencoder fail to guess it the right encoding it comes back to the encoding you specified next to your country.

Hope it is helpfull.

And if anyone knows anything about my case please drop me a line.
 
Old 12-01-2006, 07:30 AM   #3
h4m574h
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you for your reply, I solved my problem by abandoning MEncoder. =D I mostly did so, because my DVD player said the codec is not supported. But I guess I'll try just for the sake of it =D

I was finaly able to install Avidemux and now I use Avidemux+Subtitle filter and xvid4 encoding. You can try that, maybe it would help - just remember to set subtitle plugin to UTF-8 and when previewing the video choose "Preview in new window", else the subtitle filter won't take effect.

Hope my experience helps.

Last edited by h4m574h; 12-01-2006 at 07:33 AM.
 
Old 12-01-2006, 08:18 AM   #4
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
Thank you, i have already used Avidemux, but with the same results. The subtitles are displayed wrong.Specifically i want ISO-8859-7, but in avidemux there is no such option.
 
Old 12-02-2006, 05:16 AM   #5
h4m574h
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
I guess I dunnoe than.

Well there was another thing. When I downloaded subtitles they were in wrong ISO, so I had to replace every with a č, etc.

Maybe that could be the problem in your case too. I just used gedit, ctrl+f and replaced everything, saved it in UTF8 and then used subtitler. I know it's a long shot, but try it anyway.

Yes, I'm a linux n00b =D
 
Old 12-02-2006, 05:46 AM   #6
babis85
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
I' ve even tried something similar to that idea. There is a tool, named iconv with wich you can convert a file of encoding A into encoding B. So, i convert my .srt file from ISO-8859-7 to UTF-8, the characters looked perfectly, but still the import was faulty.

Quote:
iconv -f ISO-8859-7 -t UTF-8 SubInISO88597.srt --output SubInUTF8.srt
 
Old 10-10-2008, 05:23 PM   #7
xmanwe
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by babis85 View Post
I' ve even tried something similar to that idea. There is a tool, named iconv with wich you can convert a file of encoding A into encoding B. So, i convert my .srt file from ISO-8859-7 to UTF-8, the characters looked perfectly, but still the import was faulty.
hm, i am doing iconv -f UTF-8 -t WINDOWS-1250 title1.srt -o title2.srt and i get iconv: illegal input sequence at position 37
How can i covert encoding of my subtitles? what's wrong?
 
Old 10-17-2009, 12:36 AM   #8
alecz20
LQ Newbie
 
Registered: May 2009
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by h4m574h View Post
Thank you for your reply, I solved my problem by abandoning MEncoder. =D I mostly did so, because my DVD player said the codec is not supported....
You can try:

Code:
mencoder -oac copy -ovc xvid -xvidencopts fixed_quant=3 -sub "Domino.srt" -o "Domino_with_subs.avi" "Domino.avi"
To encode in xvid. This should work with your player. A lower fixed_quant will produce a larger file with potentially better quality.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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: audio delay when encoding in slices!? J_Szucs Linux - Software 7 06-25-2006 06:30 PM
encoding picture frames using mencoder ellensn Linux - Software 2 05-31-2006 02:46 PM
Problem with encoding dvdrips using mencoder/acidrip hari_seldon99 Linux - Software 7 01-29-2004 07:32 AM
Problems encoding DVDs with MEncoder. adz Linux - Software 5 10-26-2003 01:39 AM
mencoder jpeg stream encoding bakuretsu Linux - Software 0 10-10-2002 09:17 AM

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

All times are GMT -5. The time now is 10:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration