User Tools

Site Tools


video:encoding

FFMPEG and NVENC

nVidia -hwaccel cuvid -c:v h264_cuvid
Start from frame -ss 5
HQ framerate 30fps -r ntsc
Use photoshop levels -vf curves=psfile=input.acv
Deblocking, Autolevels ,pp=ha/va/al
h264.bat
ffmpeg -i "%1" -codec:v h264_nvenc -b:v 20000k -maxrate 25000k -preset slow -bf 3 -g 220 -sws_flags lanczos -s 1920x1080 -codec:a aac -ab 192k "%1_1080p.mp4"

23fps to 60fps

23,976 / 60 = 0.3996 (39.96%)
Speed up 239.76%

Rotate 90degree

rotate90.bat
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4

Create slideshow from pictures

slideshow.bat
ffmpeg -f concat -i list.txt -codec:v libx264 -b:v 1000k -maxrate 20000k -filter:v "crop=in_w:in_h-360" -sws_flags lanczos -s 1920x1080 -aspect 16:9 -pix_fmt yuv420p -pass 1 -f mp4 NUL
ffmpeg -f concat -i list.txt -codec:v libx264 -b:v 1000k -maxrate 20000k -filter:v "crop=in_w:in_h-360" -sws_flags lanczos -s 1920x1080 -aspect 16:9 -pix_fmt yuv420p -pass 2 "slideshow.mp4"
list.txt
file '0.jpg'
duration 10
file '0_02.jpg'
duration 10
video/encoding.txt · Last modified: 2018/06/16 00:03 by Jan Forman