I have a guide on how to make a compliant resolution mpeg2 file using ffmpeg from a non-compliant resolution mkv file. I found out how to do this by searching through many posts on the subject, so I do not take credit for the methods involved. There may even be better ways using the tools involved, but this is what has worked for me. I do not know how to add subtitles or chapter stops into the resulting file, maybe somebody can add a comment on that later.![]()
You will need the various tools:
1. Make sure you have the latest Matroska Pack installed.
2. You will need to have WinFF and Avisynth installed.
3. DGPulldown
4. A program that can demux and remux mpeg2 files
The first thing you need to determine is how much resolution needs to be made up for. 1920x1080 is a valid HD resolution, as is 1440x1080 and 1280x720. If you have a video file that has a resolution of 1920x816, you need to subtract 1080-816 (which would equal 264). You would then divide that number in half (in this case 132), this is going to be the amount of top and bottom borders we will add in avisynth. These numbers are going to come into play in your Avisynth script. Here's a sample script I use:
DirectShowSource("D:\movie.mkv", fps=25.00, audio=false)
AddBorders(0, 132, 0, 132)
LanczosResize(1920,1080)
Copy and paste this script into notepad and save it with a name as an .avs file. You will need to change a few things in your script; name and location of movie, frames per second, and the amount of resolution needed in the AddBorders line.
You can use a program like mkvextract to demux your audio file from the mkv file, we will need this for later.
Open the Command Promt from the Windows Start Menu, and copy and paste this command line;
"C:\Program Files\WinFF\ffmpeg.exe" -i "D:\file folder\script.avs" -vcodec mpeg2video -sameq -acodec copy -f vob -copyts -y "d:/video.mpg"
The only things you need to alter in this command line are the name of the folder your .avs script is in and the name of the .avs script. After a while (about 7 hours for a 2 hour movie on my 2.66ghz computer) you will have a transcoded mpeg2 file of your source file. If the command line did not work properly, you may not have installed the Matroska Pack correctly. You will need to demux the file (even though there really is no audio present in the file) to a mpeg2 ES stream using a mpeg2 demuxing program.
After you have a mpeg2 ES file (.m2v or equivalent) you will need to perfrom a 3:2 pulldown using DGPulldown. Use the appropiate option given the fps of your file to pulldown to 29.97 fps. After you have obtained a file, you can then remux it using the original audio track from your source mkv file. After that you may have to split the file if you want it to fit on blank DVD's, but you will now have a compliant mpeg2 file ready to be authored on HD-DVD.
Happy transcoding!
+ Reply to Thread
Results 1 to 2 of 2
-
-
For those to whom it may concern, I realized you can eliminate a step by just changing the last part of the command line from;
"C:\Program Files\WinFF\ffmpeg.exe" -i "D:\file folder\script.avs" -vcodec mpeg2video -sameq -acodec copy -f vob -copyts -y "d:/video.mpg"
to;
"C:\Program Files\WinFF\ffmpeg.exe" -i "D:\file folder\script.avs" -vcodec mpeg2video -sameq -acodec copy -f vob -copyts -y "d:/video.m2v"
which will give you an elementary video stream ready to be muxed to an ac3 file (after the pulldown of course).
Similar Threads
-
Converting MKV to DVD compliant file
By carlmart in forum Video ConversionReplies: 18Last Post: 15th Apr 2011, 11:51 -
having troubles muxing to a compliant Xbox 360 MP4 file
By deltaboy in forum Video ConversionReplies: 2Last Post: 29th Jun 2010, 12:54 -
Anyway to make a non compliant disc compliant?
By zanos in forum Authoring (DVD)Replies: 9Last Post: 23rd Feb 2008, 10:46 -
mkv to xbox360 compliant .mp4
By wallace4793 in forum Video ConversionReplies: 1Last Post: 26th Jun 2007, 14:13 -
Making a compliant DVD for settop players?
By hopealaska in forum Video ConversionReplies: 5Last Post: 6th May 2007, 18:08