Hi!
I just started the process of transferring around 100 miniDV tapes (PAL) to my computer. This project has two purposes, basically archival and web (mainly Vimeo).
For the archives, I just leave the AVI-files untouched (space is not a problem) so all good there, but I do wonder if there's anything in my chain I could tweak to make the video look better on the web.
The material is live concerts, filmed from the audience (often shaky) in small & dark night clubs (horrible lighting) filmed from a distance with a low-end consumer miniDV camera, so, that's what we have to work with.
My current workflow goes something like this :
Panasonic NV-DV2000 -> Firewire -> WinDV (type 1 AVI) -> vdub (cutting, joining) -> save as new AVI (direct stream copy).
So far I'm pretty confident I'm doing everything right. Depending on the footage I may or may not toss the original AVI, but generally, I think I'll keep both for the archives.
Now let's prepare the new AVI-file for the web.
I know deinterlacing can be a hot topic but as far as I understand, Vimeo expects progressive video. I've seen some really nice results with QTGMC where the frame rate has been doubled and the motion looks smooth overall. I've done this on some VHS tapes in the past and I was happy with the results.
Currently, my AviSynth+ script looks like this, and I'd love some feedback on it :
Speed is not a concern at the moment, but I'd really appreciate some advice on which filters & tools could be worth trying out on my tapes. The footage "quality" is pretty much the same on all of them.Code:SetFilterMTMode ("QTGMC", 2) AVISource("file.avi", atrack=0) AssumeBFF() FadeIn(50) FadeOut(50) QTGMC(preset="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3) Prefetch(3)
I did some short test clips.
Here's the clean file, straight from the Panasonic recorder through Firewire :
https://cloud.thebunker.nu/index.php/s/CTzcieGyE3Rtwrf
Here's the same segment after AviSynth & QTGMC's magic. It's now 50fps and deinterlaced. It's uncompressed AVI (hence the size...) :
https://cloud.thebunker.nu/index.php/s/fQbfGWatbHJDQAC
(attached is also the info given by AviSynth using the info() command)
The footage is shot in widescreen, and originally the file coming out from AviSynth had a 5:4 aspect ratio. I "fixed" it with ffmpeg for this purpose :
As I understand - aspect ratio doesn't matter until the final encoding anyways? At least that's what I read on the InternetCode:ffmpeg -i input.avi -c copy -aspect 16/9 output.avi. Please confirm
.
So, let's compare the two AVI's posted above, I'm using vlc for this purpose, although I suspect this is not a perfect method. I already appreciate the result we get with QTGMC, I do think the video is smoother and looks slightly better than any of the built-in filters in vlc, so at least that. I'm still very open to ideas for improvement, but overall I think this looks OK.
Moving on to the encoding phase then. Again, it's going on the web so I assume mp4 x264 is a sensible option? I've experimented with different settings but I'm not so impressed yet - it's very likely to depend on the source in this case though, it's far from ideal, but I'm still curious if we'd be able to tweak it a little. It's probably a good idea to upscale before uploading to vimeo, but let's find the best way to compress it first.
I made an attempt using avidemux with Mpeg4 AVC (x264), slow preset and crf 18. I don't think I touched anything else, except forcing it to 16:9 and "optimized for streaming". I used avsproxy to open the avs-script directly (same script as above). Eventually I'll use ffmpeg instead, but as a newbie in this particular area it's actually nice with a gui.
Here's the result :
https://cloud.thebunker.nu/index.php/s/7dYpmY6gwpW9jPP
I'm not so convinced, I think it's pixelated and kind of blurry, but maybe it's depending on the source, or maybe I've just forgotten how low res MiniDV actually is, these tapes are old and the camcorders were replaced with GoPro's a long time ago.
Before I move further I'd love to hear if my results are to be expected under these circumstances? If that's the case, I can accept that, and move on.
Truly grateful for any advice! Million thanks in advance.
Best regards
Peter
+ Reply to Thread
Results 1 to 18 of 18
-
-
I am no real expert with this so can not comment on your script.
But what I still would have expected that inputing 16:9 DV would result in a 16:9 video. Yes. An avi does not have an implicit AR flag but the DV pixels still take care of the AR. Possibly outputting uncompressed rather than as DV might well have caused that. (5:4 is 720*576 DV whether it is 4:3 or 16:9 - same arrangement as with dvd) -
Hi DB83 and thanks for taking the time to read through and reply to my long post, I really appreciate it!
Interesting information. I'm not sure how to test this theory - I thought I could open the script in vdub and re-encode it as a test but at the moment I only have Cedocida's free DV codec installed and it lets me choose between 4:3 or 16:9 so that wouldn't be much of a test.
The real question is of course if this matters - if the quality degrades by letting Avidemux force 16:9 while creating the mp4 instead of providing the correct source material from the start, so to speak.
I'll start the research.
Cheers!
Peter -
For the final encode I do not think it matters so much that you 'force' 16:9 rather than have a 16:9 source.
What is more pertinent is that your encode for the mp4 retains the vertical ratio so your mp4 is created as 1024*576 which is how your original DV should have been seen.
That can even be done within the avisynth script with one of the resize filters and then you use vdub2 to import the script and output the mp4 with your chosen codec. No need for an intermediate re-encode to another avi or use avidemux for yet another re-encode.
There will always be a loss of quality going from DV to, for example, AVC (h264) but AVC is a good lower-bit rate codec. -
Thanks again DB83! I've read about vdub2 but never gotten around to try it - it seems pretty nice, I'll play around with it for a bit and we'll see how it goes
.
I'll keep experimenting here (while doing some more research) and I'll post some new results when I have them. I'll also try some tapes with better footage (not as dark etc) to see if I like the resulting mp4 files better.
I'll be back. Thanks for your help!
-
For YouTube and Vomeo use higher resolution to benefit from the higher bitrate when your video is being processed for streaming, Use progressive 1440x1080 for 4:3 and 1920x1080 for 16:9, 720p is the cutt off resolution, any thing bellow will be given the shittiest streaming bitrate.
-
Armed with a large glass of a good red I took a look at your sample.
One, no make that two, empty glasses later..........
Granted that I would not normally recc any resize above the original (that would be 1024 * 576) I respect my friend's comment to, at the very least, resize to 720p (1280*720) to allow any subsequent re-encode to, hopefully, give the video some adequate bitrate.
The real issue is not pixilation. This is shot in low light with lamps hitting your lens which then blows out your picture, I did not detect low-light noise which would have made the viewing experience even worse. Hopefully someone can come on and maybe offer some avisynth filters to alieviate this but I hold little hope.
In the circumstances IMO you do not need all that bitrate - I did an experiment with an avg bitrate of 3000 kbps and 1280*720 and I ended with a 15 mb vid and no, obvious to me, loss of quality. -
Hi dellsam34 and thanks for popping in
.
Regarding resizing, we're all on the same page. I was planning to do 720p but if you guys think 1080p is better I'll go for that.
Armed with a large glass of a good red I took a look at your sample.
One, no make that two, empty glasses later ...........
The real issue is not pixilation. This is shot in low light with lamps hitting your lens which then blows out your picture, I did not detect low-light noise which would have made the viewing experience even worse. Hopefully someone can come on and maybe offer some avisynth filters to alieviate this but I hold little hope.. I've been capturing a lot of VHS in my past and that's obviously a totally different story.
In the circumstances IMO you do not need all that bitrate - I did an experiment with an avg bitrate of 3000 kbps and 1280*720 and I ended with a 15 mb vid and no, obvious to me, loss of quality..
I found a tape with much better source material. It's shakier, overall, but at least we get some details. And light!
Based on 31DB83's recommendation I've skipped Avidemux for now. This tape doesn't need any editing at all so I just opened the raw dv-file (dv type 1 or 2 gave audio issues on this particular tape for some reason) in AviSynth and then straight to vdub2 to do the compression. I do realize that I also can edit in this stage if I need to, but currently QTGMC is so slow it's not really an option at the moment, but maybe later.
This time even vdub2 loaded the file in the correct aspect ratio.
In my AviSynth script I added (on the line below QTGMC...) :
Code:Spline64Resize(1920,1080)
.
Here's a sample, this show is from 2011 and it was a fun one:
https://cloud.thebunker.nu/index.php/s/rRsBTQpfyrbDeTD
I'm quite happy with this one, I suppose I could work with color correction and other tweaks until my eyes starts bleeding but I don't want to put a crazy amount of time into this. Also, the audio isn't good enough for a proper release anyway.
Still curious to hear your thoughts and ideas on how to make any further improvements.
Thanks guys!
Best wishes
PeterLast edited by peterlondon; 8th Oct 2020 at 18:48.
-
good god such trash. you'll never get broadcast quality video out of that garbage source but headbangers might be ok with cleaned up 720p25.
Last edited by aedipuss; 8th Oct 2020 at 18:54.
--
"a lot of people are better dead" - prisoner KSC2-303 -
Hi aedipuss! We've already concluded that the source on that tape is far from optimal. I just want to make sure I'm making the best out of the material I have at hand, but it's true that our beloved headbanging fans probably will be ok with it
. No one in this thread said anything about broadcast quality
.
-
Here's an attempt at the original source scaled to 720p. There's so little detail - is it worth it?
Code:lwlibavvideosource("C:\Users\davex\Downloads\test-sydney-capture.avi") AssumeBff() #yadifmod2(mode=1, edeint=nnedi3(field=-2)) # alternative double rate de-interlace qtgmc() ColorMatrix(mode="Rec.601->Rec.709") santiag() ColorYuv(autogain=true) NNEDI3_rpow2(rfactor=2,cshift="spline64resize",fwidth=1280,fheight=720) finesharp()
-
Hi davexnet!
I think your .mkv file looks pretty good! Way better than my attempts. Thank you, I appreciate you taking your time to help out.
A lot of the functions in your script are new to me, I'm going to take some time to research these and we'll see where it goes.
Thanks again!
Best
Peter -
Hi again davexnet, I've been reading about what all these things do and I've tried them and I think my videos look great now. Thank you, this huge progress makes me very happy
.
One thing I couldn't find a good explanation for - are there any obvious benefits to use lwlibavvideosource instead of let's say good old AviSource or FFmpegSource2? For this project I'm only working with DV AVI files. I'm asking mostly because I can't figure out how to get audio with lwlibavvideosource.
I don't see any visual or performance differences between them, so I'm wondering if I dare to continue with AviSource that I'm already kind of familiar with.
Originally Posted by Alwyn.
-
Avisource is fine, I didn't use it because I don't have the codec installed. LWLibAV (Lsmash) is newer that FFmpegsource, I've been using it recently.
But for DV source, I don't think there is any functional difference
You can read about and download it here:
https://github.com/HolyWu/L-SMASH-Works/releases/
http://avisynth.nl/index.php/LSMASHSource
Regarding incorporating the audio, there are much more experienced Avisynth users on this forum than myself, but something like this
would work
Code:lwlibavvideosource("C:\Users\davex\Downloads\test-sydney-capture.avi") aud=lwlibavaudiosource("C:\Users\davex\Downloads\test-sydney-capture.avi") AssumeBff() qtgmc() ColorMatrix(mode="Rec.601->Rec.709") santiag() ColorYuv(autogain=true) NNEDI3_rpow2(rfactor=2,cshift="spline64resize",fwidth=1280,fheight=720) finesharp() audiodub(last,aud)
-
Thanks again davexnet, for the detailed explanations and even scripts
. At the moment I'm using AviSource but LWLibavVideoSource is probably a good option to have if I run into problems.
Additionally, I do have some questions about color spaces that I hope someone can answer. I've done some reading but it's a huge topic.
From what I understand, when working with DV, the color space is decided by the dv codec. And different dv codec seems to work with different color spaces.
What I also understand is that we should avoid converting between different color spaces because every conversion degrades the quality. Makes perfect sense.
I wasn't even sure which dv codec I was using, so I made AviSynth force to Canopus wich I've read is decent :
Code:AviSource("cap.avi", fourCC="CDVC")
. I think PAL DV is YV12, 4:2:0
I know I can convert to YV12 with :
Code:ConvertToYV12(interlaced=true)
The goal is here is to try out the Canopus DV codec to see if I can get better results. Not sure if it's even worth it though.
Would love it if someone could help me clear up this mess in my brain.
Thank you!
Best wishes
Peter -
^^ Not really my subject but since the wine is flowing again
........
A quick Google reveals that yv16 is 4:2:2 whereas, as you correctly pointed out, DV Pal is 4:2:0. The higher chroma sampling applies to the DVCPro Codec rather than the basic DV.
What I can not tell you is if you actually gain anything by forcing a higher colorspace than you actually have on your source and a line with ConverttoYV12 is surely going to cancel it anyway. And such a line is also irrelevant with a DV source. Methinks it is more useful with lossless codecs which are also 4:2:2
Now ask me about wine and I may be able to assist more -
If you look at the sample avi in mediainfo, it says chroma sub-sampling is 4:2:0,
I believe this is normal for PAL DV.
If you access the file in an Avisynth script and Virtualdub or AvsPmod or
info() in the script tells you the color space is different,
it probably means the decoder has modified the chroma sub-sampling. Best to avoid this
Use a source filter that doesn't change the color spaceLast edited by davexnet; 10th Oct 2020 at 18:32.
Similar Threads
-
Transfering Mini DV to PC with no loss
By jcikal in forum Newbie / General discussionsReplies: 51Last Post: 14th Apr 2024, 12:30 -
Complete HT/HTPC/Encoding overhaul - x265 on GPU Advice appreciated
By Allan74 in forum Newbie / General discussionsReplies: 8Last Post: 27th May 2019, 13:23 -
Wise advice needed on Bluray Encoding
By SimplyFred in forum Newbie / General discussionsReplies: 0Last Post: 29th Oct 2017, 04:37 -
Encoding Help/Advice Needed
By tonyclem in forum Video ConversionReplies: 7Last Post: 19th Oct 2017, 06:17 -
Transfering MiniDV (NTSC) to PAL DVD (time difference in recordings?)
By smalfilm in forum Capturing and VCRReplies: 6Last Post: 31st Aug 2016, 21:59