
How to Convert to MP4 1080p to 240p, 360p, 480p and 720p using FFmpeg cli.įfmpeg -i input.mp4 -s 426x240 -b:v 200k -vcodec libx264 -strict experimental -c:a aac -ar 96k output_240p.mp4įfmpeg -i input.mp4 -s 640x360 -b:v 300k -vcodec libx264 -strict experimental -c:a aac -ar 96k output_360p.mp4įfmpeg -i input.mp4 -s 842x480 -b:v 400k -vcodec libx264 -strict experimental -c:a aac -ar 96k output_480p.mp4įfmpeg -i input.mp4 -s 1280x720 -b:v 720k -vcodec libx264 -strict experimental -c:a aac -ar 96k output_720p. $ ffmpeg -i file_name.mp4 -codec: copy -bsf:v h264_mp4toannexb -start_number 0 -hls_time 10 -hls_list_size 0 -f hls file_name.m3u8 If you have mp4 generated from online streams so then, You need to use the following command to convert mp4 to HLS. $ ffmpeg -i file_name.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls file_name.m3u8 You need to use the following command for that, In case you do not have any mp4 video right now, So you can download from internet the sample mp4 video for testing. You need to update the current ubuntu repository and then you need to install FFmpeg package by using the command. Install FFmpeg Ubuntu with examples on files, directories, permission, backup, ls, man, pwd, cd, linux, linux introduction, chmod, man, shell, pipes. $ sudo add-apt-repository ppa:jonathonf/ffmpeg-4 You need to add the FFmpeg repository by using the command by using the command. In this post, We will install FFmpeg on Ubuntu 16.04 | 18.04 | 20.04 At its center is simply the FFmpeg program, intended for order line-based handling of video and sound documents, and broadly utilized for group transcoding, essential altering, video scaling, video after creation impacts, and models consistence.


FFmpeg is a free and open-source venture comprising of a huge programming suite of libraries and projects for taking care of video, sound, and other media records and streams.
