How To Command Linux Ubuntu Convert Video To 4k?
How to convert video to 4k? Because in windows usually use wondershare video converter. But how on linux? Please help me i use ubuntu 16.04 64 bit
The most powerful video (and audio and even subtitles) conversion tool for Linux (and there are also binaries for Windows and Mac OS) is ffmpeg.
If You want to convert video file using ffmpeg, changing its resolution to 4k(~3840x2160), use command like this:
ffmpeg -i YourFile -vf scale=3840:2160 OutputFile4k.mp4
There are many other useful parameters for ffmpeg, which can be found by running it with --help option.
P.S. If You don't like console tools, You can install tool called HandBrake. It's easy to use GUI tool for converting video. Select input file, on size tab adjust values for output to be created in 4k.
Also check if You really need to convert video to 4k. If You have lower or higher resolution file You can play it as is on 4k monitor. Reconverting video with bigger or smaller resolution does not improve its quality.
Although there are many possibilities, particularly as regards the quality, size and codecs of your input video, your best choice would be FFmpeg.
Install this as follows:
sudo apt-get install ffmpeg
Then a command line such as the following should suffice:
ffmpeg -i input.mp4 -vf scale=3840:-2 \
-c:v libx264 -preset slow -crf 22 \
-c:a copy \
output.mp4
Explanatory Notes:
-
-vf scale=3840:-2
: This sets the width of the output video to 3840 while estimating the height to maintain the original aspect ratio -
-c:v libx264 -preset slow -crf 22
: Selects some reasonable settings to re-encode using H264 -
-c:a copy
: Simply copy the audio stream across rather than re-encode
This will provide you with excellent results but bear in mind there are countless possible tweaks to this command line to achieve even better results :)