+ Reply to Thread
Results 31 to 54 of 54
-
I am wanting to make these videos the best possible quality of progressive, not interlace. So minor degradation is fine if it means the outcome is progressive (i am using QTGMC).
Is there any quicker way of deinterlacing with QTGMC?
I am running the avs script through x264 command line using the setting preset=ultrafast but even at ultra fast its only going at 10 fps. 2 hours encoding for 20min video seems pretty time consuming considering the workload, its going to take months.
So is this a normal speed?
Its not my CPU (i5) keeping it slow as its only running at 39%.
I did try re-encoding to the same (huffyuv) using vdub, but that was going to take even longer. -
QTGMC has its own presets. A lot of people use QTGMC(preset="superfast") for faster processing. The quality isn't as good but probably not a significant difference with your blurry source like yours.
With a multicore CPU you can use a multithreaded build of AviSynth. On my quad core i5 2500K, a simple script like:
Code:SetMtMode(5,6) # mode 5, 6 threads AviSource("D:\Downloads\sample.avi") SetMtMode(2) # switch to mode 2 AssumeTFF() ColorYUV(gain_y=200, off_y=-68, gamma_y=150, cont_u=100, cont_v=400) ConvertToYV12(interlaced=true) QTGMC(preset="super fast")
-
So does that mean i need to uninstall avisynth 2.6 and install the MT version?
Do i need to change/update any plugins or will they all work just the same?
Is this the correct version...
http://avisynth.nl/index.php/MT -
I think this is the build I'm using: http://forum.doom9.org/showthread.php?t=148782
You just replace the avisynth.dll to your SYSWOW64 folder with that one. I renamed the single threaded version avisynth.dll.single so it isn't lost. There can be problems with the multithreaded version so occasionally, I switch back to the single threaded version.
Some plugins might require updates. But if you just installed AviSynth and all the plugins required by QTGMC you probably have MT capable versions. -
Well that sounds easy enough, thanks. I will do it now and see how it improves the speed.
EDIT: 83-85 fps. 15 minutes, much betterLast edited by VSz; 29th Nov 2016 at 09:46.
-
Just to complete the information about the multi-threaded version of AVISynth.
I use it every day and it usually gives me a 3x-4x speed improvement. However ...
... not all plugins will be "happy" with the brilliant, but ultimately kludgy, hack that lets AVISynth use multiple cores to increase processing speed. If you get crashes, try changing the number of threads ("6" in the example above). You usually make it smaller to eliminate crashes. Much more insidious are problems where video ends up getting put back together in the wrong order. That's not exactly what happens but the problem is that many plugins were not designed to run in a multi-threaded environment and may get out of sync with other plugins, resulting in video that is processed in the wrong order. The good news is that you'll be able to tell if this happens and you will see drops, glitches, or frame repeats.
Fortunately, MVTools2 was re-designed from the earlier MVTools specifically to become multi-threaded, so it works great. -
Thanks for that info john, seems to be encoding alright at the moment though, fingers crossed.
One issue i've ran into though, the audio is PCM so the mkv encode is being produced audio-less.
Whats the best plan of action for this without losing audio quality? WAV? -
You can mux your original PCM audio into the MKV. Or compress it to AC3, AAC, MP3, whatever. All of those sound decent with high enough bitrates.
Regarding multithreaded AviSynth: With some encoders/editors it's necessary to add Distributor() to the end of your MT AVS script -- otherwise you won't get maximum throughput. It's not necessary with x264 CLI or VirtualDub. If I recall correctly, it is necessary with HcEnc. -
Could do FLAC for lossless compression or maybe something like lossly (>192kbps) AAC for compatibility and smaller size.
-
Originally Posted by jagabo
Originally Posted by jagabo
Originally Posted by KarMa
Is it possible to direct stream the audio with x264/avisynth, like you can with vdub?Last edited by VSz; 29th Nov 2016 at 17:37.
-
Correct. When using x264, if you add Distributor() to the script it will run a little slower. In effect x264 is already doing what Distributor() does.
No. But you can simply mux your original audio with the new video with Mkvtoolnix as a separate step.Last edited by jagabo; 29th Nov 2016 at 19:51.
-
Yes, i was trying to edit my batch file and use MKVMerge command line to demux the PCM audio from the avi, and remux it back into the audio-less mkv, that way it will do it all in one fell swoop. Struggling to find a good guide on mkvmerge command line parameters/syntax for the batch file.
or would i be better off with ffmpeg than mkvmerge?Last edited by VSz; 29th Nov 2016 at 18:50.
-
Mkvtoolnix-gui shows you the command line it's using, Merge -> Show Command Line. Use that as a guide.
-
Thanks for that heads up jagabo but i ended up writing a batch using ffmpeg instead of using MKVToolNix.
This is my input and output file after running the batch, does everything seem ok to you?
Is there any reason why the output doesnt show bitrates?
INPUT AVI
General
Complete name : sample.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 22.4 MiB
Duration : 4s 160ms
Overall bit rate : 45.2 Mbps
Video
ID : 0
Format : Huffman
Codec ID : HFYU
Duration : 4s 160ms
Bit rate : 43.1 Mbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
Frame rate : 25.000 fps
Standard : PAL
Color space : RGB
Bit depth : 8 bits
Bits/(Pixel*Frame) : 4.157
Stream size : 21.4 MiB (95%)
Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 4s 125ms
Bit rate mode : Constant
Bit rate : 1 536 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 773 KiB (3%)
Alignment : Aligned on interleaves
Interleave, duration : 25 ms (0.63 video frame)
General
Unique ID : 304562112812480320580176039339927847810 (0xE520878025FFCA38122E65641974C382)
Complete name : sample.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 4.93 MiB
Duration : 4s 160ms
Overall bit rate : 9 941 Kbps
Writing application : Lavf57.56.100
Writing library : Lavf57.56.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : V_MPEG4/ISO/AVC
Duration : 4s 160ms
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
Frame rate mode : Constant
Frame rate : 50.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 148 r2705 3f5ed56
Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=15.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0
Language : English
Default : Yes
Forced : No
Matrix coefficients : BT.709
DURATION : 00:00:04.160000000
Audio
ID : 2
Format : PCM
Codec ID : A_PCM/INT/LIT
Duration : 4s 160ms
Bit rate mode : Constant
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Default : No
Forced : No
DURATION : 00:00:04.125000000Last edited by VSz; 29th Nov 2016 at 21:25.
-
I'd use a slower preset for x264. Try "veryfast" -- that will give you much more compression at similar quality without taking too much longer. I usually use "slow" for SD video. It retains more grain, preventing posterization.
Check your final file of audio/video sync. -
Originally Posted by jagabo
Originally Posted by jagabo
So other than that, does the output look good to go would you say? -
I just noticed that you encoded with rec.709 colors. I guess you got that from my batch file. I just copied and pasted form the batch file I was using (not for your video) at the time. I should have changed that to "--colormatrix bt470bg" before posting. You will get the wrong colors on playback unless you used ColorYUV(mode="rec.601->rec.709") in your AVS scrip to convert to rec.709. SD is normally rec.601 so I'd keep it that way.
https://forum.videohelp.com/threads/329866-incorrect-collor-display-in-video-playback?p...=1#post2045830
Also you should either resize to a frame size that's 4:3 (eg 768x576) or specify the correct SAR when you encode. Use "--sar=12:11" for PAL SD caps. -
Ok, thanks for that. My new output now reads:
General
Unique ID : 313083486400151820857942783610535196891 (0xEB89AFA7DCAB17B4493E96C34B46B8DB)
Complete name : sample.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 7.15 MiB
Duration : 4s 160ms
Overall bit rate : 14.4 Mbps
Writing application : Lavf57.56.100
Writing library : Lavf57.56.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 4s 160ms
Width : 768 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 148 r2705 3f5ed56
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=12.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
Language : English
Default : Yes
Forced : No
Matrix coefficients : BT.601
DURATION : 00:00:04.160000000
Audio
ID : 2
Format : PCM
Codec ID : A_PCM/INT/LIT
Duration : 4s 160ms
Bit rate mode : Constant
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Default : No
Forced : No
DURATION : 00:00:04.125000000
(i also changed the crf to 12 and the preset to superfast from ultrafast)
(btw, not all my captured videos are this poor quality, this is the very worst vhs, which is why i am starting with it)Last edited by VSz; 30th Nov 2016 at 10:07.
-
Would 640x480 be better than 768x576, i know its a smaller resolution, but surely a larger resolution than i captured at would look worse.
Or even 720x540. -
I prefer to keep the original frame size and use aspect ratio flags to tell the player how to display the frame. When I do resize I like to retain all the vertical resolution. A small upscale of fuzzy VHS video isn't going to hurt it. You'll typically be watching the videos full screen so they're going to be upscaled by the player again anyway.
-
So if i don't want to use the aspect ratio flags method, i should stick with upscaling to 768x576?
Is that the general consensus or just your personal preference. -
Analog PAL video consists of 576 discreet scan lines. By keeping the height at 576 you keep those original scan lines. If you downsize to 720x540 you loose a little of the vertical resolution, even more if you downsize to 640x480. If the video isn't very sharp vertically that may not matter. But if it is sharp you may start seeing the loss of resolution during playback. And resizing by small amounts can lead to moire artifacts when there are sharp, closely spaced lines.
-
Ok, well i kept the height and LanczosResized to 768x576.
After a while of trying different things and trying to learn avisynth, this is what i have so far...
(video file attached)
The filters i have used are as follows:
McTemporalDenoise(settings="medium", interlaced=true)
Tweak(sat=0.3, startHue=290, endHue=004)
Tweak(sat=1.9)
ColorYUV(gain_y=190, cont_y=90, off_y=-30)
Where else could i take this? it looks better that the original but i think its still quite off, i just dont know what else to do.
Baring in mind i'm only just learning avisynth, what suggestions, tips or advice would you give me on this?
Similar Threads
-
Is this an interlacing issue?
By bvdd in forum Newbie / General discussionsReplies: 51Last Post: 22nd Mar 2016, 17:12 -
Interlacing question(s) during capture
By Steeleye in forum Capturing and VCRReplies: 11Last Post: 12th Aug 2013, 05:55 -
VHS Capture issue with Hauppage WinTV-HVR-2250
By Finkswitch in forum Capturing and VCRReplies: 37Last Post: 6th Jun 2013, 20:42 -
VHS to DVD conversion, interlacing is good?
By Xantham in forum RestorationReplies: 4Last Post: 6th Aug 2012, 21:58 -
VHS to Canopus ADVC 110 Firewire capture -- Horizontal field issue?
By sheenman in forum Capturing and VCRReplies: 6Last Post: 27th Jun 2012, 07:04