I downloaded a video from YouTube and for some reason YouTube changed the FPS from 23.976fps to 60fps but all the extra frames are duplicates.
Why do they do that?
Is there any Avisynth script that will automatically remove the duplicate frames?
I tried the following. the FDecimate line works but the QTGMC line causes ghosting artifacts. Why does it do that and is there any way to use QTGMC without getting that problem as I want to remove the jaggies on the guy's glasses.
Attached is the Untouched download via YouTube-DL program. Here's the batch script I used to download the video:Code:FDecimate() QTGMC(Preset="Faster", InputType=1
Also attached is a shorter trimmed sample which I got by using the Trim tool in VideoRedo V5.Code:cd /D "%~dp0" youtube-dl -f ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best https://www.youtube.com/watch?v=6CA9ilybJ5Q -o "L:/YouTube/Politics/%%(uploader)s/%%(upload_date)s %%(title)s %%(id)s New Zealand %%(height)sp @@%%(vcodec)s %%(acodec)s@@. FPS %%(fps)s, Views %%(view_count)s.%%(ext)s" --embed-subs --sub-lang en --ignore-errors --restrict-filenames --download-archive archive.txt --merge-output-format mkv youtube-dl https://www.youtube.com/watch?v=6CA9ilybJ5Q -o "L:/YouTube/Politics/%%(uploader)s/%%(upload_date)s %%(title)s.%%(ext)s" --ignore-errors --restrict-filenames --write-description --write-thumbnail --skip-download PAUSE
Script I'm Using
Even without the script after the SelectEven line, frame 0 and 1 are still duplicates and they shouldn't be. Seems that is causing QTGMC not to work, the script runs but QTGMC doesn't smooth the jaggies.Code:LWLibavVideoSource("L:\Trimmed VP9.mkv") SelectEven() a=last a QTGMC(preset="Medium", inputtype=2, sharpness=0.5) b=last b.Trim(0,1272) ++ a.Trim(1273,0)
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 30 of 40
-
Last edited by AndersonJames; 19th Jul 2020 at 18:37.
-
Usually that would be the uploader's fault . If they uploaded 23.976p , youtube would keep it like that
If your assessment is correct, a possible script would look like
#Source Filter
SelectEven()
TDecimate() -
Thanks. The guy has over 800 thousand subscribers so I don't think the guy would upload a messy video like that. I think he uploaded in 23.976p. What do you think? His channel is here: https://www.youtube.com/c/TheQuartering/videos
Video is here: https://www.youtube.com/watch?v=6CA9ilybJ5Q
Do you have a link to a YouTube video which uses 23.976fps? -
-
Tried that but it gives 25.808 fps instead of 23.976.
Tried this and FDecimate works but for some reason the QTGMC line adds weird ghosting artifacts. Why does it do that? I want to use QTGMC to get rid of the jaggies on his glasses. Any suggestions please? I've added a short clip of the source in my original post.
Code:FDecimate() QTGMC(Preset="Faster", InputType=1)
-
-
That's 30.0p segment in that video with the face shot, and it's been badly deinterlaced and/or upscaled. Possibly some frame drops too. YOu can tell this because every 2nd frame is a duplicate in the 60.0p version
It's not 23.976p content
You can just download the 30.0p version, no processing. Or you can process it to "fix" the aliasing issues -
This is the source filter I'm using: FFVideoSource("L:\Trimmed VP9.mkv", fpsnum=24, fpsden=1, threads=1)
Info reports 64.5203 fps without using any other filters. Source Clip is attached in my first post. -
-
If you're starting with a 1080p60.0 version, it depends which version you downloaded- if you are using VP9 or H264.
I downloaded the AVC version with AAC audio using
Code:youtube-dl -f 299+140 https://www.youtube.com/watch?v=6CA9ilybJ5Q
SelectEven will drop every 2nd frame, and you'll end up with 30.0p
Only the intro/closeup needs processing in terms of aliasing. The rest can be left at 30.0p (the latter part doesn't have the aliasing/jaggies issues)
Code:LWLibavVideoSource("Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thousands Stolen! Be Careful!-6CA9ilybJ5Q.mp4") SelectEven() a=last a QTGMC(inputtype=2, sharpness=0.5) b=last b.Trim(0,1272) ++ a.Trim(1273,0)
If you downladed a different version ,you might have adjust it slightly -
When I run that script it says:
Script error: There is no function named: LWLibavVideoSource -
-
What are you describing as "ghosting" ? Can you post a screenshot or describe it better?
I see motion blur, from the camera. It's soft , low quality upscale, blurry - but none of those are what would be described as "ghosting"
"ghosting" typically implies double images or after images. A blend of more than 1 time -
The following frames are duplicates: 15, 29
What does that mean?
I encoded the video but it came out looking much worse than the source. Frame 146 and 147 have an example of the ghosting I'm referring to. It looks like a previous image has had parts of it left behind in the current frame.
[Attachment 54200 - Click to enlarge]
QTGMC is actually make those artefacts, it's making the picture look worse rather than better! Any suggestions on how to fix the jaggies in the source?Last edited by AndersonJames; 19th Jul 2020 at 14:02.
-
Something wrong with your version, maybe your dependency plugins are old ? If you comment out the QTGMC line, do you still get "ghosting"? (is it a lsmash issue or QTGMC issue on your end) ?
Are you using the original video? That frame 146,147 is nowhere near 146,147 in my version in 30fps
I don't see duplicates there on my version with that script in that range (did you mean 14,15, or 15,16) ? etc... either way in that range to frame 40 and beyond, each frame is unique for me .
I don't see any ghosting like that in mine either (QTGMC in progressive mode is helping the jaggies; or it does when you get it working properly) -
The corresponding screenshot for your screenshot should be frame 136
selecteven()
[Attachment 54201 - Click to enlarge]
selecteven().QTGMC(inputtype=2, sharpness=0.5)
[Attachment 54202 - Click to enlarge]
No ghosting for either ; the main difference is less aliasing with QTGMC processing (you can compare the hat, glass rims, super mario etc...)
Typical culprits that could explain your results are bad source filter (that version lsmash is ok, it's the same one I'm using.), old prerequisites plugins, maybe wrong downloaded video maybe some issues with it -
I'm using the Trimmed source clip I uploaded in my first post. I'm talking about frame number 146 and 147. The ghosting issues shown in the photo I uploaded only show when I add the QTGMC lines in the script.
The following script displays fine for me without ghosting:
Code:LWLibavVideoSource("L:\Trimmed VP9.mkv") SelectEven()
Code:LWLibavVideoSource("L:\Trimmed VP9.mkv") SelectEven() a=last a QTGMC(inputtype=2, sharpness=0.5) b=last b.Trim(0,1272) ++ a.Trim(1273,0)
-
You're dead wrong. As pdr said, YouTube doesn't increase the original framerate.
Do you have a link to a YouTube video which uses 23.976fps? -
There are problems with the version you downloaded (and uploaded to post #1), or perhaps it was the way you cut it, or the way it's being decoded. That's at least one of the problems
eg. In your version, just the source filter, already frame 0, frame 1 are duplicates with selecteven(). But the original VP9 version is clean, no duplicates with the same source filter with selecteven()
It's clean for me if you download the AVC version or VP9 version from youtube with that script -
vp9/opus version downloaded with this
Code:youtube-dl -f 303+251 https://www.youtube.com/watch?v=6CA9ilybJ5Q
Code:ffmpeg -i "Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thousands Stolen! Be Careful!-6CA9ilybJ5Q.webm" -c:v copy -c:a copy -t 00:00:43 cut.webm
Code:ffmpeg -i 1_vp9_cut.avs -i "cut.webm" -map 0:0 -map 1:1 -c:v libx264 -crf 18 -c:a copy q.mkv
I think there is an issue with your downloading method, or cutting method -
I've updated my 1st post to provide you the full untouched source video that I downloaded via the YouTube-DL program. Here's the batch script I used to download the video:
Code:cd /D "%~dp0" youtube-dl -f ("bestvideo[width>=1920]"/bestvideo)+bestaudio/best https://www.youtube.com/watch?v=6CA9ilybJ5Q -o "L:/YouTube/%%(upload_date)s %%(title)s %%(id)s New Zealand %%(height)sp @@%%(vcodec)s %%(acodec)s@@. FPS %%(fps)s, Views %%(view_count)s.%%(ext)s" --embed-subs --sub-lang en --ignore-errors --restrict-filenames --download-archive archive.txt --merge-output-format mkv youtube-dl https://www.youtube.com/watch?v=6CA9ilybJ5Q -o "L:/YouTube/%%(upload_date)s %%(title)s.%%(ext)s" --ignore-errors --restrict-filenames --write-description --write-thumbnail --skip-download PAUSE
-
Yes there is a duplicate in your video when decoded with lsmash and SelectEven(). It might be something with buggy mkv timestamps. You can remux it with ffmpeg it seems to work in terms of no duplicates, QTGMC working properly, at least for me
Code:ffmpeg -i "VP9 Untouched Source from YouTube-DL.mkv" -c:v copy -c:a copy remux.mkv
-
EDIT: And downloading with your batch (just changing the directory) , it works ok in terms of no duplicate
I'm checking with lsmash and selecteven()
But your video in post #1 has the duplicate after selecteven() -
The bytes are different
97,420,702 bytes for youtube-dl batch download just now
97,420,716 bytes for your version from post #1
I was using youtube-dl dated 2020-05-28, not sure if that makes a difference.
The timestamps look ok; it's something else that is the problem -
In the script I used in post 1 to download, I removed the MKV merge bit and I get a .webm file. In AVSPmod when previewing the video, frames 0 and 1 are still duplicates. This is before I've encoded the video.
Don't understand why you used the same script as me which I provided to download the file yet I'm getting duplicate frames on frame 0 and 1? Are you sure you used the same script as me to download apart from the directory? -
To be clear, I'm talking about duplicate still there after SelectEven(). It shouldn't be there
I'm certain, just the directory difference. And possibly youtube-dl version difference.
Did you try cut.webm above ? Did you get the duplicate frame after selecteven() (Not taking about QTGMC yet)
There are some byte differences between what I get with your script and what you uploaded. Try downloading it again. Maybe something got corrupted the 1st time -
I tried the first 2 scripts in your post and I get the "cut.webm" file. Opening that in AVSPmod I still get duplicate frames. The 3rd script which I put after the other 2 scripts fails saying "1_vp9_cut.avs: Unknown error occurred". Full output of the batch file is below:
Code:X:\Portable Installations\YouTube-DL>cd /D "X:\Portable Installations\YouTube-DL \" X:\Portable Installations\YouTube-DL>youtube-dl -f 303+251 https://www.youtube.c om/watch?v=6CA9ilybJ5Q [youtube] 6CA9ilybJ5Q: Downloading webpage [download] Destination: Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thous ands Stolen! Be Careful!-6CA9ilybJ5Q.f303.webm [download] 100% of 86.03MiB in 01:01 [download] Destination: Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thous ands Stolen! Be Careful!-6CA9ilybJ5Q.f251.webm [download] 100% of 6.88MiB in 00:07 [ffmpeg] Merging formats into "Massive Twitter Hack! Obama, Mr. Beast & Even GOD ! Thousands Stolen! Be Careful!-6CA9ilybJ5Q.webm" Deleting original file Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thousa nds Stolen! Be Careful!-6CA9ilybJ5Q.f303.webm (pass -k to keep) Deleting original file Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thousa nds Stolen! Be Careful!-6CA9ilybJ5Q.f251.webm (pass -k to keep) X:\Portable Installations\YouTube-DL>ffmpeg -i "Massive Twitter Hack! Obama, Mr. Beast & Even GOD! Thousands Stolen! Be Careful!-6CA9ilybJ5Q.webm" -c:v copy -c: a copy -t 00:00:43 cut.webm ffmpeg version N-65018-gad91bf8 Copyright (c) 2000-2014 the FFmpeg developers built on Jul 26 2014 22:09:15 with gcc 4.8.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca -- enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable- libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 92.101 / 52. 92.101 libavcodec 55. 69.100 / 55. 69.100 libavformat 55. 49.100 / 55. 49.100 libavdevice 55. 13.102 / 55. 13.102 libavfilter 4. 11.102 / 4. 11.102 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, matroska,webm, from 'Massive Twitter Hack! Obama, Mr. Beast & Even GOD ! Thousands Stolen! Be Careful!-6CA9ilybJ5Q.webm': Metadata: encoder : Lavf55.49.100 Duration: 00:08:22.94, start: 0.007000, bitrate: 1549 kb/s Stream #0:0(eng): Video: vp9, yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn, 1k tbc (default) Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default) Output #0, webm, to 'cut.webm': Metadata: encoder : Lavf55.49.100 Stream #0:0(eng): Video: vp9, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 1k tbn, 1k tbc (default) Stream #0:1(eng): Audio: opus, 48000 Hz, stereo (default) Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 2777 fps=0.0 q=-1.0 Lsize= 23037kB time=00:00:42.99 bitrate=4389.7kbits /s video:22413kB audio:589kB subtitle:0kB other streams:0kB global headers:0kB muxi ng overhead: 0.151192% X:\Portable Installations\YouTube-DL>ffmpeg -i 1_vp9_cut.avs -i "cut.webm" -map 0:0 -map 1:1 -c:v libx264 -crf 18 -c:a copy q.mkv ffmpeg version N-65018-gad91bf8 Copyright (c) 2000-2014 the FFmpeg developers built on Jul 26 2014 22:09:15 with gcc 4.8.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca -- enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable- libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 92.101 / 52. 92.101 libavcodec 55. 69.100 / 55. 69.100 libavformat 55. 49.100 / 55. 49.100 libavdevice 55. 13.102 / 55. 13.102 libavfilter 4. 11.102 / 4. 11.102 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc 52. 3.100 / 52. 3.100 1_vp9_cut.avs: Unknown error occurred X:\Portable Installations\YouTube-DL>PAUSE Press any key to continue . . .
Does your script still work when using that version and are the frames missing in the cut.webm file created when using that version?Last edited by AndersonJames; 19th Jul 2020 at 20:30.
Similar Threads
-
Youtube videos have repeated/duplicate frames - is this normal?
By KDE_fan in forum Video Streaming DownloadingReplies: 3Last Post: 26th Aug 2017, 09:25 -
Removing repeated frames from 25fps files on Vevo (originally 23.976)?
By digitalfreaknyc in forum Video ConversionReplies: 43Last Post: 23rd Jan 2017, 23:55 -
AVISynth / sRestore not removing duplicate frames
By bvdd in forum Video ConversionReplies: 4Last Post: 23rd Nov 2015, 07:08 -
Removing duplicate frames
By Colek in forum Video ConversionReplies: 7Last Post: 9th Oct 2015, 12:40 -
NTSC interlaced dvd (29,976 fps) to progressive (23,976 fps) ?
By kalemvar1 in forum Video ConversionReplies: 2Last Post: 6th Aug 2015, 19:25