Which ffmpeg keys I need to use to encode actual 50fps x264 progressive video with half resolution 960x540 from 50i 1920x1080 broardcast interlaced source (PAFF)?
Video
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 27
Bit rate : 4 443 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan type, store method : Separated fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.086
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
FranceBB
7th April 2019, 00:28
I'm not sure in ffmpeg, but in Avisynth it would be something like:
FFMpegSource2("yoursource.ts", atrack=-1)
BoB()
Spline36Resize(960, 540)
Which is basically indexing, bobbing to 50fps progressive and downscaling using a rather sharp resizing kernel.
Alternatively, if BoB() produces some artifacts, you can try with:
FFMpegSource2("yoursource.ts", atrack=-1)
tdeint(mode=1, order=-1, field=-1, mthreshL=6, mthreshC=6, map=0, type=2, debug=false, mtnmode=1, sharp=true, cthresh=6, blockx=16, blocky=16, chroma=true, MI=64, tryWeave=true, link=1, denoise=true, slow=2, opt=4)
Spline36Resize(960, 540)
If you are not concerned about speed, then you can use QTGMC which will achieve the best possible quality when it comes to deinterlace:
FFMpegSource2("yoursource.ts", atrack=-1)
QTGMC(Preset="placebo", Sharpness=1.00)
Spline36Resize(960, 540)
Last but not least, if your source has text that gets aliased after downscaling with such a sharp resizing kernel (like hardsubbed subtitles, other captions etc), you can use LanczosResize(960, 540) which is not so sharp as resizing kernel and it can actually be used to downscale contents with text, captions and so on.
Oh, almost forgot, obviously you can open the AVS Script in ffmpeg by giving the .avs script as input (-i "AVS Script.avs") and then encode the uncompressed A/V stream created by the frameserver (Avisynth) to whatever codec you want.
Cheers,
Frank.
Blue_MiSfit
7th April 2019, 01:33
With ffmpeg you can use the bwdif deinterlacing filter. It's quite good, and not too slow.
Mode 0 engages double rate (50fps) output. Mode 1 will output half rate. For example:
ffmpeg -i input.ts -vf bwdif=mode=0,scale=w=960:h=540 -c:v libx264 -crf 20 -c:a copy output.mp4
asxzwang
6th May 2019, 11:31
bob,推荐使用tmpgenc或者handbrake
https://i.loli.net/2019/05/06/5cd00cce60a19.png
https://i.loli.net/2019/05/06/5cd00cce82a34.png
With ffmpeg you can use the bwdif deinterlacing filter. It's quite good, and not too slow.
Mode 0 engages double rate (50fps) output. Mode 1 will output half rate. For example:
ffmpeg -i input.ts -vf bwdif=mode=0,scale=w=960:h=540 -c:v libx264 -crf 20 -c:a copy output.mp4
Modes work opposite :) 0 is for single fps and 1 for double. Double is the default one.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.