View Single Post
Old 2006-10-28, 03:07   Link #576
Kurth
Junior Member
 
Join Date: Mar 2006
Well to reencode MKV or MP4 files that contain VFR video streams or even CFR you can just use this AviSynth command on a simple script and open this AviSynth Script on VirtualDub that everything will run fine.

MKV:
DirectShowSource("C:\video.mkv", fps=23.976, convertfps=true)

MP4:
DirectShowSource("C:\video.mp4", fps=23.976, convertfps=true)

You need to put on the script the exact FPS that this MKV or MP4 file have you can identify this FPS information using the Software MediaInfo.
http://www.free-codecs.com/Media_Info_download.htm

Convertfps=true is used to convert VFR stream to CFR stream.

This script will open fine on VirtualDub and you can reencode the video and audio stream on VirtualDub without any problems. (Just write the AviSynth script correctly)

You used Convertfps=true so now the AVI file with XviD/MP3 that you are going to encode on VirtualDub will have Constant Framerate.

Just some maybe useless info
When I reencode Raw Anime files with 120 FPS I use this simple command to convert from 120 FPS to 23.976 FPS.
TDecimate(cycleR=4)

Simple example:
AviSource("C:\video.avi")
TDecimate(cycleR=4)

Open this on VirtualDub and the file will have now 23.976 FPS.

Encoding subtitle on video surface is easy you just need to use this command and you need the file VSFilter.dll that you can find on your computer after installing VobSub or DirectVobSub.

LoadPlugin("C:\Program Files\directvobsub\VSFilter.dll")
TextSub ("C:\subtitle.ass")

This way your subtitle will be encoded as HardSub.

I like to use SoftSubs so I mux my SSA or ASS subtitle with the MKV container and put inside the MKV file the subtitle fonts that I used and everything will run fine on the other users computers.

Reencoding MKV and MP4 files is very easy using AviSynth with VirtualDub.

AviSynth For The Win
Kurth is offline   Reply With Quote