Kodi Community Forum
Comskip for Linux released - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: Tvheadend (https://forum.kodi.tv/forumdisplay.php?fid=168)
---- Thread: Comskip for Linux released (/showthread.php?tid=150084)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


RE: Comskip for Linux released - cbxbiker61 - 2013-02-03

0.93 is released.

It is no longer encumbered with MAXWIDTH and MAXHEIGHT restrictions, and is more memory efficient when processing video that is less than 1920x1080 (uses about half the memory on 720p video).



RE: Comskip for Linux released - Prof Yaffle - 2013-02-03

Thanks for the continuing work on this. I'll test in due course and report back if this hiccoughs at all.

BTW, I noticed that your instructions in post 1 still reference ffmpeg-1.0.1 in PKG_CONFIG_PATH despite installing 1.1.1.


****

Sorry, I'm back to a segfault...

Code:
Program received signal SIGSEGV, Segmentation fault.
CS::CommercialSkipper::buildCommListAsYouGo (this=0xbffff078)
    at comskip.cpp:11176
11176           if ( (csBlack.back().brightness <= local_blacklevel)
(gdb) backtrace
#0  CS::CommercialSkipper::buildCommListAsYouGo (this=0xbffff078)
    at comskip.cpp:11176
#1  0x080aa7b8 in CS::CommercialSkipper::detectCommercials (this=0xbffff078,
    frameIndex=375, pts=15.559999999999844) at comskip.cpp:2948
#2  0x0808a31d in (anonymous namespace)::SubmitFrame (is=0xb74d9020)
    at mpeg2dec.cpp:929
#3  0x080883c3 in video_packet_process (packet=0xb751f558, is=0xb74d9020)
    at mpeg2dec.cpp:1267
#4  main (argc=2, argv=0xbffff794) at mpeg2dec.cpp:1948
(gdb) print local_blacklevel
$1 = 30
(gdb) print csBlack.back().brightness
Cannot evaluate function -- may be inlined



RE: Comskip for Linux released - lojden - 2013-02-03

Is there any solution for this? :


[email protected]:/var/tmp/comskip-0.93$ sudo make install
g++ -DHAVE_CONFIG_H -I. -g -O2 -std=gnu++11 -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function âbool {anonymous}::video_packet_process({anonymous}::VideoState*, AVPacket*)â:
mpeg2dec.cpp:1171:74: error: âavcodec_get_frame_classâ was not declared in this scope
mpeg2dec.cpp:1171:112: error: âav_opt_ptrâ was not declared in this scope
mpeg2dec.cpp: In function âvoid {anonymous}::file_close()â:
mpeg2dec.cpp:1597:4: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
mpeg2dec.cpp:1597:38: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
make: *** [comskip-mpeg2dec.o] Error 1



RE: Comskip for Linux released - cbxbiker61 - 2013-02-04

(2013-02-03, 18:48)Prof Yaffle Wrote: Thanks for the continuing work on this. I'll test in due course and report back if this hiccoughs at all.

BTW, I noticed that your instructions in post 1 still reference ffmpeg-1.0.1 in PKG_CONFIG_PATH despite installing 1.1.1.


****

Sorry, I'm back to a segfault...

Code:
Program received signal SIGSEGV, Segmentation fault.
CS::CommercialSkipper::buildCommListAsYouGo (this=0xbffff078)
    at comskip.cpp:11176
11176           if ( (csBlack.back().brightness <= local_blacklevel)
(gdb) backtrace
#0  CS::CommercialSkipper::buildCommListAsYouGo (this=0xbffff078)
    at comskip.cpp:11176
#1  0x080aa7b8 in CS::CommercialSkipper::detectCommercials (this=0xbffff078,
    frameIndex=375, pts=15.559999999999844) at comskip.cpp:2948
#2  0x0808a31d in (anonymous namespace)::SubmitFrame (is=0xb74d9020)
    at mpeg2dec.cpp:929
#3  0x080883c3 in video_packet_process (packet=0xb751f558, is=0xb74d9020)
    at mpeg2dec.cpp:1267
#4  main (argc=2, argv=0xbffff794) at mpeg2dec.cpp:1948
(gdb) print local_blacklevel
$1 = 30
(gdb) print csBlack.back().brightness
Cannot evaluate function -- may be inlined

0.93a should fix this particular problem. It looks as if it was dereferencing csBlack when csBlack was empty.



RE: Comskip for Linux released - cbxbiker61 - 2013-02-04

(2013-02-03, 20:52)lojden Wrote: Is there any solution for this? :


[email protected]:/var/tmp/comskip-0.93$ sudo make install
g++ -DHAVE_CONFIG_H -I. -g -O2 -std=gnu++11 -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function âbool {anonymous}::video_packet_process({anonymous}::VideoState*, AVPacket*)â:
mpeg2dec.cpp:1171:74: error: âavcodec_get_frame_classâ was not declared in this scope
mpeg2dec.cpp:1171:112: error: âav_opt_ptrâ was not declared in this scope
mpeg2dec.cpp: In function âvoid {anonymous}::file_close()â:
mpeg2dec.cpp:1597:4: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
mpeg2dec.cpp:1597:38: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/include/libavformat/avformat.h:1580) [-Wdeprecated-declarations]
make: *** [comskip-mpeg2dec.o] Error 1

