简体   繁体   中英

can i use -crf and -s option in one command with ffmpeg

I want to create video streaming for phone. To do that i use ffmpeg to convert video into hls. For now i can convert video to hls using this command:

ffmpeg -y -i video.mp4 -profile:v baseline -level 3.0 -crf 51 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls video.m3u8.

I know i can reduce video image size by using this command:

ffmpeg -y -i video.mp4 -profile:v baseline -level 3.0 -s 640x360 -r 20 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls video.m3u8

can i use both -s and -crf in one command? Because i'm streaming for phone. so size is my main concern.

Yes you can, crf stands for constant rate factor which is unrelated to the dimensions of your output. Generally speaking you'll also get a conversion failed in your console when passing invalid flags.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM