fields_g
24th August 2005, 08:17
As many others have found over the past years, I recently discovered the "joy" of encoding mixed / Hybrid / VFR (variable frame rate) sources. I'm going to highlight my procedure to get this from a DVD to a MKV container by leaving it hybrid and without conversion to 23.976, 29.97, or 120 fps. Since I'm just starting a large conversion project, I'd like to have comments on the procedure I have devised and help with video encoding settings.
Here's what I'm doing:
1) DVD Decrypter 3.5.4.0
Individually Rip Each episode
Stream process to remove AC3 2.0 right away.
2) DGIndex (1.4.0, 1.4.1rc1 doesn't work with TIVTC 0.9.9.7)
Create AC3 file
Honor pulldown
3) AVISynth 2.55 with TIVTC 0.9.9.7 plugins
Create two AViSynth scripts
First Script
mpeg2source("E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v")
tfm(d2v="E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v",output="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt")
tdecimate(mode=4,tcfv1=false,output="E:\NEXTGEN\VIDEO_TS1-1\ep1-tdec.txt")
# this next line assumes the source is dvd 720x480
# and crops it down to 32x32 to save processing time
# since we're only interested in letting tfm/tdecimate
# gather info and not the actual result
crop(344,224,-344,-224)
Second Script
mpeg2source("E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v")
tfm(d2v="E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v",input="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt")
# If your source is not anime or cartoon then add
# vfrDec=0 into the line below
tdecimate(mode=5,hybrid=2,tcfv1=false,vfrDec=0,input="E:\NEXTGEN\VIDEO_TS1-1\ep1-tdec.txt",tfmIn="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt",mkvOut="E:\NEXTGEN\VIDEO_TS1-1\ep1-timecodes.txt")
4) VirturalDubMod 1.5.10.1 (or any other script playing program)
Play First Script (disabling input window speeds process greatly)
Close Program
5) MEGUI
Audio
Encode AC3 to MP4 5.1 HE AAC, Normal, Quality
Video
Input Second Script
Use Bitrate calculator (load created MP4 audio and select 1/2 CD)
Configure video (also verify bitrate setting)
MEGUI x264 config Main page:
Mode: Turbo Automated 2pass
Bitrate 1081
Keyframe Interval 250
# of Ref Frames 8
# of B-Frames 4
B-Frame options Pyramid Adaptive
Deblocking Filter
Alpha Deblocking 0
Beta Deblocking 0
CABAC
Subpixel Refinement 6
Weighted Prediction
Chroma ME
Macroblock Options All
AVC Profiles High
MEGUI x264 config Advanced page:
Min Quant 10
Max Quant 51
Max Quant Delta 1
Credits Quant 40
Factor between I and P 1.4
Factor Between P and B 1.3
Chroma QP offset 0
VBV Buffer Size (undefined)
VBV Max Bitrate (undefined)
VBV Internal buffer 0.9
Bitrate Variance 1.0
Quant Compression 0.6
Temp Blur of est Frame complexity 20
Tem blur of Quant after CC 0.5
SCD Sensitivity 40
B-Fame bias 0
B-frame mode Temporal
ME Algo Multi hex
ME range 16
Nb. Threads 1
Min GOP size 20
SAR (undefined) x (undefined)
fourCC x264
Encode as MP4 file
6) MMG (part of Mkvtoolnix 1.5.5)
Merge MP4 Audio, MP4 Video and timeframe file (under Video Stream)(Subs and Chapters?)
Play and Enjoy
QUESTIONS SECTION:
---------------------
Is there some automated way (without manually separating film and video segments and recombining) to make a hybrid AVC MP4? Would someone be interested in making such a tool? I believe that future hardware will require such a container to play these files and would rather use mp4 instead of repakaging to mp4 later.
Is there a way to have MEGUI to play the first script using the encoding function to eliminate the need to manually running everything thing through VirtualDubMod before MEGUI?
I've been looking for suggestions for MEGUI x264 configs. Could someone make some specific MEGUI suggestions (preferably for a 1050 to 1100 kbit video bitrate (45 minutes with 192 kbit audio on 1/2 CD)). Encoding speed not much of a concern (within reason), but quality and the ability to decode 2500 or greater processor and future mp4 hardware is.
Any other comments would be appreciated!
References:
http://www.avisynth.org/VariableFrameRateVideo#create-vfr-mkv
http://forum.doom9.org/showthread.php?t=98247
TIVTC Documents
Here's what I'm doing:
1) DVD Decrypter 3.5.4.0
Individually Rip Each episode
Stream process to remove AC3 2.0 right away.
2) DGIndex (1.4.0, 1.4.1rc1 doesn't work with TIVTC 0.9.9.7)
Create AC3 file
Honor pulldown
3) AVISynth 2.55 with TIVTC 0.9.9.7 plugins
Create two AViSynth scripts
First Script
mpeg2source("E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v")
tfm(d2v="E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v",output="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt")
tdecimate(mode=4,tcfv1=false,output="E:\NEXTGEN\VIDEO_TS1-1\ep1-tdec.txt")
# this next line assumes the source is dvd 720x480
# and crops it down to 32x32 to save processing time
# since we're only interested in letting tfm/tdecimate
# gather info and not the actual result
crop(344,224,-344,-224)
Second Script
mpeg2source("E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v")
tfm(d2v="E:\NEXTGEN\VIDEO_TS1-1\episode1-1.d2v",input="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt")
# If your source is not anime or cartoon then add
# vfrDec=0 into the line below
tdecimate(mode=5,hybrid=2,tcfv1=false,vfrDec=0,input="E:\NEXTGEN\VIDEO_TS1-1\ep1-tdec.txt",tfmIn="E:\NEXTGEN\VIDEO_TS1-1\ep1-tfm.txt",mkvOut="E:\NEXTGEN\VIDEO_TS1-1\ep1-timecodes.txt")
4) VirturalDubMod 1.5.10.1 (or any other script playing program)
Play First Script (disabling input window speeds process greatly)
Close Program
5) MEGUI
Audio
Encode AC3 to MP4 5.1 HE AAC, Normal, Quality
Video
Input Second Script
Use Bitrate calculator (load created MP4 audio and select 1/2 CD)
Configure video (also verify bitrate setting)
MEGUI x264 config Main page:
Mode: Turbo Automated 2pass
Bitrate 1081
Keyframe Interval 250
# of Ref Frames 8
# of B-Frames 4
B-Frame options Pyramid Adaptive
Deblocking Filter
Alpha Deblocking 0
Beta Deblocking 0
CABAC
Subpixel Refinement 6
Weighted Prediction
Chroma ME
Macroblock Options All
AVC Profiles High
MEGUI x264 config Advanced page:
Min Quant 10
Max Quant 51
Max Quant Delta 1
Credits Quant 40
Factor between I and P 1.4
Factor Between P and B 1.3
Chroma QP offset 0
VBV Buffer Size (undefined)
VBV Max Bitrate (undefined)
VBV Internal buffer 0.9
Bitrate Variance 1.0
Quant Compression 0.6
Temp Blur of est Frame complexity 20
Tem blur of Quant after CC 0.5
SCD Sensitivity 40
B-Fame bias 0
B-frame mode Temporal
ME Algo Multi hex
ME range 16
Nb. Threads 1
Min GOP size 20
SAR (undefined) x (undefined)
fourCC x264
Encode as MP4 file
6) MMG (part of Mkvtoolnix 1.5.5)
Merge MP4 Audio, MP4 Video and timeframe file (under Video Stream)(Subs and Chapters?)
Play and Enjoy
QUESTIONS SECTION:
---------------------
Is there some automated way (without manually separating film and video segments and recombining) to make a hybrid AVC MP4? Would someone be interested in making such a tool? I believe that future hardware will require such a container to play these files and would rather use mp4 instead of repakaging to mp4 later.
Is there a way to have MEGUI to play the first script using the encoding function to eliminate the need to manually running everything thing through VirtualDubMod before MEGUI?
I've been looking for suggestions for MEGUI x264 configs. Could someone make some specific MEGUI suggestions (preferably for a 1050 to 1100 kbit video bitrate (45 minutes with 192 kbit audio on 1/2 CD)). Encoding speed not much of a concern (within reason), but quality and the ability to decode 2500 or greater processor and future mp4 hardware is.
Any other comments would be appreciated!
References:
http://www.avisynth.org/VariableFrameRateVideo#create-vfr-mkv
http://forum.doom9.org/showthread.php?t=98247
TIVTC Documents