Koi
3rd September 2024, 06:52
The source I'm having trouble with is the Japanese program MPEG2
Among possible problems, it has TTF interlacing, but it is known that anime is frame-plane so I don't use strong deinterlacing filters like QTGMC... (It can leave ghost frame).
I often apply filtering and encoding on Amatsukaze so my avs script is written as follows:
AMT_SOURCE.AssumeTFF()
TFM(mode=7,PP=1,slow=2)
FrameCache(16).Auto24FPS(true,24,0)
AssumeFrameBased()
ConvertBits(16)
JincResize(1920,1080,tap=4)
ConvertBits(8,dither=1)
Prefetch(20)
Please see the rough interlacing sample, which you can download if you want to do some testing.
Sample (https://drive.usercontent.google.com/download?id=1L98sW2Mdl7xUXqcHVBOtBO39d4cYi9Nm&export=download)
:helpful:
Koi
6th September 2024, 08:24
For most of the clip normal TIVTC seems fine, but looking at the separated fields, all fields from 633 to 659 are blends.
At least I don't see a way to remove these.
TIVTC actually did a great job, but it really ruined the telop added to frame 1386 --> 1479 (also known as the 60i telop). It looks like this:
https://imgur.com/a/On3dF0f
I tried to keep the telop with Auto24FPS but the frame interlacing at some frames 1567 --> 1632 could not be removed. It looks like this:
https://imgur.com/a/UveDkk1
I want to balance these two difficult jobs, and I look forward to your help.
:thanks:
Selur
7th September 2024, 19:20
TIVTC actually did a great job, but it really ruined the telop added to frame 1386 --> 1479 (also known as the 60i telop). It looks like this:
What is wrong with those frames, assuming you are referring to the text overlay when you mention telop. (Text seems fine to me in the screenshots)
TFM()
TDecimate(mode=7, rate=23.9760)
is what I use,... (don't see any combing with that)
Koi
11th September 2024, 09:40
What is wrong with those frames, assuming you are referring to the text overlay when you mention telop. (Text seems fine to me in the screenshots)
TFM()
TDecimate(mode=7, rate=23.9760)
is what I use,... (don't see any combing with that)
Result (https://drive.usercontent.google.com/download?id=1Xvc6Pnon0lzptI0V1zC_moVX5SQpYcJL&export=download&authuser=0&confirm=t&uuid=3b4b9253-a737-4928-b8de-d9584e0cacd8&at=AO7h07dEOFMDUl7xB_TX_tLlm75_:1726043682127)
The results showed that the added text still flickered sometimes (the order of the fields seemed wrong).
It seems fine when running the script using AvsPmod.
Is it possible to stabilize those frames?
Selur
11th September 2024, 15:07
Sorry, you are right. :)
It seems fine when running the script using AvsPmod.
+ using:
TFM(pp=0)
TDecimate(mode=7, rate=23.9760)
works fine here. (https://www.mediafire.com/file/ekzeq0x4lxi9ad4/Oshinoko_17_BS11_1_reencode.mp4/file)
Since I can't see those issues here, my guess is that it's something with your system or your encoder settings. (more likely system instability)
Is your system overclocked in any way. Or is something messing with the memory while the encoding is running?
Cu Selur
Koi
11th September 2024, 15:10
Sorry, you are right. :)
+ using:
TFM(pp=0)
TDecimate(mode=7, rate=23.9760)
works fine here. (https://www.mediafire.com/file/ekzeq0x4lxi9ad4/Oshinoko_17_BS11_1_reencode.mp4/file)
Since I can't see those issues here, my guess is that it's something with your system or your encoder settings. (more likely system instability)
Is your system overclocked in any way. Or is something messing with the memory while the encoding is running?
Cu Selur
--preset ultrafast --tune animation --crf 23 --qpstep 81 --qcomp 0.8 --mbtree --rc-lookahead 250 --aq-mode 3 --aq-strength 1 --scenecut 100 --open-gop --keyint infinite --min-keyint 1 --cabac --bframes 16 --b-bias 100 --partitions all --8x8dct --subme 9 --direct auto --ref 16 --mixed-refs --weightp 2 --weightb --trellis 1 --cqm jvt --no-fast-pskip --deblock 0:0 --cqm4i 6,12,19,26,12,19,26,31,19,26,31,35,26,31,35,39 --cqm4p 9,13,18,21,13,18,21,24,18,21,24,27,21,24,27,30 --cqm8i 6,10,13,16,19,24,26,28,10,12,16,19,24,26,28,31,13,16,19,24,26,28,31,33,16,19,24,26,28,31,33,35,19,24,26,28,31,33,35,37,24,26,28,31,33,35,37,39,26,28,31,33,35,37,39,42,28,31,33,35,37,39,42,44 --cqm8p 9,12,14,16,18,19,21,22,12,13,16,18,19,21,22,24,14,16,18,19,21,22,24,25,16,18,19,21,22,24,25,27,18,19,21,22,24,25,27,28,19,21,22,24,25,27,28,30,21,22,24,25,27,28,30,31,22,24,25,27,28,30,31,33
This is the encoder setting in use. Are there any problems with this encoder?
Selur
11th September 2024, 15:41
Those encoder settings seem strange to me:
"--qpstep 81 --qcomp 0.8" would be the first thing I would suspect
the combination of "--preset ultrafast" and "--subme 9", seems strange.
Selecting 'ultrafast' nearly over writing all that this entails makes no sense to me.
The only setting ultrafast sets which you did not overwrite are "--b-adapt 0" and "--me dia" and using '--me dia' with '--subme 9' does not make any sense to me. :)
"--b-adapt 0" with "--b-bias 100" makes no sense to me.
I would also try without the whole custom cqm.
"--rc-lookahead 250", seems like overkill,
"--scenecut 100" just seems wrong too :)
=> Sorry, but those settings are just wrong.
Ignoring those setting.
I would recommend encoding with one of the presets and if the issue also appears with a standard setting it's probably a system issue.
If the issue is not there with a preset, then your problem really is with one of those strange combinations of settings.
Cu Selur
Koi
11th September 2024, 15:45
Those encoder settings seem strange to me:
"--qpstep 81 --qcomp 0.8" would be the first thing I would suspect
the combination of "--preset ultrafast" and "--subme 9", seems strange.
Selecting 'ultrafast' nearly over writing all that this entails makes no sense to me.
The only setting ultrafast sets which you did not overwrite are "--b-adapt 0" and "--me dia" and using '--me dia' with '--subme 9' does not make any sense to me. :)
"--b-adapt 0" with "--b-bias 100" makes no sense to me.
I would also try without the whole custom cqm.
"--rc-lookahead 250", seems like overkill,
"--scenecut 100" just seems wrong too :)
=> Sorry, but those settings are just wrong.
Ignoring those setting.
I would recommend encoding with one of the presets and if the issue also appears with a standard setting it's probably a system issue.
If the issue is not there with a preset, then your problem really is with one of those strange combinations of settings.
Cu Selur
So can you show your encoder settings? I took a look and it feels a lot better.
Selur
11th September 2024, 16:45
Remove the pp=0.
=> your can try tweaking the TFM settings, but I guess you don't get much better.
Also, I would add some additional filtering, like deblocking&co, especially if you plan to zoom into the image and try to get rid of compression artifacts like you can see in "1567 --> 1631".
My encoding settings won't help, since I didn't use x264.
NVEnc --y4m -i - --fps 23.976 --codec av1 --sar 1:1 --lookahead 32 --output-depth 10 --vbr 0 --vbr-quality 23.00 --aq --aq-strength 5 --aq-temporal --gop-len 0 --ref 6 --multiref-l0 3 --multiref-l1 3 --bframes 3 --bref-mode auto --no-b-adapt --mv-precision Q-pel --preset quality --colorrange limited --colormatrix bt709 --cuda-schedule sync --output OUTPUTFILE
Something like Retinex could be used to better see the compression artifacts, if you are really out to remove them:
https://i.ibb.co/7b2bgdP/grafik.png (https://ibb.co/HXnXNf6)https://i.ibb.co/YPLtmJS/grafik.png (https://ibb.co/2WkjxRr)https://i.ibb.co/KDZr09z/grafik.png (https://ibb.co/m0scDHF)
Cu Selur
Koi
11th September 2024, 16:56
Remove the pp=0.
Also, I would add some additional filtering, like deblocking&co, especially if you plan to zoom into the image and try to get rid of compression artifacts like you can see in "1567 --> 1631".
My encoding settings won't help, since I didn't use x264.
NVEnc --y4m -i - --fps 23.976 --codec av1 --sar 1:1 --lookahead 32 --output-depth 10 --vbr 0 --vbr-quality 23.00 --aq --aq-strength 5 --aq-temporal --gop-len 0 --ref 6 --multiref-l0 3 --multiref-l1 3 --bframes 3 --bref-mode auto --no-b-adapt --mv-precision Q-pel --preset quality --colorrange limited --colormatrix bt709 --cuda-schedule sync --output OUTPUTFILE
2024-09-12 00:50:58 interlaced output is only supported for H.264 codec.
And I tried switching to h264 codec and it turned out like this:
2024-09-12 00:52:58 GPU #0 (NVIDIA GeForce RTX 4050 Laptop GPU) does not support H.264 interlaced encoding.
Selur
11th September 2024, 18:08
Why are you encoding with interlaced output?!? I thought this thread was about to remove interlacing / telecine,... => you might want to check your settings again,...
Depending on how much time you want to spend on it, you could also use something like DPIRdeblock for deblocking, SCUNet for cleaning and YAHR to remove some halo. (https://www.mediafire.com/file/w5ujqtj5b42j82o/DeblockDPIR_SCUNet.mp4/file) (SCUNet and DPIR, when using Avisynth, are available through avs-mlrt)
Cu Selur
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.