Opened 4 months ago

Last modified 4 months ago

#6258 new defect

tee muxer fails on stream copy

Reported by: araeos Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: muxer tee copy
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: I am trying to transcode a live video only once and output it to multiple files/urls. My audio stream does not need to be transcoded, but the tee muxer fails with codec "copy", producing an error message along the lines of Tag ... incompatible with output codec id ....

How to reproduce (all 3 commands fail similarly):


$ ffmpeg -i test.ts -report -c:v copy -c:a copy -map 0 -f tee '[f=mp4]output.mp4' > /dev/null 2>&1
$ ffmpeg -i test.ts -c:v copy -c:a aac -map 0 -f tee '[f=mp4]output.mp4' > /dev/null 2>&1
$ ffmpeg -i test.ts -c:v libx264 -c:a copy -map 0 -f tee '[f=mp4]output.mp4'
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.1 (GCC) 20170109
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mpegts, from 'test.ts':
  Duration: 00:00:01.25, start: 1.400000, bitrate: 9981 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x800 [SAR 1:1 DAR 8:5], 60 fps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 168 kb/s
[libx264 @ 0x564ae3da9c80] using SAR=1/1
[libx264 @ 0x564ae3da9c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x564ae3da9c80] profile High, level 4.0
[mp4 @ 0x564ae438ff60] Tag [15][0][0][0]/0x0000000f incompatible with output codec id '86018' ([64][0][0][0])
[tee @ 0x564ae3d7f700] Slave '[f=mp4]output.mp4': error writing header: Invalid data found when processing input
[tee @ 0x564ae3d7f700] All tee outputs failed.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing inputStream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

See attached file for detailed report logs with input file.

Attachments (1)

ffmpeg-tee-pseudo-muxer-report.zip (1.4 MB) - added by araeos 4 months ago.
input file with reports

Download all attachments as: .zip

Change History (6)

Changed 4 months ago by araeos

input file with reports

comment:1 Changed 4 months ago by araeos

A similar bug was encountered in a question on superuser.com and also described in a post with "-acodec copy".

comment:2 Changed 4 months ago by cehoyos

Is this issue reproducible with current FFmpeg git head?

comment:3 Changed 4 months ago by araeos

Yes, it fails for commit version 4f727fbc7330e726d003e2961fa676ddaf86f994 with the behaviour describe above.

$ ffmpeg -i test.ts -c:v libx264 -c:a copy -map 0 -f tee '[f=mp4]output.mp4'
ffmpeg version N-84509-g4f727fbc73 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.1 (GCC) 20170109
  configuration: --prefix=/usr --disable-debug --disable-static --enable-avisynth --enable-avresample --enable-fontconfig $
-enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --$
nable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libope$
jpeg --enable-libopus --enable-libfdk-aac --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --$
nable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp -$
enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree --enable-shared --enable-version3
  libavutil      55. 50.100 / 55. 50.100
  libavcodec     57. 85.101 / 57. 85.101
  libavformat    57. 67.100 / 57. 67.100
  libavdevice    57.  3.101 / 57.  3.101
  libavfilter     6. 78.100 /  6. 78.100
  libavresample   3.  2.  0 /  3.  2.  0
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, mpegts, from 'test.ts':
  Duration: 00:00:01.25, start: 1.400000, bitrate: 9981 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x800 [SAR 1:1 DAR 8:5], 60 $
ps, 60 tbr, 90k tbn, 120 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 168 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x265ed40] using SAR=1/1
[libx264 @ 0x265ed40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x265ed40] profile High, level 4.0
[mp4 @ 0x2e64a20] Tag [15][0][0][0]/0x0000000f incompatible with output codec id '86018' ([64][0][0][0])
[tee @ 0x2634700] Slave '[f=mp4]output.mp4': error writing header: Invalid data found when processing input
[tee @ 0x2634700] All tee outputs failed.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Error initializing output stream 0:0 --
Conversion failed!

comment:4 Changed 4 months ago by Cigaes

Automatic conversions are not implemented for AAC in the tee muxer. Patch welcome.

comment:5 Changed 4 months ago by araeos

I am not sure about conversions as I know ffmpeg only by it's command line.
The tee muxer fails explicitly when I do not want to transcode the audio stream. This also happens when the original h264 video is copied, instead of the audio as in the report above.

Note: See TracTickets for help on using tickets.