Merging multiple MXF-files?:
Just recently a live-performance was recorded onto a video-camera by a friend od mine.
The camera did store it as multiple .mxf files, which were given to me.
I now would like to convert the multiple .mxf files, and merge them together into a single .mp4 file.
Any hints on how to do that or how to adjust HandBrakes settings so it merges the converted mp4s into a single file?
HandBrake version 1.4.2 (2021100300):
Windows 10 Pro, 10.0.19042 Build 19042
NO Activity Log, since this is a general question on how to adjust the settings to get a merged mp4
general question: settings for merging multiple .MXF-files into one single MP4-file
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
-
- Posts: 3
- Joined: Tue Oct 26, 2021 2:05 pm
-
- Veteran User
- Posts: 4857
- Joined: Wed May 04, 2011 11:06 pm
- JohnAStebbins
- HandBrake Team
- Posts: 5726
- Joined: Sat Feb 09, 2008 7:21 pm
Re: general question: settings for merging multiple .MXF-files into one single MP4-file
ffmpeg is probably the tool you want to start with. Google turned up this tip https://www.arj.no/2019/11/03/convertin ... th-ffmpeg/
If you also want to re-compress or convert the video to another codec, then you could post-process with HandBrake.
If you also want to re-compress or convert the video to another codec, then you could post-process with HandBrake.
-
- Posts: 3
- Joined: Tue Oct 26, 2021 2:05 pm
Re: general question: settings for merging multiple .MXF-files into one single MP4-file
Thank you so much!JohnAStebbins wrote: ↑Tue Oct 26, 2021 4:10 pm ffmpeg is probably the tool you want to start with. Google turned up this tip https://www.arj.no/2019/11/03/convertin ... th-ffmpeg/
The method described in the article you shared is for Unix/Linux i guess, but I was able to "read" and "translate" it to Windows 10 using batch-commands.
This here is a highly "manual" method, but since I need this procedure ony once, its good enough for me.
Just in case if someone else ever has the same question and google finds this post, heres how to do it in Windows 10.
1.) go find ffmpeg. I found it here: https://www.ffmpeg.org/download.html#build-windows
2.) choose your os and download the matching ffmpeg for your os of choice. For Windows 10 it was here: https://www.gyan.dev/ffmpeg/builds/
I chose: ffmpeg-git-full.7z and downloaded it.
3.) unpack the 7z file (using 7-zip for example)
4.) navigate in the unpacked folder and find the "bin" folder within
5.) copy the file "ffmpeg.bin" from here to the folder where the .MXF-files are that you want to merge
6.) go to the folder where the .mxf files are and create a new text-document in this folder and call it "mxfs2mp4.bat"
7.) copy the following text into the file:
ffmpeg -f concat -safe 0 -i mylist.txt -c:v libx264 -vf yadif output.mp4
8.) create a second text-document in this folder and call it "mylist.txt"
9.) write the name of the mxf-files you want to combine/merge into a single mp4 into this file, trailing every filename with the word "file "
you need to create a line per filename you want to be merged
In my case the file "mylist.txt" looks like this:
file AA009901.mxf
file AA009902.mxf
file AA009903.mxf
10.) press WIN+R and write the command CMD and press enter
11.) navigate to the folder where the .mxf-files, the ffmpeg.bin, the mylist.txt and the file mxfs2mp4.bat are located (using the CHDIR command)
12.) when you have navigated to the specified folder, type the following command:
rename mxfs2mp4.bat.txt mxfs2mp4.bat
13.) no comment
14.) type the following command and press enter:
mxfs2mp4
converting starts and the status is shown during the process.
15.) afterwards the file "output.mp4" can be opened with VLC-player for example (in my case it didnt play with the win10 system-own player)
PS.: Thank you @JohnAStebbins for giving me the hint to stear towards the unix/linux ffmpeg mxf coversion page, and many thanks to Alexander Refsum Jensenius from @arj.no for providing the code I copied - without understanding it.
PSS.: Sorry in case this tutorial is much to "simple", but I guess not all camera- and video-guys and -girls are equally passionate coding-guys and -girls. This "cookbook" is manly dedicated to them.
-
- Posts: 3
- Joined: Tue Oct 26, 2021 2:05 pm
Re: general question: settings for merging multiple .MXF-files into one single MP4-file
9.) ... HEADING every filename with the word "file "