ConvertFPS Processor Error

Questions and answers on how to get the most out of FFAStrans
Post Reply
Noqras
Posts: 36
Joined: Mon Dec 16, 2019 4:32 am

ConvertFPS Processor Error

Post by Noqras » Tue Jun 02, 2020 4:06 am

Attached is a workflow (simple decode to convert fps to ffmpeg encode) I was using with good success back in v1.0.0.0 to convert 50i to 59.94i and 25p to 29.97p using Avisynth Convert FPS with the blend option.

I noticed recently however that this no longer works in v1.0.0.5 and I just get an error "New frame rate too small. Must be greater than 33.3092 Increase or use zone=.

I may very well be missing something in Avisynth that I just don't know, but considering this was working well for me in a previous ffastrans version I figured I might ask about this here, but I do know that something was fixed on the convert fps recently as well.

This doesn't happen when I uncheck the blend option but any idea how I get this to work again as it was previously with the blend option?
Attachments
50ito5994i.json
(2.69 KiB) Downloaded 13 times
FFAStrans 1.0.0.5
HP DL360p Gen8 - 2x Intel Xeon E5-2670 - 32GB RAM
2x HP SL230s
Windows Server 2008 R2 SP1 64-bit

emcodem
Posts: 629
Joined: Wed Sep 19, 2018 8:11 am

Re: ConvertFPS Processor Error

Post by emcodem » Tue Jun 02, 2020 11:19 am

Hey Noqras,

using a fresh 1.005 version and your workflow, i submit a 29.97 input and cannot reproduce your problem.
Any special guidance to reproduce?
Are you doing this productive? - convert forward to 29.97 using the FPS Converter (Avisynth) and then back to 24000/1001 using ffmpeg default fps converter filter? Or is this just to demonstrate the issue?

User avatar
FranceBB
Posts: 52
Joined: Sat Jun 25, 2016 3:43 pm
Location: Chelsea
Contact:

Re: ConvertFPS Processor Error

Post by FranceBB » Tue Jun 02, 2020 11:08 pm

Ok, so, first of all, I have reasons to believe that the workflow is wrong.
You're using an A/V decoder which will create a lossless audio video stream that is then opened up in Avisynth and given to the FPS Converter to 29.970fps and then to the DNX encoder.
Now, this would all be fine IF your sources are all progressive, which is not the case 'cause you said
Noqras wrote:
Tue Jun 02, 2020 4:06 am
tconvert 50i to 59.94i and 25p to 29.97p using Avisynth Convert FPS with the blend option.
So you want to feed it with 25i and 30i sources as well.

What goes on internally under the hood is simply an indexing and then a call to ConvertFPS(xx) where "xx" is your desired framerate.
This is perfectly fine for progressive sources but it will screw up badly interlaced ones as ConvertFPS is supposed to be working with frames, not fields.

What I suggest you to do is to add a bob-deinterlacer block BEFORE the blending one.

In other words: Indexing -> bob-deinterlacing -> Blending -> Encoding

Since you're using a custom-made ffmpeg block that expects 29.970i as input, I think I shall provide you a custom made Avisynth block to be put AFTER the bob-deinterlacing.

Code: Select all

ConvertFPS(60)
assumeTFF()
separatefields()
selectevery(4,0,3)
weave()
This way you're gonna get a 29.970 interlaced output no matter what and you can feed it to an encoder to be encoded at 29.970i.

Noqras
Posts: 36
Joined: Mon Dec 16, 2019 4:32 am

Re: ConvertFPS Processor Error

Post by Noqras » Wed Jun 03, 2020 2:20 am

@emcodem

Your right, leaving that ffmpeg encoder at 23.976p was a mistake, its supposed to be a 30000/1001 interlaced DNxHD145. I am currently getting the error with 25i media inputs.

@FranceBB

You're right! I messed up on the ffmpeg part of the workflow for this example as well but it looks like you got what I am trying to do. I am really just exploring the best way to do a standards conversion from 25p, 50p and 50i to 29.97p and 59.94i respectively.
I'll try out your suggestion right away, thanks for the avisynth script!
FFAStrans 1.0.0.5
HP DL360p Gen8 - 2x Intel Xeon E5-2670 - 32GB RAM
2x HP SL230s
Windows Server 2008 R2 SP1 64-bit

