I'm curious how audio encoding works with the script below? Ideally I just want to copy the audio track into the new MKV file. Does this script do that? I'm having a hard time understanding how it works. Also, Do I need use AssumeTFF/BFF with QTGMC?
SetFilterMTMode("FFMPEGSource2", 3)
SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode ("QTGMC", 2)
FFMPEGSource2("name.mkv", atrack=1)
AssumeTFF()
QTGMC(preset="Placebo", EdiThreads=3, NoiseProcess=0)
BicubicResize(768,576,0,0.75)
Crop(0, 4, 0, 570)
+ Reply to Thread
Results 1 to 9 of 9
-
-
You can do this with MkvToolNix, without scripts or encodings.
-
Whenever you process video or audio with Avisynth, it gets decompressed "on-the-fly", then transmitted as-is (as "virtual" uncompressed data) to whatever program does the editing / encoding. So the audio that comes out of Avisynth is uncompressed PCM, it's no longer the compressed format which was in the source, even if no audio processing was done, so it would have to be re-compressed at the encoding stage (which degrades the quality).
But as mentioned above, you can process the video as required, then mux the untouched audio with the processed video output. In which case you can use FFVideoSource() which only processes the video stream. If you don't use any filter that changes the framerate or removes frames, it should stay synchronized.
As far as I know (never actually tested it) the "Placebo" preset is very intensive / slow and barely better than the one before, "Very slow", which already yields a very high quality deinterlacing (even at "Medium" preset QTGMC is much better than the likes of Yadif, albeit slower). Someone may chime in to provide a more in-depth explanation.
If it's a straight rip from a standard PAL DVD in 720x576, then there's little point in resizing to 768x576, unless the output has to be played on a device which doesn't support anamorphic encoding / non-square pixels. The resizing causes a loss of sharpness (which can be visually compensated by using a "sharp" resizer like BicubicResize) and a higher bitrate requirement to get a similar subjective quality.
Also, I don't quite understand what "Crop(0, 4, 0, 570)" is supposed to accomplish...
Did you RTFM, and/or preview the result with VirtualDub2 or AVSPMod ? -
The video off the DVD is at 720x576 and you're right it is anamorphic as it plays at 768x576. However if I don't add the BicubicResize(768,576,0,0.75) the end result is square pixels at 720x576. again, that is using this script:
SetFilterMTMode("FFMPEGSource2", 3)
SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode ("QTGMC", 2)
FFMPEGSource2("name.mkv", atrack=1)
AssumeTFF()
QTGMC(preset="Placebo", EdiThreads=3, NoiseProcess=0)
BicubicResize(768,576,0,0.75)
Crop(0, 4, 0, 570)
Am I doing something wrong? Is there a way to keep the non-square pixels while encoding?
P.S. To answer your question about the cropping. It's to trim some artifacts out of the video. I also am using Placebo as I'm using Topaz Video Enhance to upscale after I QTGMC. -
Since avisynth works only with the raw pixels, it is ignorant of the aspect ratio. Pass it through, aka do NOTHING to the scale/size or cropping. Then use an encoder that supports anamorphic encoding (many do), and explicitly tell it to encode with the AR of the source (in this case, sounds like that would be 4:3).
No need to resize & crop something you are going to be resizing again later, that just compounds the error.
Scott -
Depends. Some encoders set the AR flag in the video stream (when applicable to format). But one can also set an AR flag in the container (depending on format). This last is what MKVtoolnix is doing.
Some players respond to one, or to the other, or to both, or to neither. And if both, they may not be consistent as to which takes priority (likely should be the video stream).
Scott -
Similar Threads
-
x264 encoding questions
By Fraugster in forum EditingReplies: 6Last Post: 27th Aug 2019, 21:55 -
MVC encoding questions and Ripbot264....request?
By tommy2010 in forum Video ConversionReplies: 0Last Post: 1st Feb 2018, 21:04 -
Film frame rate/ Audio sync questions
By mediaman083 in forum Newbie / General discussionsReplies: 17Last Post: 25th Jan 2018, 10:11 -
Panasonic DMR-EZ485V audio and counter questions
By pamelajaye in forum DVD & Blu-ray RecordersReplies: 0Last Post: 14th Jul 2017, 14:56 -
Basic questions about video editors, converters and encoding
By XenonS in forum Newbie / General discussionsReplies: 3Last Post: 9th Oct 2015, 18:01