Page 1 of 1
How to merge several MP4 files into one?
Posted: 15 Jan 2023 17:33
by Theofilos
Hello
How to merge several MP4 files into one?
I have VLC 3.0.11.
After selecting File>Open multiple files..., I selected several mp4 files to merge.
At the bottom I selected convert.
This showed up
There is no way to select the destination file, because VLC took both multiple source files (that's good) and multiple destination files (that's bad). There should be one.
Regards
Re: How to merge several MP4 files into one?
Posted: 16 Jan 2023 09:11
by Lotesdelere
I'm not sure it's doable with VLC, at least through the GUI. Because VLC is not an editor.
You'd better use a dedicated video editor tool such as AviDemux:
http://avidemux.sourceforge.net
Re: How to merge several MP4 files into one?
Posted: 16 Jan 2023 11:24
by Theofilos
Apparently this is possible:
https://docs.videolan.me/vlc-user/3.0/e ... ideos.html
I have 3 MP4 files with audio track only:
sample1.mp4 - 26:44
sample2.mp4 - 0:04
sample3.mp4 - 7:45
I transcoded them just in case, but it doesn't change anything.
I used Mode I.
Code: Select all
vlc sample1.mp4 sample2.mp4 sample3.mp4 --sout="#gather:std{access=file, mux=ts, dst=wynik.mp4}" --sout-keep
Firstly, VLC incorrectly shows a time of 7:52 for the result.mp4 file. The time runs on.
Secondly, the wynik.mp4 has only 26:44, i.e. the files have not been merged.
Why?
Re: How to merge several MP4 files into one?
Posted: 17 Jan 2023 10:20
by Lotesdelere
For an MP4 final file you should use mux=mp4, not ts.
Re: How to merge several MP4 files into one?
Posted: 17 Jan 2023 13:02
by Theofilos
Thank you very much.
It does indeed work.
So there is an error in the documentation.
One more thing.
After entering the command (under Windows):
Code: Select all
vlc sample1.mp4 sample2.mp4 sample3.mp4 --sout="#gather:std{access=file, mux=mp4, dst=wynik.mp4}" --sout-keep
Three instances of the VLC window appear. Two disappear and one remains.
The resulting file wynik.mp4 has zero value for a very long time.
It is not clear whether to close the window or wait.
Nothing happens in the window.
Re: How to merge several MP4 files into one?
Posted: 18 Jan 2023 11:21
by Lotesdelere
I'm sorry but I'm not familiar enough with VLC command line syntax, let's hope a dev will clarify that.
Re: How to merge several MP4 files into one?
Posted: 23 Jan 2023 00:09
by jimmyjak
Yeah, merging never seems to finish. File size stays at 0 for a long time, then jumps up to a real value, but the file always stays in use by VLC. When you finally close VLC, the file size jumps up a little more and is properly closed. If you try to play the file, all the audio past file1 is gone. Video plays to the end, but file seems corrupted somehow.
Re: How to merge several MP4 files into one?
Posted: 29 Jan 2023 13:30
by chrisjj2
I'm guessing Merge is a misnomer, the operation in fact being Concatenate.