View Single Post
Old 29th December 2017, 23:39   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Automatically crop to 1920x1080i XDCAM with ffmpeg

Hi,
on my personal computer I generally use Avisynth to do all sort of post-processing and serve a 1920x1080i PAL 25fps video to ffmpeg to encode it as XDCAM 50 Mbit/s.
Unfortunately, at work we use Vantage to transcode, but it fails with some files.
I'm not allowed to install Avisynth, except in a standalone box.
(I can't always transfer files to that computer via Hard Drive, encode them with Avisynth and then transfer them back).
I'm however allowed to put ffmpeg.exe on every computer, 'cause it's portable.
Anyway, I'd like to use ffmpeg "automatically".
Let me get this straight.
I'd like ffmpeg to resize and crop files to 1920x1080i PAL 25fps, using Lanczos as resizer and make 8 mono audio tracks.
So far, I tried with this, but it doesn't crop automatically and it doesn't create 8 mono audio tracks.
I'd also like it to do frame rate conversion with blending.

Code:
ffmpeg.exe -i "test.mp4" -pix_fmt yuv422p -vcodec mpeg2video -vf "scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080" -vf yadif=1:tff,scale=w=1920:h=1080:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:sws_dither=0:in_range=tv:out_range=tv,unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.8,interlace -s 1920:1080 -aspect 16:9 -vf setfield=tff -flags +ildct+ilme -r 25 -b:v 50000k -minrate 50000k -maxrate 50000k -bufsize 36408333 -acodec pcm_s16le -ar 48000 -g 12 -bf 2 -profile:v 0 -level:v 2 -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -f mxf "output.mxf"
My target is XDCAM, so 4:2:2 yv16, 8bit, MPEG-2, closed GOP M=3, N=12, 50 Mbit/s, range limited, BT709, interlaced, TFF, 25fps PAL, with 8 mono PCM audio channels.

Last edited by FranceBB; 30th December 2017 at 01:20.
FranceBB is offline   Reply With Quote