No audio in output file (mp4 format) when audio track is added

Started by Tisthammerw, April 03, 2016, 02:02:42 PM

Previous topic - Next topic

Tisthammerw

When I create an output file in the mp4 format there isn't any audio in it.

Operating system: Windows 10, 64-bit.
Avidemux version: 2.6.12.
Video Output: Mpeg4 AVC (x264)
Output Format: MP4v2 Muxer
Audio Output: Copy (I'm using AAC, mono channel)

The audio was added this way: I went to the menu selecting Audio > Select Track.  I clicked on [Track # ] and changed this to [.... Add audio track] and browsed to audio track I wanted to add in the video and selected the audio file.  When I rendered the video however, the video is OK but there is no audio.

The first time I tried doing this is when I had a PNG image sequence I wanted to convert to a video (with the audio track added of course).  I've already went to the "Audio" tab in the preferences and the "AudioDevice" is selected as "Win32" rather than "Dummy."  A more recent attempt is when I converted a PNG image sequence into video with no audio, opened that mp4 video in Avidemux and tried to add the audio track.  Again, upon rendering the video was fine but there was no audio in the output file.

Jan Gruuthuse

QuoteAudio Output: Copy (I'm using AAC, mono channel)
Can you try using an audio track in .wav format or .mp3 format and append this track in avidemux.

With the rendered video without audio sound loaded. Can you confirm in that video audiotrack is present and no sound is present on that audio track.
Video Output set to [Copy]
Output Format set to  [MP4v2 Muxer]
and via Menu Audio
Enable Track 1 [v] or If Track 1 is enabled change [Track 0 form video ...] to [.... Add Audio track]
and browse to the .wav or .mp3 file and select that audio file!
In Audio Tracks Configuration for the appending track change [copy] to [AAC (lav)] press [OK].
Save the video like that. Check if you have now aac audio track with audio sound?

mp4v2 with aac adio track 4.1 MB doownload

AQUAR

Just a guess:
I think you might be trying to add a raw ADTS file (.aac file).
IIRC ADTS files are not typically decodable without being containerised.

I've never had the need to do this but I'd be looking for something that can read it and transcode or put it in a container.

Using the latest nightly - I have no issues with adding readable raw audio tracks (mp3 ac3 "wav"etc).
Also no issues with copying or transcoding source material containing aac audio (incl mono) muxed into the mp4 container.
The only proviso is that I tried on a win 7 64 bit system rather than a win 10 64 bit system.

When I select an external aac audio track from an external media file, the aac track is seen as an AC3 track that is very short (maybe a single ADTS packet!).
It seems to me that ADM does not get along with external aac audio (IIRC this was true for ADM 2.5 as well!).

I don't have time to create a proper win 10 virtual system (only have a buggy beta setup!).


AQUAR

@ Jan

Short and sweet reply from Mean.
I also wasn't sure if ADM 2.6 inherited the "no external aac support" as in ADM 2.5.

Its also why I thought this case was best in a new thread!

I assume you created the "AAC" files in audacity.
Must DL this audio program and play with it. 

Jan Gruuthuse

The aac was created with avconv (libav developers) forked ffmpeg. By the end of the month will be back on ffmpeg in ubuntu 16.04: Debian to switch back to ffmpeg [Posted July 8, 2015 by corbet]
Stereo track m4a was created with audacity. Windows users are advised to install additional plug-in:
FFmpeg import/export library ââ,¬â€œ Allows Audacity to import and export many additional audio formats such as AC3, AMR(NB), M4A and WMA, and to import audio from video files. Drag and drop video on audacity workspace.

mean

The problem with AAC is that it is not self contained, like MP3 or AC3. It needs a container, like vorbis.

So to add support for an external AAC, you must add support for AAC *AND* support for the container
it could be mp4A, ADTS, ADTS/LOAE etc...
It's a bit complicated, and furthermore i would expect plenty of queries "my AAC does not work", because it is in fact
AAC in ADTS/LOAE or another not so common format

ADTS is a very simple format, the other ones, in particular mp4a are complicated


AQUAR

Would it be hard to code up ADM so as to allow an aac audio track, in a media file, to be saved as an aac in ADTS audio file and import it back in as an external audio file?

Right now people blindly use the save audio function / import external audio function, but become confused as to why sometimes it works and sometimes it does not.

The "sometimes not" case for "save audio" being due to ADM saving a data file with raw aac in it. That file is not even readable/importable by ADM itself.

You then get a dual benefit:
Better audio save functionality (less end user queries against this function!)
Can then say that external aac is only supported in an ADTS container (also should result in less queries against this function!).

Only posing the question in terms of  "is this a practical / worthwhile future goal for ADM". 

AQUAR

Thanks Mean for implementing the minimal "save AAC audio" feature.