Page 1 of 1

Merging MP4 with MP3 doesn't produce a valid videofile - why?

Posted: 13 Jun 2020 19:25
by ogassav
Dear all,

I have the following:

  • 3Gb MP4 (without audio), 1920x1080, 25fps, bitrate 2kbit/s
  • 130Mb MP3, bitrate 128kbit/s
I want to merge them into 1 video with audiotrack. Expecting the final file to be ~3.2Gb (as a sum of video + audio). As a result i have a 6Gb(!) videofile, which (ridiculous!) is not opened by VLC itself.

I choose Convert, add video file and audio file (via extended options checkbox) and use the following settings:

Profile: H.264 + MP3 (MP4)
Video Codec: keep original track
Audio Codec: Mpeg 4 Audio (AAC)

And of course i have AAC switched ON: Settings -> Codecs -> Videocodecs -> FFmpeg -> Strictly follow standards -> -2.

What am i doing wrong? I just want to keep the original quality/size of the video, but insert sountrack there.

Thank you!

Re: Merging MP4 with MP3 doesn't produce a valid videofile - why?

Posted: 14 Jun 2020 10:08
by Lotesdelere
Audio Codec: Mpeg 4 Audio (AAC)

Didn't you say MP3 and not AAC ?

Re: Merging MP4 with MP3 doesn't produce a valid videofile - why?

Posted: 14 Jun 2020 17:14
by ogassav
Didn't you say MP3 and not AAC ?

Well, first of all - good news: the final file size is reasonable now (~3.2Gb) and readable by VLC. Possibly i've mistaken somewhere yesterday, my bad then.

However this good result was achieved with:

  • AVI chosen as the destination file (yesterday i tried to make an MP4, because initial videofile is an MP4)
  • MP3 chosen as an audio codec (yesterday i tried AAC)

So looks like i just packed my initial videofile without any changes together with MP3 track into 1 AVI container, correct? Which works, but i will highly appreciate help with the following:

  • Is it OK to choose AVI as the resulting file, if you're satisfied with the initial video quality/size and just want to pack it into 1 file with audio?
  • Why didn't AAC work for me yestarday, while i've chosen it as a codec and prior to that - switch it on in VLC settings?
  • Is it true, that AAC is better than MP3, because MP3 is not played on certain devices, while AAC is almost always compatible with any device?
Thank you!

Re: Merging MP4 with MP3 doesn't produce a valid videofile - why?

Posted: 15 Jun 2020 11:28
by Lotesdelere
AVI is not good for H.264, you should use MP4 container.

H.264 + AAC is a perfect combo for MP4, however there are reports about conversion issues with latest versions of VLC.
Try with a nightly build:
https://nightlies.videolan.org
Or use a dedicated video tool such as AviDemux:
http://avidemux.sourceforge.net

AAC is usually considered transparent at a lower bitrate than MP3. For instance, 128 kbps is enough for AAC where MP3 would need 160 kbps for a similar listening experience.
However MP3 is the most compatible of any codec that I know. Even Windows 95, which is now 25 years old, could natively play MP3 whilst the very first version of AAC cames two years later.