11

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

2
  • Can you give some details about the input video?
    – andrew.46
    Commented Jul 18, 2017 at 23:25
  • example i convert video 720p to 4K and 1080p to 4K. Commented Jul 19, 2017 at 23:28

2 Answers 2

8

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.

4
  • So like this example. ffmpeg -i myvideo.mp4 -vf scale=3840:2160 myvideo4k.mp4 Commented Jul 19, 2017 at 23:32
  • 1
    help me. not work. please check screenshot. pasteboard.co/GBJ8JMe.png i use command : ffmpeg -i video.mp4 -vf scale=3840:2160 video4k.mp4 title my video is video.mp4 Commented Jul 19, 2017 at 23:43
  • 1
    Hi @Hideki Nishimura . It tells You AAC encoder is experimental. By default can't be used. But we can force ffmpeg to use it. You can see in red error message You need to add -strict -2. Try add it like this: ffmpeg -i video.mp4 -vf scale=3840:2160 -strict -2 video4k.mp4
    – NoAngel
    Commented Jul 20, 2017 at 3:15
  • 1
    work :) great :) Commented Jul 21, 2017 at 5:51
5

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 :)

1
  • yes. Thanks for helping. Very happy to study here Commented Jul 21, 2017 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .