Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a program to hardcode subs into an AVI file. The problem is that is recompresses the video using a codec. I don't see why this is necessary and causes a noticeable loss of quality. Is there a program that will put the subs in without having to recompress the video so that there is no loss in video quality?

share|improve this question
add comment

3 Answers 3

up vote 8 down vote accepted

No. The hardsubs modify the video content and so recompressing it is necessary.

share|improve this answer
    
What codec should be used to minimize loss of video quality? –  tony_sid Dec 30 '10 at 7:41
3  
That is a question that entire doctorate theses have been written about. –  Ignacio Vazquez-Abrams Dec 30 '10 at 7:43
    
At the moment, h264 is probably the best (in terms of quality/size ratio) consumer lossy codec available. On the same basis, Lagarith is probably the most useful lossless codec (going beyond Lagarith is usually pointless). –  Matthieu Cartier Dec 30 '10 at 12:12
add comment

I think as it is typically used, hard subtitles mean they are embedded into the image data, which by definition requires re-compression. Soft subtitles are added as separate files, e.g. .srt. However, there is a middle way in embedded subtitles. Embedded subtitles are added into the video container as a separate track, which means they will be included in the file but not require re-compression.

For Divx-format the best tool is Windows based application AVIAddXSubs. It can embed Idx/Sub/Srt subtitles.

For MP4 and some other alternatives, Handbrake can embed soft subtitles. Read more at their wiki

share|improve this answer
    
Based on the asker's other questions, I'm fairly sure they already have a MKV with embedded softsubs. –  Ignacio Vazquez-Abrams Dec 30 '10 at 15:03
    
Yes, you may be right but I was assuming the asker wanted an AVI file. AVI can include subs without recompression using AVIAddXSubs and a DivX/Xvid compatible player. If the MKV had a h264 video stream, the same could be accomplished with Handbrake and the MP4 container (example for iPad or Apple TV). –  RipperDoc Dec 31 '10 at 2:28
    
Soft subtitles may be embedded in containers such as MKV, but not all devices may be able to play them (I'm thinking about you, Playstation 3!) –  ttarchala Jul 14 '11 at 10:21
add comment

You can use mplayer to play the video with subtitles, and then output everything to a raw yuv file (-vo yuv4mpeg). If you play a movie, this outputted file will be really huge, hundreds of gigabytes, so make sure that it will not cause issues.

After the file has been outputted, it can be compressed by using ffmpeg and then H264 codec.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.