Avisynth_challenged
2nd January 2012, 19:43
Happy New Year, fellow D9F members. Been away from Avisynth for a while, but a small project emerged this week.
The source:
1280x720 @59.94p HD MPEG2 film-based source from ATSC broadcast
The goal:
720x480 @23.976p SD MPEG2 film-based encode, soft telecined to 29.97i (target media = DVD)
The workflow (up to Avisynth usage):
- Edit raw HD MPEG2 source to remove commercials (Videoredo)
- Save edited HD MPEG2 as elementary streams (.m2v/.ac3)
- Run DGIndex on .m2v, save as .d2v project
- Load edited .m2v HD MPEG2 file into Avisynth (v2.57 on WinXP Pro 32-bit SP3 system) via DGDecode
- Output to YUY2 Huffyuv intermediate AVI file
Here is my proposed .avs script:
# These lines call the plugins required for IVTC
LoadPlugin("C:\program files\avisynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\program files\avisynth 2.5\plugins\decomb.dll")
############
# This line loads the MPEG source
MPEG2Source("HD_MPEG2edit.d2v")
############
# This line invokes the IVTC command for 720p source
SelectEvery(2,0)
Decimate(cycle=5)
############
ColorMatrix(mode="Rec.709->Rec.601" , clamp=false)
############
spline36resize(704,480).addborders(8,0,8,0)
############
# This line converts from MPEG2 YV12 to YUY2
converttoyuy2()
############
The final conversion to YUY2 is to prepare the intermediate AVI for SD MPEG2 encoding via CCE 2.70.
What does everyone here think of the overall plan, particularly the HD -> SD conversion via the AVS script presented above? Thanks in advance.
The source:
1280x720 @59.94p HD MPEG2 film-based source from ATSC broadcast
The goal:
720x480 @23.976p SD MPEG2 film-based encode, soft telecined to 29.97i (target media = DVD)
The workflow (up to Avisynth usage):
- Edit raw HD MPEG2 source to remove commercials (Videoredo)
- Save edited HD MPEG2 as elementary streams (.m2v/.ac3)
- Run DGIndex on .m2v, save as .d2v project
- Load edited .m2v HD MPEG2 file into Avisynth (v2.57 on WinXP Pro 32-bit SP3 system) via DGDecode
- Output to YUY2 Huffyuv intermediate AVI file
Here is my proposed .avs script:
# These lines call the plugins required for IVTC
LoadPlugin("C:\program files\avisynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\program files\avisynth 2.5\plugins\decomb.dll")
############
# This line loads the MPEG source
MPEG2Source("HD_MPEG2edit.d2v")
############
# This line invokes the IVTC command for 720p source
SelectEvery(2,0)
Decimate(cycle=5)
############
ColorMatrix(mode="Rec.709->Rec.601" , clamp=false)
############
spline36resize(704,480).addborders(8,0,8,0)
############
# This line converts from MPEG2 YV12 to YUY2
converttoyuy2()
############
The final conversion to YUY2 is to prepare the intermediate AVI for SD MPEG2 encoding via CCE 2.70.
What does everyone here think of the overall plan, particularly the HD -> SD conversion via the AVS script presented above? Thanks in advance.