Selur
8th May 2009, 12:50
I'd like to read progressive input through mencoder (and ffmpeg), filter it and pipe it as raw to x264.
Does someone know how to do this?
Decoding interlaced material, filter it, send it to x264 and create interlaced output works.
Here's how I do it:
Input:
> Format: MPEG Video
> Bitrate: 2 426 kBit/s
> Frame rate: 25.000
> Width: 544
> Height: 576
> Interlace mode: TFF
> PAR: 1.411
> Frame count: 499
> Duration: 00:00:20.040
FFmpeg:
ffmpeg -r 25 -i "test.mpg" -v 0 -vcodec rawvideo -s 704x576 -padleft 8 -padright 8 -vsync 0 -an -r 25 -pix_fmt yuv420p -f rawvideo - | x264 --crf 18 --level 4 --ref 1 --keyint 50 --min-keyint 25 --interlaced --partitions i4x4,p8x8,b8x8 --me hex --merange 16 --subme 5 --8x8dct --no-fast-pskip --aq-mode 0 --vbv-maxrate 25000 --vbv-bufsize 30000 --aud --nal-hrd --threads auto --sar 12:11 --no-psnr --no-ssim --progress --fps 25 --output "test.mp4" - 720x576Mencoder:
mencoder "test.mpg" -really-quiet -ovc raw -noskip -lavcopts threads=1 -lavdopts threads=1 -mc 0 -nosound -vf scale=704:576,expand=720:576,scale,format=i420 -sws 10 -fps 25 -of rawvideo -o - | x264 --crf 18 --level 4 --ref 1 --keyint 50 --min-keyint 25 --interlaced --partitions i4x4,p8x8,b8x8 --me hex --merange 16 --subme 5 --8x8dct --no-fast-pskip --aq-mode 0 --vbv-maxrate 25000 --vbv-bufsize 30000 --aud --nal-hrd --threads auto --sar 12:11 --no-psnr --no-ssim --progress --fps 25 --output "test.mp4" - 720x576
My problem is, I don't know how to change the mencoder/ffmpeg calls such that I get interlaced output for progressive input.
I looked at the man page of mplayer and ffmpeg but couldn't figure out how to do it, so any hints how to do it with mencoder and ffmpeg is appreciated.
Cu Selur
Ps.: I know the x264 call isn't tweaked at all, it's just for testing. I don't want to use avisynth or another tool.
Does someone know how to do this?
Decoding interlaced material, filter it, send it to x264 and create interlaced output works.
Here's how I do it:
Input:
> Format: MPEG Video
> Bitrate: 2 426 kBit/s
> Frame rate: 25.000
> Width: 544
> Height: 576
> Interlace mode: TFF
> PAR: 1.411
> Frame count: 499
> Duration: 00:00:20.040
FFmpeg:
ffmpeg -r 25 -i "test.mpg" -v 0 -vcodec rawvideo -s 704x576 -padleft 8 -padright 8 -vsync 0 -an -r 25 -pix_fmt yuv420p -f rawvideo - | x264 --crf 18 --level 4 --ref 1 --keyint 50 --min-keyint 25 --interlaced --partitions i4x4,p8x8,b8x8 --me hex --merange 16 --subme 5 --8x8dct --no-fast-pskip --aq-mode 0 --vbv-maxrate 25000 --vbv-bufsize 30000 --aud --nal-hrd --threads auto --sar 12:11 --no-psnr --no-ssim --progress --fps 25 --output "test.mp4" - 720x576Mencoder:
mencoder "test.mpg" -really-quiet -ovc raw -noskip -lavcopts threads=1 -lavdopts threads=1 -mc 0 -nosound -vf scale=704:576,expand=720:576,scale,format=i420 -sws 10 -fps 25 -of rawvideo -o - | x264 --crf 18 --level 4 --ref 1 --keyint 50 --min-keyint 25 --interlaced --partitions i4x4,p8x8,b8x8 --me hex --merange 16 --subme 5 --8x8dct --no-fast-pskip --aq-mode 0 --vbv-maxrate 25000 --vbv-bufsize 30000 --aud --nal-hrd --threads auto --sar 12:11 --no-psnr --no-ssim --progress --fps 25 --output "test.mp4" - 720x576
My problem is, I don't know how to change the mencoder/ffmpeg calls such that I get interlaced output for progressive input.
I looked at the man page of mplayer and ffmpeg but couldn't figure out how to do it, so any hints how to do it with mencoder and ffmpeg is appreciated.
Cu Selur
Ps.: I know the x264 call isn't tweaked at all, it's just for testing. I don't want to use avisynth or another tool.