Can't add .ogg audio file, says file cannot be used as audio track

Started by Cormy1, September 04, 2018, 03:22:57 AM

Previous topic - Next topic

Cormy1

Version 2.7.1 Build 180807
mkv video imported, tried to replace audio track but it won't accept the file.
I suspect the issue is related to some special characters in the metadata but I don't really see why that would be an issue... It's a pretty regular file otherwise.

Jan Gruuthuse

The vorbis audio codec is only supported whilst re-encoding existing audio track in video.
For now you could use MKVToolnix GUI for adding ogm audio track to the video.
Perhaps this will change in future when developer(s) have a look at this.

Cormy1

Bumping this as a feature request, along with the same for AAC for MP4.
Kinda sad that I can demux these things but can't mux and match so to speak...

eumagga0x2a

Quote from: Cormy1 on October 11, 2019, 08:53:11 PM
along with the same for AAC for MP4.

Raw AAC as well as ADTS encapsulated AAC is supported since ages (with HE-AAC support fixed recently). If you mean support for audio-only mp4 files (m4a) as external audio track, conversion m4a <--> raw AAC is easily done with ffmpeg.

Cormy1

I'm not sure I understand, what type of file would you get with raw AAC...? You still need a container of some kind for it to be considered a file no?
All of what I do just involves muxing and demuxing as far as I'm aware, why are external audio tracks treated so strangely?

eumagga0x2a

Quote from: Cormy1 on December 17, 2019, 02:48:35 AM
I'm not sure I understand, what type of file would you get with raw AAC...?

I don't follow you. The file would be either a raw or an ADTS encapsulated AAC stream then, i.e. AAC frames (short portions of audio signal compressed with the AAC codec) without any container structures around them.

QuoteYou still need a container of some kind for it to be considered a file no?

Absolutely unrelated things, so no, absolutely not. A file is a sequence of bytes which can be accessed using the file API (usually allowing some basic stuff like seeking to an offset, but not necessarily). Such a sequence can be written to a mass storage device or be kept purely in memory, completely content-agnostic.

QuoteAll of what I do just involves muxing and demuxing as far as I'm aware, why are external audio tracks treated so strangely?

The current architecture of Avidemux doesn't allow to use demuxers ( = modules which extract audio and video streams from containers, which are data structures serving the purpose to hold information about the streams and to link time offsets to an offset within the file) for audio-only files, i.e. no MPEG-4, no Matroska, no Ogg containers are possible for external audio. The stream must be raw.

Cormy1

So any container which has the potential to contain video, but is a file that only contains audio, is not considered to be an audio stream and cannot be important in avidemux is that right?
Besides MPEG-4, Matroska and ogg, are there others that can't be imported?
Are opus and mp3 audio streams? They're still containers right, but don't have to be demuxed?

eumagga0x2a

Quote from: Cormy1 on January 29, 2020, 02:32:29 AM
So any container which has the potential to contain video, but is a file that only contains audio, is not considered to be an audio stream and cannot be important in avidemux is that right?

It must be a raw audio stream, so no container is possible, no matter suitable for video or not.

QuoteBesides MPEG-4, Matroska and ogg, are there others that can't be imported?

None can be imported.

QuoteAre opus and mp3 audio streams?

Raw opus streams are not supported (I doubt anything can play them at all), opusfile is an opus audio stream in an Ogg container and thus unsupported. mp3 files are raw audio streams and supported.



SilverbackNet

Quote from: eumagga0x2a on October 11, 2019, 11:09:48 PM
Quote from: Cormy1 on October 11, 2019, 08:53:11 PM
along with the same for AAC for MP4.

Raw AAC as well as ADTS encapsulated AAC is supported since ages (with HE-AAC support fixed recently). If you mean support for audio-only mp4 files (m4a) as external audio track, conversion m4a <--> raw AAC is easily done with ffmpeg.
If adding them as a new audio track is supported, it sure isn't working for me. Neither AAC nor MP4-ecapsulated AAC, both give "this file cannot be used as an audio track", and I've tried several different tools to export the audio. (LC AAC 44100 Stereo in each case.)

eumagga0x2a

No need to try mp4 encapsulated AAC, it won't work, but if a raw AAC stream is not detected as an external audio track in the latest nightly build, please provide it as a sample.

ffmpeg -i encapsulated_aac.mp4 -c copy raw_aac.aac

should output a file which Avidemux is able to use as an external audio track.