This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Progressive to Interlaced - HOW?!
#1
Hi, new guy here!

Fantastic software, but I can't get it to interlace video.I'm trying to put my 1080p60 videos on blu-rays for my family.

When I tell it to interlace, it seems to do it, but it won't change the frame count, so I end up with a slow motion video.

What am I doing wrong?
Reply
#2
Big Grin  https://www.selur.de/ - 1st page < Home
Reply
#3
Quote:I'm trying to put my 1080p60 videos on blu-rays for my family.
What resolution and frame rate are you aiming for?
Personally, I would either go for 720p60 to keep the fluidity of the source or enable "x264->Frame->Advanced Frame Settings->Fake interlaced encoding flag" to encode 1080p60 content interlaced (x264 uses MBAFF='Macroblock-Adaptive Frame/Field Coding' and thus allows 60p content to be 'masked' as '60i' content.)

If you are aiming for 'real' 1080i60 which I assume, you would use one of the methods under Frame->Reduction to go for 30fps and then configure the encoder to produce interlaced output. If you are aiming for SD resolutions, you would also need to adjust the resolution&co.

I would recommend enabling 'x264->Base->Restriction Settings->Hardware' and set it to 'Blu-ray/AVCHD'.

Cu Selur
Reply
#4
(10.06.2023, 08:50)humanoid86 Wrote: Big Grin  https://www.selur.de/ - 1st page < Home

I don't get it. Is that supposed to be funny?

(10.06.2023, 14:56)Selur Wrote:
Quote:I'm trying to put my 1080p60 videos on blu-rays for my family.
What resolution and frame rate are you aiming for?
Personally, I would either go for 720p60 to keep the fluidity of the source or enable "x264->Frame->Advanced Frame Settings->Fake interlaced encoding flag" to encode 1080p60 content interlaced (x264 uses MBAFF='Macroblock-Adaptive Frame/Field Coding' and thus allows 60p content to be 'masked' as '60i' content.)

If you are aiming for 'real' 1080i60 which I assume, you would use one of the methods under Frame->Reduction to go for 30fps and then configure the encoder to produce interlaced output. If you are aiming for SD resolutions, you would also need to adjust the resolution&co.

I would recommend enabling 'x264->Base->Restriction Settings->Hardware' and set it to 'Blu-ray/AVCHD'.

Cu Selur

I'm aiming for 1080i30.

I kept trying various combinations of options, including what you suggested, except for the Frame-> Reduction thing, which I didn't really understand what I'm supposed to do there.

That said, none of them actually work. Most of them give me a slow motion video, or interlaced  repeated frames. Like, instead of interlacing frames 1-2, 3-4, 5-6, it seems to interlace frames 1-1, 3-3-, 5-5, if that makes sense.

I tried to use ffmpeg, nothing changed. Tried to use Avisynth instead of Vapour, nothing changed. What am I missing here?

Script seems fine, the same line I use for MeGUI, but I noticed it adds an extra line to the end of the script, Assume (30000,1001), which I don't think would be necessary. Is that to reinforce BD compat?

One more thing: Hybrid is programmed to add AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave() , which is for NTSC TFF video. Settings are different for other formats, and I assume you know, but here it goes, anyway...

NTSC BFF - AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
PAL BFF - AssumeTFF().SeparateFields().SelectEvery(4, 1, 2).Weave()
PAL TFF - AssumeBFF().SeparateFields().SelectEvery(4, 1, 2).Weave()
Reply
#5
Regarding humanoid86: he's banned for a month.
..........

I looked at the 'AssumeTFF().SeparateFields().SelectEvery' part and you are right.
Hybrid atm. only uses "AssumeTFF().SeparateFields().SelectEvery".
I usually do not have to create interlaced content, or I use the 'fake interlaced method' when using x264.
I'm really busy the last few days so I don't really have much time on my hand to care about Hybrid.

Assume(...) changes the way how Avisynth interprets the frame rate.

=> I'll look at it when I find some time.

Cu Selur
Reply
#6
(10.06.2023, 08:50)humanoid86 Wrote: Big Grin  https://www.selur.de/ - 1st page < Home

(11.06.2023, 07:44)Selur Wrote: Regarding humanoid86: he's banned for a month.
..........

I looked at the 'AssumeTFF().SeparateFields().SelectEvery' part and you are right.
Hybrid atm. only uses "AssumeTFF().SeparateFields().SelectEvery".
I usually do not have to create interlaced content, or I use the 'fake interlaced method' when using x264.
I'm really busy the last few days so I don't really have much time on my hand to care about Hybrid.

Assume(...) changes the way how Avisynth interprets the frame rate.

=> I'll look at it when I find some time.

Cu Selur

Thanks in advance, man. Hybrid is really, really a great tool. Saves a lot of time. Heart
Reply
#7
Hopefully I will find some time later today. Smile
Reply
#8
Send you a link to a dev version for testing.