The easiest solution is to do a static ffmpeg build as per post 1.



RE: Comskip for Linux released - andyb2000 - 2013-02-04

Hi there,
Compiles great, seems to be fine as comskip itself runs and doesn't crash or anything, but doesn't appear to be able to run on my .TS files (or .MKV for that matter).

No matter what I try I get this:

Code:
[email protected]:/tmp# comskip -v5 -t /tmp/CITV-Canimals.2013-02-04.ts
Comskip 0.93.000, made using avcodec
The commandline used was:
comskip -v5 -t /tmp/CITV-Canimals.2013-02-04.ts

No INI file found in current directory.  Searching PATH...
INI file found at /etc/comskip/comskip.ini
No INI file found anywhere!!!!
Setting verbose level to 5 as per command line.
Auto selecting the PID.

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


ComSkip throttles back from -0001 to -0001.
The time is now 1552 so it's full speed ahead!
Could not find the logo file.
[mpegts @ 0x9f83d40] Stream #3: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x9f89ca0] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from '/tmp/CITV-Canimals.2013-02-04.ts':
  Duration: 00:12:48.86, start: 1.415167, bitrate: 3301 kb/s
  Program 1
    Metadata:
      service_name    : Canimals
      service_provider: Tvheadend 3.3.448~ga0e5b07
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x102](nar): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:3[0x103](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Unable to handle frame format s16p

Can't find any debugging or info on what this error means or how to get around it, does anyone have any ideas/suggestions I can try pls?




RE: Comskip for Linux released - cbxbiker61 - 2013-02-04

(2013-02-04, 17:55)andyb2000 Wrote: Hi there,
Compiles great, seems to be fine as comskip itself runs and doesn't crash or anything, but doesn't appear to be able to run on my .TS files (or .MKV for that matter).

No matter what I try I get this:

Code:
[email protected]:/tmp# comskip -v5 -t /tmp/CITV-Canimals.2013-02-04.ts
Comskip 0.93.000, made using avcodec
The commandline used was:
comskip -v5 -t /tmp/CITV-Canimals.2013-02-04.ts

No INI file found in current directory.  Searching PATH...
INI file found at /etc/comskip/comskip.ini
No INI file found anywhere!!!!
Setting verbose level to 5 as per command line.
Auto selecting the PID.

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


ComSkip throttles back from -0001 to -0001.
The time is now 1552 so it's full speed ahead!
Could not find the logo file.
[mpegts @ 0x9f83d40] Stream #3: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x9f89ca0] start time is not set in estimate_timings_from_pts
Input #0, mpegts, from '/tmp/CITV-Canimals.2013-02-04.ts':
  Duration: 00:12:48.86, start: 1.415167, bitrate: 3301 kb/s
  Program 1
    Metadata:
      service_name    : Canimals
      service_provider: Tvheadend 3.3.448~ga0e5b07
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x102](nar): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:3[0x103](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Unable to handle frame format s16p

Can't find any debugging or info on what this error means or how to get around it, does anyone have any ideas/suggestions I can try pls?

OK, s16p support is now in 0.93b.




RE: Comskip for Linux released - lojden - 2013-02-07

Hm, i've tried to run comskip now and it flags for commercial and i got a lot of errors.

[mpegts @ 0xafcdd20] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0xafcdd20] decoding for stream 2 failed
[mpegts @ 0xafcdd20] Could not find codec parameters for stream 2 (Audio: mp1, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0xafd6120] start time is not set in estimate_timings_from_pts
[mpegts @ 0xafcdd20] PES packet size mismatch
[mpegts @ 0xafcdd20] PES packet size mismatch
Input #0, mpegts, from 'Ullared.S04E02.ts':
Duration: 01:00:29.48, start: 72148.482489, bitrate: 3778 kb/s
Program 1
No Program
Stream #0:0[0x1006]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1106](swe): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x1f06]: Audio: mp1, 0 channels, s16p
[mp1 @ 0xafcfde0] Header missingsec(90.77 fps), 1.00 sec(87.00 fps), 2%
[mpeg2video @ 0xafdb500] 0x0 is invalid
[mp1 @ 0xafcfde0] Header missing
Last message repeated 3 times
[mpeg2video @ 0xafdb500] 0x0 is invalid
[mp1 @ 0xafcfde0] Header missing
Last message repeated 270 times
[mpegts @ 0xafcdd20] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0xafcdd20] Could not find codec parameters for stream 2 (Audio: mp1, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0xafcfde0] start time is not set in estimate_timings_from_pts
[mpegts @ 0xafcdd20] PES packet size mismatch


