Page 1 of 1
Video Corrections
Posted: Thu Jan 16, 2020 6:32 pm
by zkazzay
Hello Everyone,
I have been learning about encoding and technical video corrections using FFmpeg and FFAStrans in order to fix a couple errors in some legacy videos, but i can't seem to fix everything, and i would like to ask you for help on how to fix them, or what's the best way to do it (because i'm probably doing something wrong
)
I received videos that were bad converted from NTSC (23.97fps) to PAL (25fps) or from progressive to interlaced, and now most of them have repeated frames every X frames or cadence erros, is there any way to fix this? and what's the best way to convert this videos when i receive them?
I work with MXF XDCAM 422 50mb PAL i50, should i install any specific codec or something?
Thank you for your time and help.
Best Regards
Re: Video Corrections
Posted: Thu Jan 16, 2020 6:52 pm
by momocampo
Hello Zkazzay,
I can tell you if you try to convert a 24fps video file to 25 fps video file, every second an frame will be missing. FFAStrans must be find this frame somewhere, it can't create it so most of time the software copy the 24th frame and paste it in 25th.
You can try with motion compensation option but the result is often not good at all.
About progressive to interlaced, if you have the same fps it could be ok.
At last if your question is how to convert a 27.97 fps to xdcam hd 50i, I'm afraid the result will not nice...
Wait Steinar and Encodem advices but I already did some tests and the result were not those hoped for
Cheers.
Benjamin
Re: Video Corrections
Posted: Thu Jan 16, 2020 9:02 pm
by emcodem
Hey ZK,
an example video would help
Anyway, repairing destroyed content is always a hassle. You can for sure use AVISynth to make the situation better but this needs lots of trial and error and discussion. You either need some specialized commercial softare (maybe S&W has something for that) or if you want to do it using open source stuff, you need to make some friends in the doom9 avisynth section.
Your message leaves space for interpretation about what you want to do, do you just want to repair the faulty cadence stuff or do you want a workflow that first detects IF there is a cadence error and if yes, applies some repairing?
I see both is possible using ffmpeg/avisynth but detection will be the hell lot of work, i would always try to outsource that to a human instead of machine. Correction can for sure be done depending on the level of destruction of the source video using avisynth, e.g. restore the original framerate, then apply correct framerate conversion.
Re: Video Corrections
Posted: Fri Jan 17, 2020 11:02 am
by zkazzay
Hey guys,
Thanks both for your help and time.
@emcodem: I would like both, right now i have both a human and a QC software processing a check on the video files and most of our problems are source files already delivered with wrong encodings, mostly frame rate conversions due to NTSC > PAL.
I wouldn't mind creating a workflow that repairs all the wrong converted videos, or creating a workflow that detects the error and fixes it, I just don't know how to start on cadence errors.
And i would also like to learn more on this conversions at the first place, what's the best option when converting from 23.97 to 25?
Right now I have a conditional workflow that detects if the file is 23.97 or 29.97, if 23.97 -> fps converter with set playback speed to 25, if 29.97 > fps converter to 25 blend frames.
But i'm not sure this is the best method.
Re: Video Corrections
Posted: Fri Jan 17, 2020 11:46 am
by emcodem
I just don't know how to start on cadence errors
OK, so all filtering stuff in ffastrans is done using AVIsynth. There comes a copy of avisynth with ffastrans and a minimal amount of plugins. Basically if you want to go for "the best" framerate conversion, you cannot go with the stuff that comes with ffastrans but you will need to look up whats the current state of frc conversion using avisynth filters in the doom9 forum.
For FRC, you could e.g. use this as a starting point
https://forum.doom9.org/showthread.php?t=113256
Same for faulty cadence stuff, there are filters like e.g.
http://avisynth.nl/index.php/TIVTC/TDecimate but i never did this, so i don't know if this is the right plugin for you to start, better ask in doom9 forum.
But all of that requires lots of engineering, most people spend some years with it before they have really good solutions but if you have enough time to work on it, maybe some months are enough to get to your goal
The way to go for you would be like i said before: check out standalone Avisynth (without using ffastrans), make some friends in the Doom9 forum and create some sophisticated threads there providing example videos and ask for the doom9'ers opinions.
When you are done solving your problem using avisynth standalone, then you can come back to ffastrans in order to put your avisynth solution into an automated workflow.
If you dont know avisynth at all, you neet to get some basics like here:
http://avisynth.nl/index.php/First_script
Re: Video Corrections
Posted: Sat Jan 18, 2020 8:31 pm
by zkazzay
wow emcodem, thank you so much for your help mate.
Will start to learn about avisynth, I just don't have all that time to ensure all the video problems are solved. might have to go with the best that i can.
But thank you again for poiting me into the right direction and showing the available options to dive deep into it.
Re: Video Corrections
Posted: Mon Jan 20, 2020 11:56 am
by emcodem
Ay ZK,
so if you just need to get started soon, you best just use a workflow like that for FRC:
av/decode -> FPS Converter -> encode -> deliver
and make sure the framerate is not converted twice, e.g. set the encode node explicitly to the same framerate as the FPS converter.
In the FPS converter settings, you uncheck everything but "User Motion..." and set it to slow.
This is how you get the best frc using stock methods of ffastrans, and the result is really not bad even compared to the mighty Alchemist which is often taken as a reference for frc results.
Regarding the repairing you can upload a portion of your destroyed video (10-20 seconds), maybe someone finds the time to do some experiementing for you with it. But still it would be better to do the same on Doom9 because the people there are more experienced.