#10874: Bug: ffmpeg/ffprobe/ffplay can't handle ts file with codec_name as 'png'
-------------------------------------+-------------------------------------
             Reporter:  Mike Zang    |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  6.1
  undetermined                       |
             Keywords:  leading 8    |               Blocked By:
  bytes is png header.               |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 When run ffprobe 001.ts, the message as below, this ts file's codec_name
 is 'png', the leading 8 bytes is a png header, the video is started from
 9th byte, ffprobe/ffplay/ffmpeg should add this type of video file:
 {{{
 % ffprobe 001.ts
 ffprobe version 2023-11-13-git-67a2571a55-full_build-www.gyan.dev
 Copyright (c) 2007-2023 the FFmpeg developers
   built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --pkg-
 config=pkgconf --disable-w32threads --disable-autodetect --enable-
 fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
 --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-
 librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
 --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24
 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-
 libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-
 libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-
 libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-
 libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-
 libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun
 --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
 --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
 --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-
 libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-
 libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-
 libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora
 --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-
 libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus
 --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b
 --enable-libflite --enable-libmysofa --enable-librubberband --enable-
 libsoxr --enable-chromaprint
   libavutil      58. 32.100 / 58. 32.100
   libavcodec     60. 33.100 / 60. 33.100
   libavformat    60. 17.100 / 60. 17.100
   libavdevice    60.  4.100 / 60.  4.100
   libavfilter     9. 13.100 /  9. 13.100
   libswscale      7.  6.100 /  7.  6.100
   libswresample   4. 13.100 /  4. 13.100
   libpostproc    57.  4.100 / 57.  4.100
 [png @ 00000196aa58e940] inflate returned error -3
 Input #0, png_pipe, from '001.ts':
   Duration: N/A, bitrate: N/A
   Stream #0:0: Video: png, pal8(pc, gbr/unknown/unknown), 800x800, 25 fps,
 25 tbr, 25 tbn
 }}}
 The message as below after skip leading 8 bytes:
 {{{
 % ffprobe 001-8bytes.ts
 ffprobe version 6.0 Copyright (c) 2007-2023 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0_1 --enable-shared
 --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-
 ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom
 --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl
 --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist
 --enable-librubberband --enable-libsnappy --enable-libsrt --enable-
 libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab
 --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp
 --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid
 --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r
 --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq
 --enable-libzimg --disable-libjack --disable-indev=jack --enable-
 videotoolbox --enable-audiotoolbox
  libavutil   58. 2.100 / 58. 2.100
  libavcodec   60. 3.100 / 60. 3.100
  libavformat  60. 3.100 / 60. 3.100
  libavdevice  60. 1.100 / 60. 1.100
  libavfilter   9. 3.100 / 9. 3.100
  libswscale   7. 1.100 / 7. 1.100
  libswresample  4. 10.100 / 4. 10.100
  libpostproc  57. 1.100 / 57. 1.100
 Input #0, mpegts, from ‘001-8bytes.ts’:
  Duration: 00:00:08.08, start: 1.480000, bitrate: 1180 kb/s
  Program 1
   Metadata:
    service_name  : Service01
    service_provider: FFmpeg
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
 yuv420p(tv, bt709, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn
  Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100
 Hz, stereo, fltp, 170 kb/s
 }}}

 This link "ffprobe output video:
 png"[https://stackoverflow.com/questions/59341324/ffprobe-output-video-
 png] can be referred, more information about such video file can be found
 as below
 {{{
 {'avg_frame_rate': '25/1',
  'closed_captions': 0,
  'codec_long_name': 'PNG (Portable Network Graphics) image',
  'codec_name': 'png',
  'codec_tag': '0x0000',
  'codec_tag_string': '[0][0][0][0]',
  'codec_type': 'video',
  'coded_height': 800,
  'coded_width': 800,
  'color_range': 'pc',
  'color_space': 'gbr',
  'disposition': {'attached_pic': 0,
                  'captions': 0,
                  'clean_effects': 0,
                  'comment': 0,
                  'default': 0,
                  'dependent': 0,
                  'descriptions': 0,
                  'dub': 0,
                  'forced': 0,
                  'hearing_impaired': 0,
                  'karaoke': 0,
                  'lyrics': 0,
                  'metadata': 0,
                  'non_diegetic': 0,
                  'original': 0,
                  'still_image': 0,
                  'timed_thumbnails': 0,
                  'visual_impaired': 0},
  'film_grain': 0,
  'has_b_frames': 0,
  'height': 800,
  'index': 0,
  'level': -99,
  'pix_fmt': 'pal8',
  'r_frame_rate': '25/1',
  'refs': 1,
  'time_base': '1/25',
  'width': 800}
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10874>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to