Opened 6 years ago

Closed 6 years ago

#6897 closed defect (fixed)

Invalid output file with -acodec copy

Reported by: Carl Eugen Hoyos Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mov regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://ffmpeg.org/pipermail/libav-user/2017-December/010789.html

$ ffmpeg -lavfi sine=d=1 -acodec pcm_s16le out.avi

FFmpeg does not error out when trying to mux an invalid (pcm) codec into mp4 since e199d90da6473abc0d010797b14f2ae2c9811d34

$ ffmpeg -i out.avi -acodec copy out.mp4
ffmpeg version N-89404-gdc7d5f9 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl
  libavutil      56.  5.100 / 56.  5.100
  libavcodec     58.  6.103 / 58.  6.103
  libavformat    58.  2.103 / 58.  2.103
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  7.100 /  7.  7.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[avi @ 0x278c380] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, avi, from 'out.avi':
  Metadata:
    encoder         : Lavf58.2.103
  Duration: 00:00:01.01, start: 0.000000, bitrate: 750 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf58.2.103
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      87kB time=00:00:00.99 bitrate= 712.2kbits/s speed=1.6e+03x
video:0kB audio:86kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.782313%

The output file is unreadable.

Change History (1)

comment:1 by Carl Eugen Hoyos, 6 years ago

Resolution: fixed
Status: newclosed

Fixed by John Stebbins in 4cfb01d6ae545cec4a507113a6cbcf3b6e727e94

Note: See TracTickets for help on using tickets.