Hi,
I'm trying to learn how to get best possible deinterlaced output from FFMPEG but are quite new to scripting and all options FFMPEG gives. Could anyone perhaps give som suggestions to optimal quality output?
I've got quite a lot of interlaced material from both analog videocameras as well as various interlace digital from mini DV camera as well as 1080i video.
This is what I've got at the moment to deinterlace an analog interlaced PAL video:
ffmpeg -i "input.avi" -vf yadif=1:-1:0,mcdeint=2:1:10,scale=w=720:h=576 -c:v libx264 -preset slow -crf 18 "output.mpg"
This is, from my understanding motiondetected YADIF deinterlaced PAL video without any scaling.
Any suggestions for archiving even better image quality using FFMPEG and how would that script look like?
The output becomes VFR, but I'm not sure if that's good or bad..?
Thanks!
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
-
The output becomes VFR, but I'm not sure if that's good or bad..?
Any suggestions for archiving even better image quality using FFMPEG and how would that script look like?Code:yadif=1:-1:0,mcdeint=2:1:10,
Why the ",scale=w=720:h=576"-part if you don't want to scale?
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Thanks for your reply Selur.
OK, what I suspected about VFR.
Would you say -r 50 (for 50 framerate) is the way to solve that?
Thanks for your suggestion regarding bwdif, I will try that.
As to the scale=w=720:h=576, it's the resolution of the input video and I was thinking I might have to state that. But perhaps not?
I also added fieldorder since its Bottom Frame First, if that's needed?
This is what I'm having right now, what do you think about this? Good way to go?
ffmpeg -r 50 -i "input.avi" -vf fieldorder=bff,bwdif=mode=1,scale=w=720:h=576 -c:v libx264 -preset veryslow -crf 17 "output.mpg"
Thanks! -
I also added fieldorder since its Bottom Frame First, if that's needed?
Would you say -r 50 (for 50 framerate) is the way to solve that?
As to the scale=w=720:h=576, it's the resolution of the input video and I was thinking I might have to state that. But perhaps not?
"output.mpg"
Better use .mp4, .mkv or even .ts/.m2ts.users currently on my ignore list: deadrats, Stears555 -
Thanks again. I realize I really do not have enough knowledge regarding this.
What I'm trying to do is de-interlace an old analog PAL video (4:3 720x576) to be able to try out upscale and improved image with Topaz Video Enhance AI.
This is mediainformation regarding the output. What would you suggest?
General
Complete name : output.avi
Format : AVI
Format/Info : Audio Video Interleave
Commercial name : DVCPRO
Format profile : OpenDML
File size : 6.87 GiB
Duration : 32 min
Overall bit rate mode : Constant
Overall bit rate : 30.5 Mb/s
Video
ID : 0
Format : DV
Commercial name : DVCPRO
Codec ID : dvsd
Codec ID/Hint : Sony
Duration : 32 min
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Encoded bit rate : 28.8 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Stream size : 6.48 GiB (94%)
Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 32 min
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 354 MiB (5%)
Alignment : Aligned on interleaves
Interleave, duration : 40 ms (1.00 video frame)
Interleave, preload duration : 40 ms -
Thanks for your suggestion Selur.
What data is saying it's not square pixels? Or are you just using calculating the 4:3 and comparing with 720x576? Just trrying to learn.
I tried the mediainfo app that was linked and this is what it says:
General
Complete name : input.avi
Format : AVI
Format/Info : Audio Video Interleave
Commercial name : DVCAM
Format profile : OpenDML
File size : 6.87 GiB
Duration : 32 min 14 s
Overall bit rate mode : Constant
Overall bit rate : 30.5 Mb/s
Video
ID : 0
Format : DV
Commercial name : DVCAM
Codec ID : dvsd
Codec ID/Hint : Sony
Duration : 32 min 13 s
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Stream size : 6.48 GiB (94%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 32 min 14 s
Bit rate mode : Constant
Bit rate : 1 536 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Bit depth : 16 bits
Stream size : 354 MiB (5%)
Alignment : Aligned on interleaves
Interleave, duration : 40 ms (1.00 video frame)
Interleave, preload duration : 40 ms
Given your comments and suggestions, is this perhaps what you would suggest for best result?
ffmpeg -r 25 -i "input.avi" -vf fieldorder=bff,bwdif=mode=1 -c:v libx264 -preset veryslow -crf 17 "output.mp4" -
What data is saying it's not square pixels?
Looking at your data:
Code:Width : 720 pixels Height : 576 pixels Display aspect ratio : 4:3
and a sample aspect ratio of 720:576 = 5:4
if the pixel aspect ratio as 1:1 these two should be equal, which they are not.
Given your comments and suggestions, is this perhaps what you would suggest for best result?Code:-bsf:v "h264_metadata=sample_aspect_ratio=4/3"
users currently on my ignore list: deadrats, Stears555
Similar Threads
-
forced output ffmpeg
By lomero in forum Video ConversionReplies: 11Last Post: 17th Feb 2021, 02:37 -
Corrupted output video from FFMPEG at high quality
By 31feesh in forum Newbie / General discussionsReplies: 6Last Post: 30th Jan 2021, 23:23 -
what is the location of output files in ffmpeg?
By jraju in forum Newbie / General discussionsReplies: 45Last Post: 24th Oct 2019, 06:59 -
FFmpeg Multiple Output
By m00511 in forum Newbie / General discussionsReplies: 7Last Post: 10th Aug 2018, 14:05 -
ffmpeg: how to save output as TGA SEQUENCE?
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 25th Sep 2016, 09:44