09-12-2015, 08:47 AM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Hi,
Due to the inactivity in another of my post, I'm starting a new one. Please don't get me wrong by doing so. If you don't agree with this, please admin, remove my post.
This being said, here are my goals and actual issues.
I got everything setup. I captured videos from 8mm tapes from camcorder using virtualdub and lagarith.
Now I'm into avisynth and QTGMC.
I would like good video playback on a computer (I will probably keep unprocessed files as archive, in case I would like TV playback someday). From readings and your suggestions..
From other post...
Quote:
For the deinterlacing, it seems like you're saying you put the script into VirtualDub and created an AVI output using Fast Recompress, then encoded that using x264. You don't need to do that; you can feed the Avisynth script straight into x264.
x264 + MP3 is a weird combination. x264 + AAC would be the typical configuration, and AAC is a more efficient audio compressor.
|
I concluded X264 and AAC would be a good way to go, done in my Avisynth script along with QTGMC. (Unless you recommend something else!)
Is that possible? To sum up, I'd like to take my "uncompressed" Lagarith captured avi file and get to the desired result, in 1 operation done in a script.
Though, actually before getting there I have 2 issues:
1-I get green screen/no video but sound after going through qtgmc in virtualdub (with avisynth script). What might be the issue?
Here is the script
AVISource("01.avi")
crop(10,0,-6,-6).AddBorders(8,2,8,4)
AssumeTFF()
QTGMC()
In VirtualDub, I use fast recompress for video, and direct stream copy for audio.
2-Concerning sound, I only get sound from 1 channel (sound coming out from one speaker only). How can I duplicate mono sound to both channels at the same time?
Thanks in advance
PS: Here is the original post: http://www.digitalfaq.com/forum/vide...#ixzz3lX1IZn8C
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
09-12-2015, 09:10 AM
|
|
Free Member
|
|
Join Date: Aug 2015
Posts: 7
Thanked 1 Time in 1 Post
|
|
Do you see video in the virtualdub after opening that script?
|
09-12-2015, 09:21 AM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
If I open the captured file directly (no script), everything is fine, and it is smooth as butter. When I open the script in VirtualDub, I can see the video too, the framerate is very slow, but eveything is ok (I think it is normal to be slow because of QTGMC).
Though, after fast recompress, I get nothing but sound.
|
09-12-2015, 09:56 AM
|
|
Free Member
|
|
Join Date: Aug 2015
Posts: 7
Thanked 1 Time in 1 Post
|
|
If you see picture in virtualdub - then your script is working without any issues.
Probably you're saving uncompressed video and having issues with that. Or you're selecting Lagarith for compression? Or you're trying to use x264vfw?
Anyway, to encode with x264 you will have to use either x264 itself (it's a video encoder, it can't encode audio - you'll need to encode it separately) or ffmpeg (it can do anything) or any GUI that uses them (like MeGUI). Probably MeGUI route will be easier if you're not into using command-line tools.
As for audio - if audio will be processed using avisynth - it has GetChannel filter (it will turn 1 channel into mono).
ffmpeg (if you'll use it for encoding audio) also can manipulate audio.
|
09-12-2015, 10:13 AM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
I capture directly from camcorder using lagarith, which gives me an interlaced avi (about 50Gb)
Then I import this avi file using the script mentionned previously in Vdub. After fast recompress, this is where I get no video in any media player or green screen in VDub.
I don't mind adding a separate step to use x264 if this is the way to proceed usually. I'll study this later as I want to rule out the issue I have first.
Thanks again!
|
09-12-2015, 10:41 AM
|
|
Free Member
|
|
Join Date: Aug 2015
Posts: 7
Thanked 1 Time in 1 Post
|
|
When you're processing video it doesn't matter how it was encoded before processing - virtualdub (and any other tool) gets uncompressed video from avisynth. It's not modifying original file, or trying to use same codec or anything - it knows nothing about it.
"Fast recompress" simply tells virtualdub to not perform any colorspace conversion (in other modes it converts video into RGB which is terrible idea). It doesn't affect encoding (compression) settings (except direct stream copy mode, which should result in uncompressed video).
For saving result it will use selected codec (in video->compression). By default it uses it's own "uncompressed" codec. It's kinda very broken, as you can see. If you select Lagarith there (for example) it should work fine.
|
09-12-2015, 11:05 AM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,319 Times in 989 Posts
|
|
Isn't your input video YUY2? For most popular formats, h264 is encoded as YV12.
To use one audio channel and convert to mono in both channels:
Code:
vid=AVISource("01.avi")
monoaud=vid.GetChannel(1) # <--- channel 1 = left, channel 2 =right
newaudio=mergechannels(monoaud,monoaud)
AudioDub(vid,newaudio)
crop(10,0,-6,-6).AddBorders(8,2,8,4)
ConvertToYV12(interlaced=true)
AssumeTFF()
QTGMC()
return last # <--- this line must be included as last in the script
Why are you leaving this video deinterlaced? Deinterlaced = double the full-frame playback rate, double the number of frames, and file size increase (about 2X for the same colorspace).
PC media players deinterlace on the fly the same way your TV does, except for VLC. By default VLC doesn't deinterlace. Go into VLC "Tools" -> "Preferences" -> "Video" and turn it on permanently. Set deinterlacing to "Automatic", set "Mode" to Bob or yadif. If the video isn't interlaced, this setting does nothing.
Last edited by sanlyn; 09-12-2015 at 11:27 AM.
|
09-12-2015, 11:52 AM
|
|
Free Member
|
|
Join Date: Aug 2015
Posts: 7
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by sanlyn
Deinterlaced = double the full-frame playback rate, double the number of frames, and file size increase (about 2X for the same colorspace).
|
In interlaced video fields are less correlated than normal frames in progressive video. Keeping all that aliasing is a nightmare for video encoder.
It's not number of frames that is increased (fields in interlaced video are basically normal progressive frames), it's a vertical resolution.
Effective deinterlacer works like this:
1) Separate fields
2) Double vertical resolution of each field (bob), using highest quality upscaler (nnedi)
3) Copy details from surrounding frames
In fact it's a so-called super resolution filter (filter that increases resolution using information from several frames).
So, while resolution was increased consecutive frames now share same details - which really helps video encoder.
In fact when using effective video encoder (x264) deinterlaced video is even better compressible than interlaced.
Quote:
Originally Posted by sanlyn
PC media players deinterlace on the fly the same way your TV does, except for VLC. By default VLC doesn't deinterlace. Go into VLC "Tools" -> "Preferences" -> "Video" and turn it on permanently. Bob or yadif are the popular method choices. If the video isn't interlaced, this setting does nothing.
|
Yeah, they do. Compared to QTGMC their quality is ranging from terrible (yadif) to bad (TVs, HW/DXVA deinterlacing). Even for TV playback deinterlacing is a good idea.
|
09-12-2015, 01:05 PM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Quote:
For saving result it will use selected codec (in video->compression). By default it uses it's own "uncompressed" codec. It's kinda very broken, as you can see. If you select Lagarith there (for example) it should work fine.
|
I'm doing the test atm. I missed that! So am I wrong if I say that I could have simply capture using uncompressed video, and the process the captured file using the avisynth script and choose Lagarith for video compression?
Quote:
Isn't your input video YUY2? For most popular formats, h264 is encoded as YV12.
|
I'm not really aware of what is good (popular) and what is not. So thanks for this advice!
Thanks for the sript Sanlyn! Quick question though, Could I choose YV12 in the Lagarith options instead of integrating the conversion in the script?
Quote:
Why are you leaving this video deinterlaced? Deinterlaced = double the full-frame playback rate, double the number of frames, and file size increase (about 2X for the same colorspace).
|
Quote:
Yeah, they do. Compared to QTGMC their quality is ranging from terrible (yadif) to bad (TVs, HW/DXVA deinterlacing). Even for TV playback deinterlacing is a good idea.
|
I'm on Vivian's side on this. I tried interlaced video on pc software but results were not very good (unless you suggest me of a good deinterlaceing software ). I think QTGMC quality is much better. As for the file size, after going through qtgmc, the file goes from 50Gb to 500Mb roughly (if I did nothing wrong) so personally, I don't have an issue with that.
As said, I'm testing something on a file now. I'll let you know about the output!
Thanks for the support
|
09-12-2015, 01:52 PM
|
|
Premium Member
|
|
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,648
Thanked 1,319 Times in 989 Posts
|
|
If you don't know what color system you're using to capture, you should take the time to look up info about that -- or at least know how you've set up your capture.
The colorspace you use when capturing and processing VHS and the colorspace used when encoding don't have to be the same. VHS is captured to YUY2 because that colorspace is more "like" the YPbPr matrix used to store VHS data, so the captured luma and chroma data more faithfully resembles the original tape. Eventually encoding goes into YV12 for most popular formats (DVD, BluRay, AVCHD, mp4, mkv, etc.). You can convert colorspaces when needed, but I'd let Avisynth do it -- most NLE's crap it up.
By default VirtualDub outputs uncompressed RGB when "full processing mode" is turned on, regardless of the color used in the input and regardless of whether or not you're running VirtualDub filters on the video. To set your own compression and colorspace, enable "full processing mode", check that "Color depth..." and "Compression..." are what you want, then enable "fast recompress". That's the safest way to get exactly what you want.
Your 50GB input went down to a tiny 500mb output file? I won't even guess how you're compressing that, but from what I've seen of the captures so far a low bitrate and long_GOP encodes will look worse than the tape.
You can still use QTGMC for cleanup, and those captures really need cleanup, but the results should be re-interlaced. This is how it's done in Avisynth:
Code:
QTGMC()
.... some processing ....
.... whatever ....
AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
Deinterlacing isn't the only way to clean up video. There are other ways to do it. QTGMC at default settings is heavy-duty cleaning and often over-filters. In your earlier captures I had to tone down the filtering somewhat, because the results were showing posterization ("clay face" effects), hard gradients along shadow edges, and block noise in backgrounds and large areas that are supposed to be smooth, like walls.
A lot of people like to run Avisynth and encode in the same step. I never do it. 85% of the time something goes screwy and I have to do it all over again. And if you include things like memory swapping during the process, things slow down anyway.
|
09-12-2015, 02:13 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,001
Thanked 2,542 Times in 2,161 Posts
|
|
Deinterlacing is almost NEVER a way to clean up video, period. Deinterlace != cleaning!
The best QTGMC use is with tweaks to the switches.
The beauty of uncompressed and lossless is that you do NOT have to process in one go. I rarely process video with a single pass. Some of the more advanced filters hate each other, and too much will simply crash Avisynth (not to mentioned Avisynth + VirtualDub). In my earlier days, I had video encode for 2 days, hit 99%, and then the project crashed -- and I had to start over.
I've not overly anal about colorspaces, but you do need to pay attention to what's going on. Sometimes a change may be harmful, thus needs to be avoided.
|
09-12-2015, 02:42 PM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Hi again,
I'm not really picky, but just want a nice video in the end.I did a quick test, and I'm happy with the result using my original script, but with using LAGARITH for video compression this time. I totally missed (forgot) the option before saving as avi.
I knew about the colorspace conversion virtualDub does (uses RGB) and that it has to be avoided, from readings. For the other colorspaces, I know the names but don't know the major differences between them nor which one are used for popular encoding.
I admit 50Gb to 500Mb is quite strange as results. I must have done something wrong.
I will follow your guide and work my files in steps. It's just sometimes I had comments like : You didn't have to do this, you could have done this in the same script" so that's why I asked if it was possible. But I understand the point that you better handle less in a few steps, than trying to do all at once.
I will now try the script sanlyn posted.
Oh and btw, I have new capture material as already mentioned in other post. The ATI capture card gives better results out of the box so lot less tweaking is necessary (well, it'S relative but for me I find it quite good!)
-- merged --
Script tested, output file is pretty good for me. I have a less than 5gb size for 5 mins of video, which sounds a little more normal at this stage.
In Vdub, after some searching, I saw that there are different settings for the capture card. I noticed they were not set to default when I did my initial capture. Attached are the real default settings.
Is eveything good? Is there a thing I could change to have better result out of the box?
There are drop down lists for other options. Here they are:
COMB FILTER
Filter: Threshold: - Adlj.Line
- Non Adj. Line
- Adj.Frame
- Motion
NOISE REDUCTION FILTER
Method: - None
- Adaptive
- Light
- Medium
- Strong
Threshold: - Luma Coring
- Adaptive cross Chroma
- Adaptive cross Luma
VOLUME
Level: 1 to 255
I set everything to default, except Shapening in the Video Proc Amp tab that I brought back to zero (default was 200)
Let me know what you think.
Thanks again!
|
09-13-2015, 07:49 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,001
Thanked 2,542 Times in 2,161 Posts
|
|
NR during capture is never suggested. Do that in post-capture processing, be it VirtualDub, Avisynth, or something else.
|
09-13-2015, 09:05 AM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Alright, will do that.
Thanks for the tip!
|
09-14-2015, 07:04 PM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
HI,
I think I'm to the point of encoding. I found x264vfw to use with Vdub.
Do you suggest another software to encode? I know you talked about MeGui. Is there a preferable one?
Also, audio needs to be processed separately. Can I do that in VirtualDub too? From quick research, VDub cannot encode AAC but only decode.
Is there a good software where I could put my avi file, and encode to h264 + AAC directly?
Thanks in advance!
|
09-15-2015, 05:41 PM
|
|
Remembered
|
|
Join Date: Aug 2013
Location: Switzerland
Posts: 453
Thanked 85 Times in 75 Posts
|
|
Quote:
Is there a good software where I could put my avi file, and encode to h264 + AAC directly?
|
Yes, of course. If I have called, nevertheless, already here.... Hybrid from the developer Selur.
he is to be found in the English Doom9 and also in German doom9 or directly on his web page.
I am present since the first version from Hybrid already.
http://www.selur.de/
2 weeks ago I have shown the first steps in Hybrid here in the forum in a small MP4.
It is not quite light Hybrid, but if I can work with 60 + with it.... also young brains are able to do it also.
Quote:
I found x264vfw to use with Vdub.
|
Yes, I also know....... no good idea AVC + AAC is however to be provided in an AVI-Kontainer.
Question sometimes user sanlyn
|
09-16-2015, 11:12 AM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Thanks for the info.
I'll have a look at Hybrid. Seems like a good software!
I'll let you know if I run into issues or have some questions.
Thanks again!
|
09-16-2015, 01:06 PM
|
|
Free Member
|
|
Join Date: May 2015
Posts: 43
Thanked 0 Times in 0 Posts
|
|
Thanks again, good to know. Really appreciated!
Regards
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
VCR simulator script, Avisynth fake VHS look!
|
jmac698 |
Restore, Filter, Improve Quality |
1 |
02-12-2018 06:17 AM |
How to deinterlace MP4 video + batch processing?
|
segen77 |
Restore, Filter, Improve Quality |
3 |
02-13-2014 11:43 AM |
Will a TV always deinterlace video?
|
premiumcapture |
Restore, Filter, Improve Quality |
6 |
12-27-2013 11:06 AM |
Deinterlace NES gameplay video with VirtualDub filters? DV vs Huffyuv for games?
|
JLegnon |
Project Planning, Workflows |
15 |
05-29-2012 09:40 PM |
QTGMC How-to: Help deinterlacing with Avisynth
|
Joekster |
Restore, Filter, Improve Quality |
1 |
12-22-2011 04:27 PM |
All times are GMT -5. The time now is 01:14 PM
|