Noqras
Posts: 36
Joined: Mon Dec 16, 2019 4:32 am

Re: ConvertFPS Processor Error

Post by Noqras » Tue Jun 09, 2020 4:46 am

Well just to follow up it turns out that my main problem with doing it the way that I was originally, was that I was setting FPS Convert to 29.97 instead of 59.94 and when the output is interlaced, it does need to be set to 59.94 for the fields. That and the fact that my ffmpeg script was wrong in the example workflow I uploaded. So, all is good on that front.

Now I just need to work out exactly how to take an existing Avisynth script and change it a bit to use it in the Custom Avisynth Script processor within ffastrans as I'm still a bit lost on that. And then of course there is figuring out the best way to convert 25i to 59.94i and 25p to 29.97p and 50p to something else.
FFAStrans 1.0.0.5
HP DL360p Gen8 - 2x Intel Xeon E5-2670 - 32GB RAM
2x HP SL230s
Windows Server 2008 R2 SP1 64-bit

User avatar
FranceBB
Posts: 52
Joined: Sat Jun 25, 2016 3:43 pm
Location: Chelsea
Contact:

Re: ConvertFPS Processor Error

Post by FranceBB » Tue Jun 09, 2020 7:01 am

If you feed the DNx encoder with 59.940p then it's gonna divide it in fields and give you a proper 29.970i.
Once again, since you don't know how your input is gonna be, I would advise you to have:

AV Decoder -> Deinterlace (yadif2x) -> ConvertFPS(60) -> Encoder

This way if it's 25i it gets bob-deinterlaced to 50p, blended to 60p and divided in fields to get 29.970i.
You could also add a conditional block that leaves the file alone if the original frame rate is 29.970 (either progressive or interlaced) and just encodes it the way it is without any frame rate conversion.
This way you would avoid problems with telecined sources as well.
Last but not least, you could add another conditional that handles 23.976p files differently and hard telecine them.

If you don't know how to do it, I'll provide you the workflow when I have time.

Noqras
Posts: 36
Joined: Mon Dec 16, 2019 4:32 am

Re: ConvertFPS Processor Error

Post by Noqras » Tue Jun 09, 2020 7:56 pm

@FranceBB

I'm going to be playing around with this today and I'll give what you suggested a try for sure, thanks!

My main confusion on the Custom Avisynth script processor is how to properly use the m_clip variable as opposed to the usual avisynth sort of source assignment.

It should be a fairly simple workflow as it is only ever going to have 50i, 25p and 50p as input and those can certainly be going through conditionals to go to specific avisynth scripts for each to be optimum.
FFAStrans 1.0.0.5
HP DL360p Gen8 - 2x Intel Xeon E5-2670 - 32GB RAM
2x HP SL230s
Windows Server 2008 R2 SP1 64-bit

User avatar
FranceBB
Posts: 52
Joined: Sat Jun 25, 2016 3:43 pm
Location: Chelsea
Contact:

Re: ConvertFPS Processor Error

Post by FranceBB » Wed Jun 10, 2020 5:12 pm

Alright, done.

Image

It basically does what I described above with the addition of the Limiter TV Range.
Please note that clipping values are for 8bit clips, therefore if your DNxHD NTSC is 10bit, they have to be adjusted and scaled to 64, 940.

Workflow in attachment.

That should do what you need.

Cheers,
Frank
Attachments
test NTSC.json
(14.22 KiB) Downloaded 17 times

Noqras
Posts: 36
Joined: Mon Dec 16, 2019 4:32 am

Re: ConvertFPS Processor Error

Post by Noqras » Thu Jun 11, 2020 4:59 am

Wow you really rocked it, thanks!

The output is looking really good, best I've seen for PAL to NTSC framerates with free software.

You've also opened the door for me to use more Avisynth in FFAStrans instead of just FFMPEG as I can expand on its use with this workflow as a starting point.

Really appreciate it!
FFAStrans 1.0.0.5
HP DL360p Gen8 - 2x Intel Xeon E5-2670 - 32GB RAM
2x HP SL230s
Windows Server 2008 R2 SP1 64-bit

Post Reply