[FFmpeg-user] ffmpeg remuxing from MTS to MP4 now produces an unreadable audio stream

Galen Menzel galen.menzel at utexas.edu
Sun Feb 18 10:02:03 EET 2018


Hi all,

I have been using ffmpeg regularly for a couple years to remux MTS files 
from my video camera into mp4 files. I use the following simple command:

```
ffmpeg -i [MTS_FILE] -acodec copy -vcodec copy [MP4_FILE]
```

Although the command I use hasn’t changed, recently this has stopped 
working. The resulting mp4 now contains an audio stream in a format that 
VLC (and Quicktime Player) can’t play. (VLC gives the following error: 
`VLC could not decode the format "AC-3" (No description for this 
codec)`)

Concretely, here is the audio stream information of an MTS file I’m 
working with, which plays just fine:

      Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
stereo, fltp, 256 kb/s

Here is the audio stream information from the mp4 of this file, which I 
remuxed last year, and which also plays fine:

      Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 
stereo, fltp, 256 kb/s (default)

And here is the audio stream information from the mp4 of this file when 
I remux it now using the same command, which does not play:

      Stream #0:1(und): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 
stereo, fltp, 256 kb/s (default)

As you can see, the file that I get now has the same encoding as the MTS 
file, but does not play, even though the MTS file does. And the file I 
generated last year has a different audio encoding (even though the 
commands that created these files were identical), but it plays fine.

If I first do what should be a vacuous remux of the MTS file with

ffmpeg -i [INPUT_MTS_FILE] -acodec copy -vcodec copy [OUTPUT_MTS_FILE]

the resulting MTS file has the following audio stream information:

      Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 
Hz, stereo, fltp, 256 kb/s

And when I remux *this* file into an mp4 container, the resulting file 
plays fine, and has the same audio stream as the file created last year:

      Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 
stereo, fltp, 256 kb/s (default)

But I would really rather not remux everything twice.

I am using the following version of ffmpeg, which I installed with 
macports:

```
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-avresample --enable-libmp3lame --enable-libvorbis
--enable-libopus --enable-librsvg --enable-libtheora
--enable-libopenjpeg --enable-libmodplug --enable-libvpx
--enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray
--enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype
--enable-libfribidi --disable-jack --disable-libopencore-amrnb
--disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm
--disable-libxcb-xfixes --disable-indev=jack --enable-opencl
--disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox
--enable-sdl2 --mandir=/opt/local/share/man --enable-shared
--enable-pthreads --cc=/usr/bin/cc --arch=x86_64 --enable-x86asm
--enable-libx265 --enable-gpl --enable-postproc --enable-libx264
--enable-libxvid --enable-nonfree --enable-libfdk-aac
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100
```

This is the first time I’ve noticed this issue, but the last time I 
remuxed files (with no issue) was last October, so this has manifested 
sometime in the last four months or so.

Does anyone have any ideas as to what is going on here? What do these 
various name/number pairs for the ac3 encoding mean? (e.g., `ac-3 / 
0x332D6361` vs `AC-3 / 0x332D4341` vs `[129][0][0][0] / 0x0081`. I’d 
appreciate any help or insight on this issue.

Thanks!

Best regards,

Galen


More information about the ffmpeg-user mailing list