[FFmpeg-user] ts random access extremely slow

我是科学家 summerpulse at qq.com
Tue Jun 30 08:37:16 CEST 2015


I am dealing with a ts file, following is ffprobe output:
ffprobe version N-45589-gb6a0b8b-   http://johnvansickle.com/ffmpeg/    Copyright (c) 2007-2014 the FFmpeg developers
  built on Aug 28 2014 02:30:32 with gcc 4.8 (Debian 4.8.3-9)
  configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  3.100 / 56.  3.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.103 /  5.  0.103
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[hevc @ 0x298b4a0] No start code is found.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] No start code is found.
    Last message repeated 2 times
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] No start code is found.
    Last message repeated 7 times
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] No start code is found.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[hevc @ 0x298b4a0] PPS id out of range: 0
[hevc @ 0x298b4a0] Error parsing NAL unit #2.
[mpegts @ 0x2987560] decoding for stream 0 failed
[mpegts @ 0x2987560] Could not find codec parameters for stream 0 (Video: hevc ([36][0][0][0] / 0x0024)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'mp4box-jlsj-4k.ts':
  Duration: 00:02:15.00, start: 0.001111, bitrate: 31116 kb/s
  Program 1 
    Stream #0:0[0x65]: Video: hevc ([36][0][0][0] / 0x0024), 25 tbr, 90k tbn, 90k tbc
    Stream #0:1[0x66]: Audio: eac3, 48000 Hz, 5.1(side), fltp, 448 kb/s



The problem I'm having is that seeking on this file is extremely slow, it took more than 1 minute to complete seek operation.
This ts file is 500MB in size, has 2,793,052 ts packets, 2750469 video packets, 137 video packets with random_acces_indicator.
What's the possible reason for the slow seek? Why is ffmpeg reporting these errors? What do I need to do for the analysis?


More information about the ffmpeg-user mailing list