[FFmpeg-trac] #8446(undetermined:new): Audio Copy Changes Format

FFmpeg trac at avcodec.org
Fri Dec 27 13:02:42 EET 2019


#8446: Audio Copy Changes Format
-------------------------------------+-------------------------------------
             Reporter:  chris319     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  Audio Copy   |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I have a file with audio in the format pcm_s16be. When I try to copy this
 audio to another file using -c:a copy, it copies the audio but also
 transcodes it to AAC.

 If it's literally a copy, shouldn't the copy be pcm_s16be as well? How can
 I do this and wind up with a pcm copy of the original audio? I've tried
 -c:a pcm_s16be and it fails.

 The complete command is:

 "ffmpeg.exe","-y  -i short.mp4 -c:a copy  married.mp4"

 I am writing the audio to married.mp4 and it works well except for the
 transcoding to AAC.

 ffmpeg  -y  -i short.mp4 -c:a copy  married.mp4
 ffmpeg version git-2019-12-02-968c4cb Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 9.2.1 (GCC) 20191125
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
 --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 --enable-amf
   libavutil      56. 36.101 / 56. 36.101
   libavcodec     58. 64.101 / 58. 64.101
   libavformat    58. 35.100 / 58. 35.100
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 67.100 /  7. 67.100
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'short.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf58.20.100
   Duration: 00:02:18.54, start: 0.000000, bitrate: 4880 kb/s
     Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
 bt709/unknown/bt709), 1280x720 [SAR 1:1 DAR 16:9], 4486 kb/s, 59.94 fps,
 59.94 tbr, 60k tbn, 119.88 tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 384 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [libx264 @ 000002c8107af580] using SAR=1/1
 [libx264 @ 000002c8107af580] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX
 [libx264 @ 000002c8107af580] profile High, level 3.2, 4:2:0, 8-bit
 [libx264 @ 000002c8107af580] 264 - core 158 - H.264/MPEG-4 AVC codec -
 Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1
 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to 'married.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf58.35.100
     Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 59.94 fps, 60k tbn, 59.94 tbc
 (default)
     Metadata:
       handler_name    : VideoHandler
       encoder         : Lavc58.64.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 384 kb/s (default)
     Metadata:
       handler_name    : SoundHandler
 frame= 8302 fps=134 q=-1.0 Lsize=   34258kB time=00:02:18.49
 bitrate=2026.3kbits/s speed=2.24x
 video:27546kB audio:6498kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: 0.629034%
 [libx264 @ 000002c8107af580] frame I:34    Avg QP:20.66  size:175237
 [libx264 @ 000002c8107af580] frame P:2635  Avg QP:23.65  size:  6209
 [libx264 @ 000002c8107af580] frame B:5633  Avg QP:33.88  size:  1045
 [libx264 @ 000002c8107af580] consecutive B-frames:  6.0%  8.8%  5.2% 80.0%
 [libx264 @ 000002c8107af580] mb I  I16..4:  5.3% 35.9% 58.8%
 [libx264 @ 000002c8107af580] mb P  I16..4:  0.3%  0.3%  0.2%  P16..4:
 18.2%  3.5%  3.1%  0.0%  0.0%    skip:74.5%
 [libx264 @ 000002c8107af580] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:
 10.7%  1.1%  0.3%  direct: 0.4%  skip:87.5%  L0:33.1% L1:62.0% BI: 4.9%
 [libx264 @ 000002c8107af580] 8x8 transform intra:36.6% inter:57.4%
 [libx264 @ 000002c8107af580] coded y,uvDC,uvAC intra: 74.5% 60.0% 28.9%
 inter: 4.1% 1.3% 0.0%
 [libx264 @ 000002c8107af580] i16 v,h,dc,p: 27% 36% 20% 16%
 [libx264 @ 000002c8107af580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 39% 23%
 3%  3%  3%  3%  3%  7%
 [libx264 @ 000002c8107af580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 32%  8%
 4%  4%  5%  5%  4%  6%
 [libx264 @ 000002c8107af580] i8c dc,h,v,p: 47% 37% 13%  3%
 [libx264 @ 000002c8107af580] Weighted P-Frames: Y:0.2% UV:0.0%
 [libx264 @ 000002c8107af580] ref P L0: 74.1% 12.5% 10.3%  3.1%  0.0%
 [libx264 @ 000002c8107af580] ref B L0: 85.0% 12.7%  2.2%
 [libx264 @ 000002c8107af580] ref B L1: 92.6%  7.4%
 [libx264 @ 000002c8107af580] kb/s:1629.17

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8446>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list