News:

--

Main Menu

Allow E-AC3 when copying .ts to .mp4

Started by fiftyplus, January 03, 2017, 01:56:25 PM

Previous topic - Next topic

fiftyplus

I'm using avidemux since quite some time to cut ads from HD recordings in .ts container (H.264 + mpeg or E-AC3 audio). The target container is .mp4. All works fine with mpeg audio but avidemux doesn't ccpy if the audio is E-AC3.
In such a case there is an error popup "Only AAC, AC3, and mpegaudio supported for audio".
Based on that message I searched the source and found the location in muxerMP4.cpp that blocks E-AC3 audio.
Without really knowing many details I just changed the source to accept here WAV_EAC3.
The copying then just worked fine and the .mp4 contains the E-AC3 audio and plays fine with VLC and on the TV set.

In case you think it is a reasonable change, here is the diff:

eumagga0x2a

To mux AC3 into a MP4 container, please use the MP4v2 muxer from the dropdown list.

eumagga0x2a

Please scratch that, was too tired :o
muxerMp4v2:177 performs the same checks. Your patch would be

diff --git a/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4.cpp b/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4.cpp
index 952cf42..192bff3 100644
--- a/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4.cpp
+++ b/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4.cpp
@@ -68,9 +68,9 @@ bool muxerMP4::open(const char *file, ADM_videoStream *s,uint32_t nbAudioTrack,A
         for(int i=0;i<nbAudioTrack;i++)
         {
             uint32_t acc=a[i]->getInfo()->encoding;
-            if(acc!=WAV_MP2 && acc!=WAV_MP3 && acc!=WAV_AAC && acc!=WAV_AC3)
+            if(acc!=WAV_MP2 && acc!=WAV_MP3 && acc!=WAV_AAC && acc!=WAV_AC3 && acc!=WAV_EAC3)
             {
-                GUI_Error_HIG(QT_TRANSLATE_NOOP("mp4muxer","Unsupported"),QT_TRANSLATE_NOOP("mp4muxer","Only AAC, AC3, and mpegaudio supported for audio"));
+                GUI_Error_HIG(QT_TRANSLATE_NOOP("mp4muxer","Unsupported"),QT_TRANSLATE_NOOP("mp4muxer","Only AAC, AC3, E-AC3 and mpegaudio supported for audio"));
                 return false;
             }
         }


Any special reasons not to use MKV?

mean


eumagga0x2a

Thank you, just one quick question: does the bundled libmp4v2 support E-AC3 as well? If yes, E-AC3 can be added to MP4v2 muxer as well.

fiftyplus

No specific reason for not using MKV. MP4 was just the one where i could get both video and audio after quite some trials  :)

Placing similar changes also into into muxerMp4v2 made this working for me as well. It requires two files being patched.

vangelis

@eumagga0x2a

Any chance to incorporate the patch into the next release for macOS sierra?
I get the same error "Only AAC, AC3, and mpegaudio supported for audio" when trying to remux mkv/e-ac3 to mp4/e-ac3 with the mp4v2.

(Avidemx 2.6.18 macOS sierra 10.12.2)

Many thanks,
Vangelis

mean


vangelis

@mean

Fab. Will get the nightly and report back.

Vangelis

vangelis

#9
@ mean

Does not work with Avidemux2.6_r2017_01_14_3880d7c598b, still gives the same error.
Also the mkv I'm using contains a e-ac3 at 640kbps but avidemux recognises it as e-ac3 at 128kbps (see attached screenshot).

Any ideas?

V

mean

It should work with mp4 not with mp4v2

vangelis

#11
okay thanks, confirmed works with mp4.

Is it possible to make it work with mp4v2?

Also why the bitrate is not properly recognised?

Vangelis