By the way, is there any way to cut it automatically ?





RE: Comskip for Linux released - cbxbiker61 - 2013-02-08

(2013-02-07, 20:35)lojden Wrote: Hm, i've tried to run comskip now and it flags for commercial and i got a lot of errors.

[mpegts @ 0xafcdd20] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0xafcdd20] decoding for stream 2 failed
[mpegts @ 0xafcdd20] Could not find codec parameters for stream 2 (Audio: mp1, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0xafd6120] start time is not set in estimate_timings_from_pts
[mpegts @ 0xafcdd20] PES packet size mismatch
[mpegts @ 0xafcdd20] PES packet size mismatch
Input #0, mpegts, from 'Ullared.S04E02.ts':
Duration: 01:00:29.48, start: 72148.482489, bitrate: 3778 kb/s
Program 1
No Program
Stream #0:0[0x1006]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1106](swe): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
Stream #0:2[0x1f06]: Audio: mp1, 0 channels, s16p
[mp1 @ 0xafcfde0] Header missingsec(90.77 fps), 1.00 sec(87.00 fps), 2%
[mpeg2video @ 0xafdb500] 0x0 is invalid
[mp1 @ 0xafcfde0] Header missing
Last message repeated 3 times
[mpeg2video @ 0xafdb500] 0x0 is invalid
[mp1 @ 0xafcfde0] Header missing
Last message repeated 270 times
[mpegts @ 0xafcdd20] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0xafcdd20] Could not find codec parameters for stream 2 (Audio: mp1, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0xafcfde0] start time is not set in estimate_timings_from_pts
[mpegts @ 0xafcdd20] PES packet size mismatch


By the way, is there any way to cut it automatically ?

It looks as if the input file has problems, such is the nature of captured mpeg. There are some utilities that can repair mpeg files, but the results vary on how badly mangled the input file is.

Automatic cutting doesn't make sense for most use cases. For those that it does, create a wrapper in python or shell script that calls comskip followed by a program that uses the output of comskip to create the target file.



RE: Comskip for Linux released - seminox - 2013-03-05

Hi community,

i managed to compile a release of comskip today. i did that on a virtual machine running ubuntu 12.04.

the compilation went without errors (at least i dign't see an error).

When i take the binary to my openelec 2.99.4 and try to start it i get the following error:

./comskip: error while loading shared libraries: libargtable2.so.0: cannot open shared object file: No such file or directory


maybe i have a problem with libargtable2 not beeing available on openelec? or is there a possibility to compile comskip as "standalone" without any dependencies for openelec ?

thank you for any help.


RE: Comskip for Linux released - cbxbiker61 - 2013-03-06

Argtable can be compiled as a static lib (as per post one) and then you don't need an external argtable shared lib.


RE: Comskip for Linux released - seminox - 2013-03-08

maybe you could give me a kind tip how to do that?


RE: Comskip for Linux released - Daddy_Dog - 2013-03-08

Quote:Automatic cutting doesn't make sense for most use cases. For those that it does, create a wrapper in python or shell script that calls comskip followed by a program that uses the output of comskip to create the target file.

I'm confused: if automatic cutting doesn't make sense, what do most users do?

I'm a total newbie here, so apologies foe being a dunce, but I'm sure I'm missing something...

I've managed to compile and run comskip (thanks cbxbiker61 !) - so I've got my list of cut points in a txt file like this:

Code:
FILE PROCESSING COMPLETE 182918 FRAMES AT  2500
-------------------
2399    4639
5319    5963
35691    44092
78519    84515
115202    121485
164286    173112
182922    182923

- now what do I do?


RE: Comskip for Linux released - cbxbiker61 - 2013-03-08

(2013-03-08, 13:46)Daddy_Dog Wrote:
Quote:Automatic cutting doesn't make sense for most use cases. For those that it does, create a wrapper in python or shell script that calls comskip followed by a program that uses the output of comskip to create the target file.

I'm confused: if automatic cutting doesn't make sense, what do most users do?

I'm a total newbie here, so apologies foe being a dunce, but I'm sure I'm missing something...

I've managed to compile and run comskip (thanks cbxbiker61 !) - so I've got my list of cut points in a txt file like this:

Code:
FILE PROCESSING COMPLETE 182918 FRAMES AT  2500
-------------------
2399    4639
5319    5963
35691    44092
78519    84515
115202    121485
164286    173112
182922    182923

- now what do I do?

What I mean by "automatic cutting" is actually removing the cut scenes from a new media file.

Comskip creates a .edl file that tells xbmc (and other media players) which ranges to avoid playing. In that way you don't watch the commercials, but they still exist in the media file. And if you truly want to "remove" the commercials from a new media file, programs like ffmpeg can use the .edl file to create a new media file with the commercials removed.


RE: Comskip for Linux released - Daddy_Dog - 2013-03-08

Thanks cbxbiker61 - now I get it!


This forum uses Lukasz Tkacz MyBB addons.