Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
21st December 2018, 23:49 | #1 | Link |
Registered User
Join Date: Dec 2007
Posts: 20
|
Inconsistent behavior of script in Avspmod vs ffmpeg
I'm having a frustrating issue.
I have two scripts for converting Doctor Who back to 25fps from the 1080i60 contained on the Blu-rays. The first script just runs QTGMC which gives me 1080p60, but with duplicates. I put this through ffmpeg using hevc lossless. Then the second script loads that lossless mkv file and puts it through srestore. This seems to mostly work. However, viewing that second script in Avspmod, everything looks very smooth frame to frame. When I encode that same script using ffmpeg, there are issues. A repeated frame, then skipping the following unique frame. This mainly happens in scenes with little motion, like two vehicles moving towards each other on a road, filmed from a long distance. Is there any known reason for this inconsistency? Thanks. |
22nd December 2018, 00:03 | #2 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
I would first determine what the source actually contains.
If the original was recorded 25p and sped down to 24p and telecined to 60i you should use an inverse telecine operation, not QTGMC, and optionally a speed up if you want to get the original 25p speed back. But if the original was 50i and now it is 60i there could be all kind of things that have happened. In that case you have to scan frame by frame and see if you can detect a pattern to determine the best approach to take. Last edited by Cary Knoop; 22nd December 2018 at 00:11. |
22nd December 2018, 00:22 | #4 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
As usual, post your script(s)
What format was the ffmpeg output, and how are you checking it? How do you know it's not a decoding/playback issue of the ffmpeg output ? Post your ffmpeg commandline . Double check your framerates. "1080p60" isn't really 60.0 fps . A discrepancy between avs framerate and -r entered for ffmpeg can cause these sorts of issues too Another possible culprit might be the source filters used Was it I-frame HEVC lossless after the 1st step ? Any reason for using HEVC ? |
23rd December 2018, 00:32 | #5 | Link |
Registered User
Join Date: Dec 2007
Posts: 20
|
Thank you everyone for your responses.
Indeed, it ended up that I was overthinking it (or, at least, wrongly thinking it) using QTGMC and srestore. I found that tfm(mode=5) and tdecimate(cycle=6) did the job just fine. Sorry for wasting everyone's time. Here's my final (famous last words) script: Code:
FFmpegSource2("DOCTOR_WHO_SERIES_6_SPECIAL_EDITION_BOXSET_DISC_2.Title801.mkv", atrack=-1) tfm(mode=5,pp=0) tdecimate(cycle=6) before=last removegrain(mode=17) repair(last, before, mode=17) assumefps(25,sync_audio=true) ssrc(48000) |
23rd December 2018, 00:58 | #6 | Link | |
Registered User
Join Date: Dec 2007
Posts: 20
|
Quote:
Yes, HEVC lossless (-x265-params "lossless=1") with the first step. HEVC seemed to provide a smaller lossless file than other options I had tested, but my tests certainly weren't exhaustive. I only had around 400GB of free space on the HD, didn't want to fill it up. I used ffmpegsource2 for both step 1 and step 2, with the original container being mkv (ripped using DVD Fab). First script: Code:
FFmpegSource2("DOCTOR_WHO_SERIES_6_SPECIAL_EDITION_BOXSET_DISC_2.Title801.mkv") qtgmc(preset="very slow",nneurons=4,sourcematch=3,matchpreset="very slow",tr2=1,lossless=2,matchenhance=1.0,noiseprocess=0,edithreads=1,fftthreads=1) #srestore() prefetch(8) Code:
FFmpegSource2("s6e2-hevc-lossless1.mkv") #qtgmc(preset="very slow",nneurons=4,sourcematch=3,matchpreset="very slow",tr2=1,lossless=2,matchenhance=1.0,noiseprocess=0,edithreads=1,fftthreads=1) srestore() #prefetch(8) They were very basic commands, though, very close to: ffmpeg -i dw3.avs -c:v hevc -x265-params "lossless=1" s6e2-hevc-lossless1.mkv ffmpeg -i dw4.avs -i originalmkv.mkv -map 0:v -map 1:a -c:v hevc -tag:v hvc1 -crf 20 -preset slow -c:a ac3 -b:a 320k -map_metadata -1 s6e2-final.mp4 The tag:v hvc1 is there to make the file play through Apple TV, also why I used mp4 as the final container. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|