Cu Selur
Reply
#9
Sorry it took me so long to reply. Busy, busy weeks in real life.

This is what I tried:

01. Frames > Interlaced encoding + Filtering > (De)Interlace/Telecine > Interlace
FAIL, slow motion video, double duration.

02. Frames > Interlaced encoding + Filtering > (De)Interlace/Telecine > Interlace + Filtering > (De)Interlace/Telecine > Overwrite input scan type to: progressive
FAIL, slow motion video, double duration. Out of my crazy logic, I thought maybe telling the program to overwrite the input scan type, would correct the frame count.  It didn't.

03. Frames > Interlaced encoding, Filtering > Avisynth > Progressive to interlace
SUCCESS, Interlaced video, BUT field order is messed up - VERY slow encode, compared to the first two

Regarding the last tryout, I noticed a change in the command line, and I think the problem is there. When I select Frames > Interlace encoding, it adds -tff to the command line, but as soon as I check Filtering > (De)Interlace/Telecine > Interlace or Avisynth > Misc > Progressive to Interlaced, it changes -bff in the command line.

I guess it's because of the interlacing line, AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave(), which outputs TFF video, while the command line sets the encode to -bff.

I tried to attach the debug files here, but one of them exceeds the 200kb limit, so I uploaded the videos and the debug files to my Google Drive.
https://drive.google.com/drive/folders/1...sp=sharing
Reply
#10
Will look at it the week after next, if I don't forget about it.

tryout1 used:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "D:\Desktop\Working\source.mkv" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset slow --crf 16.00 --profile high --level 4.1 --ref 3 --keyint 25 --direct spatial --sync-lookahead 18 --rc-lookahead 12 --slices 4 --bff --weightp 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 8:9 --non-deterministic --range tv --colormatrix bt709 --demuxer raw --input-res 1920x1080 --input-csp i420 --input-range tv --input-depth 8 --fps 30000/1001 --bluray-compat --output-depth 8 --output "D:\Desktop\Working\2023-07-02@12_26_14_7810_01.264" -

Problem is the decoding call, it requires something liek
For TFF
-vf interlace=lowpass=2:scan=tff -top 1 -flags:v +ilme+ildct
For BFF
-vf interlace=lowpass=2:scan=bff -top 0 -flags:v +ilme+ildct

tryout2 used:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "D:\Desktop\Working\source.mkv" -map 0:0 -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset slow --crf 16.00 --profile high --level 4.1 --ref 3 --keyint 25 --direct spatial --sync-lookahead 18 --rc-lookahead 12 --slices 4 --bff --weightp 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 8:9 --non-deterministic --range tv --colormatrix bt709 --demuxer raw --input-res 1920x1080 --input-csp i420 --input-range tv --input-depth 8 --fps 30000/1001 --bluray-compat --output-depth 8 --output "D:\Desktop\Working\2023-07-02@12_27_39_9910_01.264" -
same issue as with tryout1.

tryout3 used:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\Program Files\Hybrid\32bit\avisynthPlugins\LSMASHSource.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\mtmodes.avsi")
# loading source: D:\Desktop\Working\source.mkv
# color sampling YV12@8, matrix: bt470, scantyp: progressive, luminance scale: limited
LWLibavVideoSource("D:\Desktop\Working\source.mkv",cache=false,format="YUV420P8", prefer_hw=0,repeat=true)
# current resolution: 1920x1080
# interlace
AssumeTFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
# setting output fps to 29.970fps
AssumeFPS(30000,1001)
PreFetch(8)
#  output: color sampling YV12@8, matrix: bt470, scantyp: top field first, luminance scale: limited
return last

"C:\Program Files\Hybrid\32bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "D:\Desktop\Working\encodingTempSynthSkript_2023-07-02@12_28_50_9110_0.avs" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset slow --crf 16.00 --profile high --level 4.1 --ref 3 --keyint 25 --direct spatial --sync-lookahead 18 --rc-lookahead 12 --slices 4 --bff --weightp 0 --vbv-maxrate 62500 --vbv-bufsize 78125 --sar 8:9 --non-deterministic --range tv --colormatrix bt709 --demuxer raw --input-res 1920x1080 --input-csp i420 --input-range tv --input-depth 8 --fps 30000/1001 --bluray-compat --output-depth 8 --output "D:\Desktop\Working\2023-07-02@12_28_50_9110_02.264" -
Aside from the bff in the x264 call it looks fine.

=> seems like:
a. Hybrid doesn't properly create the ffmpeg decoding call when not using Avisynth or Vapoursynth for progressive to interlaced output.
b. Hybrid Avisynth/Vapoursynth scripting doesn't care whether you set your configure x264 to output bff or tff.

"Avisynth > Misc > Progressive to Interlace" <- I'll probably remove that there and move it to "(De)Interlace/Telecine".
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)