Comskip codec problems

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
Post Reply
mwpmorris
Posts: 1
Joined: Fri Feb 07, 2020 12:45 pm

Comskip codec problems

Post by mwpmorris »

Hi,

I've been a user of Comskip on my Synology DS718+ NAS for a few months. Everything was working ok until (I think) a TVHeadend / ffmpeg update a couple of weeks ago. Now it seems that Comskip / ffmpeg is unable to analyse HD recordings made via TVHeadend (SD recordings seem to be ok).

I'm recording from a standard DVB antenna via a HDHomerun to mpeg.ts files.

Running Comskip with or without an .ini file gives me output similar to the below:

Code: Select all

comskip -v 10 "/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts"
Comskip 0.82.009, made using ffmpeg
Donator build
The commandline used was:
comskip -v 10 "/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts"

No INI file found in current directory.  Searching PATH...
INI file found at comskip.ini
No INI file found anywhere!!!!
Setting verbose level to 10 as per command line.
Mpeg:	/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts
Exe	comskip.exe
Logo:	/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.logo.txt
Ini:	comskip.ini

Detection Methods to be used:
	1) Black Frame
	2) Logo - Give up after 2000 seconds
	3) Resolution Change
	4) Closed Captions
	5) Aspect Ratio
	6) Silence


ComSkip throttles back from -0001 to -0001.
The time is now 1149 so it's full speed ahead!

Settings
--------

[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] SPS unavailable in decode_picture_timing
[h264 @ 0x95cb280] non-existing PPS 0 referenced
[h264 @ 0x95cb280] decode_slice_header error
[h264 @ 0x95cb280] no frame!
[h264 @ 0x95cb280] mmco: unref short failure
[h264 @ 0x95cb280] mmco: unref short failure
[h264 @ 0x95cb280] Increasing reorder buffer to 3
[mpegts @ 0x95856c0] PES packet size mismatch
[mpegts @ 0x95856c0] Could not find codec parameters for stream 2 (Unknown: none ([17][0][0][0] / 0x0011)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts':
  Duration: 00:00:35.00, start: 94196.347767, bitrate: 4916 kb/s
  Program 1 
    Metadata:
      service_name    : ITV HD
      service_provider: 
    Stream #0:0[0xc9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xca](eng): Audio: aac_latm (LC) ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp
    Stream #0:2[0xce](eng): Unknown: none ([17][0][0][0] / 0x0011) (visual impaired) (descriptions) (dependent)
    Stream #0:3[0xcd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Unsupported codec!
Could not open video codec
/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts: could not open video codec
I've done some exhaustive troubleshooting, all of which have come to nothing. My findings are as follows:

My Synology has two installs of ffmpeg:
/bin/ffmpeg (2.7.1)
/var/packages/ffmpeg/target/bin/ffmpeg (4.2.1)

I'm fairly sure the older version is vital to other applications on the NAS, so don't want to change anything if I can help it. Additionally, I'm fairly sure that Comskip is using the new version of ffmpeg, as temporarily renaming the ffmpeg folder throws up an error in Comskip.

Recording with different stream profiles in TVHeadend - i.e. to .mkv or .mp4 files gives me similar "unsupported codec" results, but with additional errors (mmco: unref short failure):

Code: Select all

comskip -v 10 "/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.mkv"
Comskip 0.82.009, made using ffmpeg
Donator build
The commandline used was:
comskip -v 10 "/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.mkv"

No INI file found in current directory.  Searching PATH...
INI file found at comskip.ini
No INI file found anywhere!!!!
Setting verbose level to 10 as per command line.
Mpeg:	/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.mkv
Exe	comskip.exe
Logo:	/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.logo.txt
Ini:	comskip.ini

Detection Methods to be used:
	1) Black Frame
	2) Logo - Give up after 2000 seconds
	3) Resolution Change
	4) Closed Captions
	5) Aspect Ratio
	6) Silence


