Log in

View Full Version : mencoder x264 avi->raw->mp4 subtitles


kharan5876
5th October 2006, 14:45
Hello again.
I've been encoding from dvd to x264 with mencoder. The movie I encoded was NTSC telecined so I removed the telecining using pullup, softskip, and harddup and encoded it to an avi file. I also ripped the subtitle tracks using -sid # -vobsubout file
Then I came across that nice issue mkvmerge has with vfw.

So I riped the raw video stream using mencoder ... -ovc copy -of rawvideo and then used MP4Box -add raw.264 -new movie.mp4 create an mp4 out of it.
The problem is if I use mkvmerge with the vobsubs and the mp4 video the subtitles are out of sync.
If I use --engage allow_avc_in_vfw_mode and mux the avi everything looks fine.

How can i fix the sync of the subtitles? Should I rerip them using some special parameters with mencoder or do I have to manually set a delay factor in mkvmerge? Or did I somehow use MP4Box incorrectly?

I tried doing:
mencoder DVD-SOURCE -oac copy -ovc frameno -of rawvideo -o /dev/null -ofps 24000/1001 -vf pullup,softskip,harddup -sid 0 -vobsubout testsub
but this did not help.

If I now do my video encoding with -of rawvideo instead of using the default avi container and rip the subtitle streams along with it will they be guarenteed to be in sync?
If you encode with -of rawvideo does -oac copy still work to ensure that A/V syncing issues do not occur?
Exactly what parameters (fps, reversing telecine/interlace, etc..) affect subtitle sync.
Will these things also create syncing issues for ripped dvd style chapters that are usable in the mkv format?

nm
5th October 2006, 15:44
Or did I somehow use MP4Box incorrectly?
You need to specify the framerate. MP4Box uses 25 fps by default and your video is 23.976 fps after ivtc.

kharan5876
5th October 2006, 17:39
ahh, thanks a lot for your continued help of my dumb questions.

So my final question is this. When ripping vobsub's using mencoder do any parameters (ofps,filtering, etc..) affect the outputed .idx and .sub file or will they be the same no matter how you encode?

nm
6th October 2006, 13:41
So my final question is this. When ripping vobsub's using mencoder do any parameters (ofps,filtering, etc..) affect the outputed .idx and .sub file or will they be the same no matter how you encode?
I think the fps parameters and video filters only change the video stream (ofps in the container level), they don't affect audio or subtitles.