I have a few MP4 files of clips from my stream that were created wrong. They say the audio is AAC but they are actually Opus so no video player is able to figure out what to do since they are expecting AAC. Is it possible to repair these files?
Here's the error I saw with MPC-HC that details the issue: (Creator of LAVFilters verified the AAC/Opus mix up issue)
Code:Media Type 0: -------------------------- Audio: AAC 48000Hz stereo 151kbps AM_MEDIA_TYPE: majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71} subtype: Unknown GUID Name {53544441-0000-0010-8000-00AA00389B71} formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A} bFixedSizeSamples: 1 bTemporalCompression: 0 lSampleSize: 256000 cbFormat: 37 WAVEFORMATEX: wFormatTag: 0x4441 nChannels: 2 nSamplesPerSec: 48000 nAvgBytesPerSec: 18933 nBlockAlign: 1 wBitsPerSample: 0 cbSize: 19 (extra bytes) pbFormat: 0000: 41 44 02 00 80 bb 00 00 f5 49 00 00 01 00 00 00 AD..€»..őI...... 0010: 13 00|4f 70 75 73 48 65 61 64 01 02 38 01 80 bb ..OpusHead..8.€» 0020: 00 00 00 00 00 ..... Media Type 1: -------------------------- Audio: AAC 48000Hz stereo 151kbps AM_MEDIA_TYPE: majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71} subtype: Unknown GUID Name {000000FF-0000-0010-8000-00AA00389B71} formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A} bFixedSizeSamples: 1 bTemporalCompression: 0 lSampleSize: 256000 cbFormat: 37 WAVEFORMATEX: wFormatTag: 0x00ff nChannels: 2 nSamplesPerSec: 48000 nAvgBytesPerSec: 18933 nBlockAlign: 1 wBitsPerSample: 0 cbSize: 19 (extra bytes) pbFormat: 0000: ff 00 02 00 80 bb 00 00 f5 49 00 00 01 00 00 00 ˙...€»..őI...... 0010: 13 00|4f 70 75 73 48 65 61 64 01 02 38 01 80 bb ..OpusHead..8.€» 0020: 00 00 00 00 00 ..... Media Type 2: -------------------------- Audio AM_MEDIA_TYPE: majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71} subtype: Unknown GUID Name {AFBC2343-3DCB-4047-9655-E1E62A61B1C5} formattype: Unknown GUID Name {35189950-CAC9-4C8D-819D-B6FAEE15DD9D} bFixedSizeSamples: 1 bTemporalCompression: 0 lSampleSize: 256000 cbFormat: 43 WAVEFORMATEXFFMPEG: nCodecId: 0x15002 WAVEFORMATEX: wFormatTag: 0x00ff nChannels: 2 nSamplesPerSec: 48000 nAvgBytesPerSec: 18933 nBlockAlign: 1 wBitsPerSample: 0 cbSize: 19 (extra bytes) pbFormat: 0000: 02 50 01 00 ff 00 02 00 80 bb 00 00 f5 49 00 00 .P..˙...€»..őI.. 0010: 01 00 00 00 13 00 4f 70|75 73 48 65 61 64 01 02 ......OpusHead.. 0020: 38 01 80 bb 00 00 00 00 00 00 00 8.€».......
+ Reply to Thread
Results 1 to 8 of 8
-
Last edited by Dsme217; 3rd Mar 2019 at 19:56.
-
The problem (as I'm understanding from above) would apparently only affect those using LAVFilters with MPC-HC.
What you are using to check the file specs?
I'm curious if the problem is with how the files were created or with (what appears to be a LAVFilter bug) the media player itself. If it's the creation, then you will need to create them again and try to figure out which tool is broken...and thus fix or replace that tool. If it's the player (or from what I read above...LAVFilter), then you will need to wait for a fix from the creator.Google is your Friend -
Unfortunately these clips can't be recreated as they were live clips during my stream. I didn't have always-record enabled so I don't have a video of my full stream to edit.
There's no audio in any video player, youtube fails to process, video converters crash. "pbFormat" in the error log above shows the HEX where every video player breaks since it tries to decode the Opus header as AAC. Looking at the file with MediaInfo and comparing against a few working mp4's created the same way, the broken file has an audio format of HVXC instead of AAC LC and a title of "alt_audio_enc" instead of "simple_audio".
I think I'm just SOL unless there's a video converter that lets me force how to interpret the audio data input instead of using what it's told it is by the file. -
It may be possible to perform surgery on your files (back them up first!) with a hex editor. Search for the string "mp4a" and replace it with the string "Opus." (Maybe it should be "opus" without the capital. You can try it both ways.)
-
-
I would demux to raw audio stream and use format-specific tools to convert temporarily to uncompressed, then recompress to the proper format, then remux that result with the video.
I note that you have a stream format of "WAVEFORMAT_EX". Unless I'm mistaken, that is referring to a WAV stream type, which might be further complicating the efforts.
Scott -
You could extract the audio in Audacity and convert to a more suitable format, you'll want ffmpeg for Audacity. Then you would remove the audio from the video file, there is a lot of software out there that can do this. Then remux your converted audio back into your video file. Good luck to you!
https://www.guidingtech.com/12836/extract-audio-from-video-audacity/Last edited by sum_guy; 5th Mar 2019 at 14:45. Reason: added link
It's not important the problem be solved, only that the blame for the mistake is assigned correctly
Similar Threads
-
MP4 repair (AAC audio repair)
By holger123 in forum Newbie / General discussionsReplies: 16Last Post: 5th Jun 2020, 17:47 -
Dealing with OPUS audio of MP4/WEBM/MKV
By ConverterCrazy in forum Newbie / General discussionsReplies: 3Last Post: 31st Dec 2017, 01:36 -
Existing .mp4 AAC transcode to .mp4 AVC
By MelRay in forum Video ConversionReplies: 2Last Post: 14th Aug 2016, 16:11 -
Convert Mp4 (AAC) to MP4 (AC3)
By GreaterMuta in forum Video ConversionReplies: 3Last Post: 4th Oct 2014, 05:32 -
AAC repair
By smartel in forum AudioReplies: 4Last Post: 15th Aug 2014, 17:27