ComSkip throttles back from -0001 to -0001.
The time is now 1226 so it's full speed ahead!

Settings
--------

[h264 @ 0xa32a2c0] mmco: unref short failure
[h264 @ 0xa32a2c0] mmco: unref short failure
[h264 @ 0xa32a2c0] Increasing reorder buffer to 3
Input #0, matroska,webm, from '/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.mkv':
  Metadata:
    title           : This Morning
    encoder         : Tvheadend Matroska muxer
    DATE_BROADCASTED: 2020-02-07 10:00:00
    ORIGINAL_MEDIA_TYPE: TV
    CONTENT_TYPE    : News / Current affairs
    TVCHANNEL       : ITV HD
  Duration: 00:00:26.60, start: 0.015000, bitrate: 4896 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Stream #0:2(eng): Subtitle: dvb_subtitle (default)
Unsupported codec!
Could not open video codec
/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.mkv: could not open video codec
Running a ffmpeg test on my HD recordings gives me the following output:

Code: Select all

/var/packages/ffmpeg/target/bin/ffmpeg -i "/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts"
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 4.9.3 (crosstool-NG 1.20.0) 20150311 (prerelease)
  configuration: --target-os=linux --cross-prefix=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu- --prefix=/var/packages/ffmpeg/target --extra-cflags=-I/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/include --extra-ldflags=-L/spksrc/spk/ffmpeg/work-x64-6.1/install/var/packages/ffmpeg/target/lib --extra-libs='-lxml2 -ldl' --pkg-config=/usr/bin/pkg-config --ranlib=/spksrc/toolchains/syno-x64-6.1/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ranlib --enable-cross-compile --enable-rpath --enable-pic --enable-shared --enable-gpl --enable-fontconfig --enable-libass --enable-libbluray --enable-avresample --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libsoxr --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-gnutls --disable-debug --disable-doc --disable-static --enable-libfdk-aac --enable-nonfree --extra-cflags='-DSYNO_VIDEOSTATION -DSYNO_AUDIOSTATION -DSYNO_MEDIASERVER -DSYNO_DSM' --extra-cflags=-fno-if-conversion --enable-libaom --arch=x86_64 --enable-vaapi --enable-libmfx
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22762c0] non-existing PPS 0 referenced
[h264 @ 0x22762c0] decode_slice_header error
[h264 @ 0x22762c0] no frame!
[h264 @ 0x22762c0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x22762c0] Increasing reorder buffer to 3
[mpegts @ 0x2231240] PES packet size mismatch
[mpegts @ 0x2231240] Could not find codec parameters for stream 2 (Unknown: none ([17][0][0][0] / 0x0011)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '/volume1/Media/TVHeadendRecordings/This Morning/This Morning 2020-02-07 10-00.ts':
  Duration: 00:00:35.00, start: 94196.347767, bitrate: 4916 kb/s
  Program 1 
    Metadata:
      service_name    : ITV HD
      service_provider: 
    Stream #0:0[0xc9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xca](eng): Audio: aac_latm (LC) ([17][0][0][0] / 0x0011), 48000 Hz, stereo, fltp
    Stream #0:2[0xce](eng): Unknown: none ([17][0][0][0] / 0x0011) (visual impaired) (descriptions) (dependent)
    Stream #0:3[0xcd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
It seems ffmpeg sees some problems in some of the streams. To try and narrow down the problem, I created a record filter in TVHeadend in order to only record the video stream (no audio description or subtitles), but I still get the above codec errors.

A couple of things I haven't yet tried is a complete uninstall/reinstall of ffmpeg. I don't want do do this if possible as I will need to uninstall TVHeadend first and risk losing all of my configurations.

I haven't tried changing the path to ffmpeg for the reasons mentioned above (may affect other Synology services).

Hoping someone here may be able to offer up some help as I'm completely stuck!

Many thanks in advance.
Post Reply