Opened 11 months ago

#10277 new defect

-c copy option does not copy the video stream in certain hevc files

Reported by: skyler Owned by:
Priority: normal Component: ffmpeg
Version: 6.0 Keywords: hevc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Trying to use ffmpeg to do a real-time stream copy of a stream that contains a HEVC video stream and three audio streams. No matter what I do, ffmpeg will copy the three audio streams with no problem (verified by using mediainfo) but it refuses to copy the HEVC video stream, even though it acts like it is doing it. Even using a syntax that specifically maps the video stream, such as

ffmpeg -i infile.ts -c:v copy -map 0:0 -c:a copy -map 0:1 -map 0:2 -map 0:3 outfile.ts

does not help. I get all the audio streams but no video. If I specify anything other than copy after -c:v then it works but it is too slow to use in real time. My eventual goal was to try to add the "Display aspect ratio : 16:9" attribute to the video stream metadata (otherwise the video is half height) but obviously that can't happen until the video stream gets copied. I've seen this issue in at least three different versions of ffmpeg (4.4, 6.0, and the nightly version shown below). More info on this issue is at https://old.reddit.com/r/ffmpeg/comments/11yq33i/why_would_ffmpeg_refuse_to_copy_the_hevc_video_in/?

How to reproduce:

% ffmpeg -i inputfile.ts -c copy outputfile.ts
ffmpeg version N-65014-g7c130d6911-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      58.  3.100 / 58.  3.100
  libavcodec     60.  6.101 / 60.  6.101
  libavformat    60.  4.100 / 60.  4.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  4.100 /  9.  4.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

ffmpeg-20230322-153358.log (257.0 KB ) - added by skyler 11 months ago.

Download all attachments as: .zip

Change History (1)

by skyler, 11 months ago

Attachment: ffmpeg-20230322-153358.log added
Note: See TracTickets for help on using tickets.