Log in

View Full Version : question about vaapi and crop


alturismo
29th October 2020, 15:44
hi, im experimenting with a live tv abr hls server here using ffmpeg vaapi for mobile usage.

so far im fine and got it working, where im stuck now is, im considering adding crop function for 2 35:1 videos to remove the black bars directly, but seems i dont get it to work together with my ffmpeg line, may someone has an idea ?

goal is after scaling also to crop (in this case -116 in height, like "crop=iw-116")

my current line is (removed the nobanner etc now for fail search)

ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
-i http://myurl.here/stream/123 -y \
-vf format=vaapi,hwupload,deinterlace_vaapi,scale_vaapi=854:-1 \
-c:v h264_vaapi -c:a aac -ar 48000 -ac 2 -map 0:0 -map 0:1 -map 0:0 -map 0:1 -map 0:0 -map 0:1\
-c:v:0 h264_vaapi -b:v:0 400k \
-c:v:1 h264_vaapi -b:v:1 800k \
-c:v:2 h264_vaapi -b:v:2 1200k \
-c:a:0 aac -ar 48000 -ac 2 -b:a:0 128k \
-var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2" \
-master_pl_name master.m3u8 \
-f hls -hls_time 6 -hls_list_size 10 -hls_flags delete_segments \
-hls_segment_filename "v%v/fileSequence%d.ts" \
v%v/prog_index.m3u8

for any tipps thanks ahead.