4x Full HD video to 1x 4K video (keep same quality)

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Handrem
Posts: 3
Joined: Tue Nov 17, 2020 3:38 pm

4x Full HD video to 1x 4K video (keep same quality)

Post by Handrem »

I have 4 different MP4 files each in a 1920x1080 resolution with the exact same length and identical audio tracks. The 4 parts combined will produce a single 3840x2160 (4K) movie. This situation exists because the video camera splits up the 4K footage to 4x FullHD (JVC GY-HMQ10).

How can I use handbrake to “stich”:
- TopLeft.mp4, TopRight.mp4, BottomLeft.mp4, BottomRight.mp4
In such a way that it is:
- keeps the best but different bitrates (per video) around 34000 kb/s.
- no video conversions, other encodings or quality adjustments.
- adds the unmodified audio track of TopLeft.mp4 (all the 4 separate FullHD video has the exact same audio).
- ideally the size of the single 4K output file would be somewhere near the sum of the 4 individual FullHD files.

I prefer to stich the above with a gui is this possible or only by command line?

Code: Select all

+----------------------+----------------------+
| FullHD Top Left      | FullHD Top Right     |
| 1920x1080@59.94fps   | 1920x1080@59.94fps   |
| duration 00:01:18.57 | duration 00:01:18.57 |
| bitrate:33752 kb/s   | bitrate: 33959 kb/s  |
| contains Audio       |                      |
+----------------------+----------------------+
| FullHD Bottom Left   | FullHD Bottom right  |
| 1920x1080@59.94fps   | 1920x1080@59.94fps   |
| duration 00:01:18.57 | duration00:01:18.57  |
| bitrate: 33689 kb/s  | bitrate: 33700 kb/s  |
+----------------------+----------------------+
+---------------------------------------------+
| OUTPUT                                      |
| 3840x2160@59.94fps                          |
| duration 00:01:18.57                        |
| bitrate:34000 kb/s                          |
| contains Audio                              |
|                                             |
|                                             |
|                                             |
|                                             |
|                                             |
+---------------------------------------------+

Code: Select all

Metadata example file (singe Full HD mp4):
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2012-07-28 14:24:40
    comment         : JVC
    comment-eng     : JVC
  Duration: 00:01:12.57, start: 0.000000, bitrate: 33959 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 33560 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
    Metadata:
      creation_time   : 2012-07-28 14:24:40
      handler_name    : JVC H.264
      encoder         : JVC H.264
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 385 kb/s (default)
    Metadata:
      creation_time   : 2012-07-28 14:24:40
      handler_name    : JVC AAC
Handrem
Posts: 3
Joined: Tue Nov 17, 2020 3:38 pm

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by Handrem »

stich = stitch :-)
mduell
Veteran User
Posts: 7258
Joined: Sat Apr 21, 2007 8:54 pm

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by mduell »

You need a video editor to do the layout. Davinci Resolve is free.

No encoder or editor is able to respect your preferences about the video encoding being unchanged. Use an appropriate quality-based encoding target to meet your preferences; bitrate may be higher or lower.
Woodstock
Veteran User
Posts: 3843
Joined: Tue Aug 27, 2013 6:39 am

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by Woodstock »

If the camera did the splitting, there should be a utility, supplied by the camera manufacturer, to put it back together for "further processing".
Handrem
Posts: 3
Joined: Tue Nov 17, 2020 3:38 pm

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by Handrem »

Thank you for the quick and helpful responses!

- @mduell I will take a look at Davinci Resolve and see if this can help me solve my problem.
- @Woodstock , The camera manufactuere (JVC) provides a simple tool specifaccly for this purpose. The big issue (since 2012) is that the provides software by JVC is the opposite of handbrake and the (open) philosophy. The 4K Clip Manager Software* indeed manages segmented 4K video files. But only creates single Apple ProRes editable files. It also requires Final Cut Pro X.

Before I dive into Davinci Resolve I want to double check with the community that if an workable FFMPEG command exists it does not mean it is also possible to run the same (sort of) command in Handbrake with a GUI or by CLI?

I have 20+ movies I need to stitch, so before I start this project I want to make sure I have the best possible (video)process in place and would very much like to master/use handbrake for the job!

Code: Select all

ffmpeg.exe 
-i FileA.mp4 -i FileB.mp4 -i FileC.mp4 -i FileD.mp4 
-filter_complex "[0:v]pad=iw*2:ih*2[tl]; [tl][1:v]overlay=w[tr];  [tr][2:v]overlay=0:h[bl]; [bl][3:v]overlay=w:h[out]" 
-map "[out]" 
-map 0:1 
-b 30000k 
-c:a copy output4K.mp4
* http://pro.jvc.com/prof/attributes/soft ... ture_id=17
Woodstock
Veteran User
Posts: 3843
Joined: Tue Aug 27, 2013 6:39 am

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by Woodstock »

To answer your ffmpeg=handbrake question, no. Handbrake isn't an ffmpeg "front end". It uses the encode/decode libraries and some other functions from ffmpeg, but it does not implement the ffmpeg interface.
musicvid
Veteran User
Posts: 3756
Joined: Sat Jun 27, 2009 1:19 am

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by musicvid »

I think you are causing confusion over double usage of the terms "stitch" and "split" and "join." These terms are usually reserved for segmenting or joining files linearly, as 1, 2, 3...., into or from one longer file. That is an encoding function called "cocatenation."

I "think" you are saying you have four clips and want to make a video wall with four panels. That is an editing function called "compositing," and it must be done in a nonlinear editor such as Resolve, not an encoder such as ffmpeg or Handbrake.
mduell
Veteran User
Posts: 7258
Joined: Sat Apr 21, 2007 8:54 pm

Re: 4x Full HD video to 1x 4K video (keep same quality)

Post by mduell »

Handrem wrote: Wed Nov 18, 2020 4:07 pm- @mduell I will take a look at Davinci Resolve and see if this can help me solve my problem.
- @Woodstock , The camera manufactuere (JVC) provides a simple tool specifaccly for this purpose. The big issue (since 2012) is that the provides software by JVC is the opposite of handbrake and the (open) philosophy. The 4K Clip Manager Software* indeed manages segmented 4K video files. But only creates single Apple ProRes editable files. It also requires Final Cut Pro X.

Before I dive into Davinci Resolve I want to double check with the community that if an workable FFMPEG command exists it does not mean it is also possible to run the same (sort of) command in Handbrake with a GUI or by CLI?
HB can read ProRes, so you can use the JVC tool to combine the clips and then encode with HB for delivery or further editing.

HB is not ffmpeg; if you want to use ffmpeg, head somewhere that supports ffmpeg.
Post Reply