Opened 3 years ago

Last modified 3 years ago

#9652 new enhancement

video remux failed, workd fine with options '-copyinkf'

Reported by: leo.z Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: IDR keyframe
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by leo.z)

Summary of the bug:
How to reproduce:

% ffmpeg -v verbose -i nokeyframe.ts -c copy -y 1.ts

ffmpeg -v verbose -i nokeyframe.ts -c copy -y 1.ts
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 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      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0x7526700] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7526700] decode_slice_header error
[h264 @ 0x7526700] no frame!
[h264 @ 0x7526700] non-existing PPS 0 referenced
    Last message repeated 2 times
[h264 @ 0x7526700] decode_slice_header error
[h264 @ 0x7526700] no frame!
[h264 @ 0x7526700] non-existing PPS 0 referenced
[h264 @ 0x7526700] decode_slice_header error
[h264 @ 0x7526700] no frame!
[h264 @ 0x7526700] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x7526700] decode_slice_header error
[h264 @ 0x7526700] no frame!
[h264 @ 0x7526700] Reinit context to 1920x1088, pix_fmt: yuv420p
[mpegts @ 0x751fdc0] max_analyze_duration 5000000 reached at 5016000 microseconds st:1
Input #0, mpegts, from 'nokeyframe.ts':
  Duration: 00:00:15.75, start: 2835.332000, bitrate: 5266 kb/s
  Program 1 
    Metadata:
      service_name    : STARWORLDHD
      service_provider: 
  Stream #0:0[0x51]: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(top first, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
  Stream #0:1[0x52]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 128 kb/s
[mpegts @ 0x76fdc00] service 1 using PCR in pid=256, pcr_period=80ms
[mpegts @ 0x76fdc00] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms
Output #0, mpegts, to '1.ts':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(top first, left), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k tbc
  Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.e=00:00:00.00 bitrate=N/A speed=   0x    
frame=    0 fps=0.0 q=-1.0 Lsize=     292kB time=00:00:15.36 bitrate= 155.6kbits/s speed=1.65e+03x    
video:0kB audio:240kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 21.364729%
Input file #0 (nokeyframe.ts):
  Input stream #0:0 (video): 767 packets read (9602767 bytes); 
  Input stream #0:1 (audio): 641 packets read (246144 bytes); 
  Total: 1408 packets (9848911 bytes) demuxed
Output file #0 (1.ts):
  Output stream #0:0 (video): 0 packets muxed (0 bytes); 
  Output stream #0:1 (audio): 641 packets muxed (246144 bytes); 
  Total: 641 packets (246144 bytes) muxed
[AVIOContext @ 0x8647880] Statistics: 0 seeks, 2 writeouts
[AVIOContext @ 0x7528e00] Statistics: 14122834 bytes read, 3 seeks


it seems something wrong with key frame parser.
input file: https://github.com/medialib-leo/files/raw/master/nokeyframe.ts

Change History (1)

comment:1 by leo.z, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.