Losing SOME audio when combining MP4s

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
fritterandwaste
New Cone
New Cone
Posts: 2
Joined: 19 Jan 2022 12:54

Losing SOME audio when combining MP4s

Postby fritterandwaste » 01 Jun 2023 11:45

Hi

I am using the VLC (version 3.0.18) command line in a batch file to combine multiple MP4 files but only the audio from the first of the files being combined makes it on to the combined file while the remainder is silent. It is possible that the remaining audio is being tagged on to the end of the combined file as I accidentally noticed in one test that some audio continues after the end of the video.

The size of the combined MP4 corresponds approximately to the sum of the component file sizes. The command I am using is:

Code: Select all

%VlcExe% 00667.mp4 00668.mp4 00669.mp4 00670.mp4 --sout "#gather:std{access=file,dst=Test1.mp4}" --sout-keep --play-and-exit --audio
I only added the --audio switch as an attempt to overcome the problem but without success.

The individual MP4 files were converted from MTS prior to the combine (I tried various codecs) and play OK individually with audio.

For the record I did try combining using the user interface but that was significantly less successful and I'd prefer to use a command line anyway.

Any advice would be greatly appreciated, thank you.

bathsheba
New Cone
New Cone
Posts: 1
Joined: 28 Jun 2023 11:18

Re: Losing SOME audio when combining MP4s

Postby bathsheba » 28 Jun 2023 11:37

Complete newby here. Just downloaded vlc today. Any help suggestions gratefully received.

I have two mp4 files downloaded that are separated parts of the same film. (Also, have single separate subtitle file for the whole film.)
VLC can play both files independently and separately without any problem.
I just went through a routine to get vlc to merge these two files into one through a batch process.
- using this ..... "C:\Program Files\VideoLAN\VLC\vlc.exe" 1.mp4 2.mp4 --sout "#gather:std{access=file,dst=concatted.mp4}" --sout-keep

Then I went to play the newly concatenated file, also pulling in the subtitles.
Initially all worked, until the point where it hit the beginning of what was second mp4 file.
At this point the sound for the second portion stopped, and did not reappear, leaving only the film and the subtitles to continue to the end.

The above is the main issue that is troublesome.

However, (and not sure if somehow linked) I noticed that when running the above cmd file, VLC itself opens up, and the output file viewed through Win10 FileExplorer remains at zero bytes.
The file is only written to disk when I close VLC.

Thanks


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 31 guests