OpenELEC Forum
ComSkip - i386 and x86_64 for linux - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: PVR + LIVE TV (https://forum.openelec.tv/forumdisplay.php?fid=38)
+--- Thread: ComSkip - i386 and x86_64 for linux (/showthread.php?tid=62929)

Pages: 1 2 3 4


ComSkip - i386 and x86_64 for linux - seminox - 03-08-2013

Hi @all,

i've managed to compile a recent comskip binary on a vm running with Ubuntu 12.04. :cheer:
i was hoping i can move this binary to openelec and run it via Post-processor command in the configuration settings of tvheadend.
i'm using RC4 of openelec.

my problem is, i don't know how to compile ComSkip with static libraries (i.e. libargtable2). Because of that ComSkip fails starting with the following error:

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

can anybody tell me how i could compile ComSkip with static libraries? :blink:

You can find the sources here:
http://forum.xbmc.org/showthread.php?tid=150084

Thanx in advance


ComSkip - compiled with static libraries - ultraman - 03-08-2013

You didn't tell us which version you need - x86_64 is here.


ComSkip - compiled with static libraries - seminox - 03-08-2013

hi, i am on generic i386.

i think i managed to compile one with static libs 10 minutes ago. but i would appreciate it if you could post a working one for 2.99.4

thank you !


ComSkip - compiled with static libraries - ultraman - 03-08-2013

comskip i386


ComSkip - compiled with static libraries - seminox - 03-08-2013

hi ultraman,

thank you very much for your ultrafast (;-)) support. i'm quite astonished that its size is only 183KB new old Mine has about 45MB ?? do you have this one working on your openelec? Is there something speial about it (ie: commandline, comskip.ini or else)


ComSkip - compiled with static libraries - ultraman - 03-08-2013

I don't have it running - I just make 2 packages and compile in oe build environment.


ComSkip - compiled with static libraries - Keysersose12 - 03-18-2013

seminox post=66213 Wrote:hi ultraman,

thank you very much for your ultrafast (;-)) support. i'm quite astonished that its size is only 183KB new old Mine has about 45MB ?? do you have this one working on your openelec? Is there something speial about it (ie: commandline, comskip.ini or else)

did you get this working? would be cool to have it working with openelec');


ComSkip - compiled with static libraries - seminox - 03-19-2013

hi,

i had no time to check it till now. but i will do that next week from tuesday on...... then i can tell you if it is working. i suppose i only need to put the compiled binary anywhere under /storage and point tvheadends "post processing" to [[ /storage/whatever/comskip --ini=/storage/pathtoini/comskip.ini "%f" ]] ??

thanx for any support.


ComSkip - compiled with static libraries - seminox - 03-21-2013

ok here we go:

openelec is set to shutdown after 30 min with daily reboot at 05.00h am and use the built in /usr/bin/setwakeup.sh to set the wakeup timer.
tvheadend's post-processing script is set to: /storage/downloads/postrec.sh "%f"
postrec.sh contains:

Code:
#!/bin/sh

/bin/sync # flush diskbuffer

VIDEO=$1

echo "Starting Commercial Flagging" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "***** INPUT = "$VIDEO" *****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
/bin/date >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log

/storage/downloads/comskip --ini=/storage/downloads/comskip.ini "$VIDEO" </dev/null
>>/var/log/tvheadendpp.log 2>&1

echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log

rm /media/Volume/Recording/*.log*
rm /media/Volume/Recording/*.csv
rm /media/Volume/Recording/*.edl

echo "Finished at" >>/var/log/tvheadendpp.log
/bin/date >>/var/log/tvheadendpp.log

comskip.ini contains:
Code:
;### Globale-Parameter ###

;edl_mode=3 ;1=cut 3=commercial skip
detect_method=127 ;1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed
captions, 32=aspect ration, 64=silence, 255=all
validate_silence=1 ; Default, set to 0 to force using this clues if selected above.
validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames)
if blackframe is selected above.
validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above.
verbose=0 ;show a lot of extra info, level 5 is also OK, set to 0 to disable
delete_logo_file=1
output_framearray=0
output_debugwindow=0

; ### Helligkeit ###

max_avg_brightness=25 ;maximum average brightness for a dim frame to be considered black
(scale 0 to 255) 0 means autosetting
test_brightness=45 ;frame not pure black if any pixels checked are greater than this, will
check average brightness
max_brightness=65 ;frame not black if any pixels checked are greater than this (scale 0
to 255)


intelligent_brightness=0 ; Set to 1 to use a USA specific

; ### Länge ###

max_commercialbreak=600 ;maximum length in seconds to consider a segment a commercial break
min_commercialbreak=10 ;minimum length in seconds to consider a segment a commercial break
max_commercial_size=180 ;maximum time in seconds for a single commercial or multiple
commercials if no breaks in between
min_commercial_size=4 ;mimimum time in seconds for a single commercial
min_show_segment_length=300 ;(300) any segment longer than this will be scored towards show.

; ### Schwellen ###

non_uniformity=750 ;
max_volume=500 ; any frame with sound volume larger than this will not be regarded as
black frame
min_silence=20 ; Any deep silence longer than this amount of frames is a possible
cutpoint
ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing

; ### Punish ###

punish=31 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume,
8=silence, 16=schange, set to 0 to disable
punish_threshold=1.3 ; Multiply when amount is above average bbcode.txt done insert_posts.sh mybb_posts.csv mybb_posts.sql new newnew oej34_kunena_messages.csv oej34_kunena_messages_text.csv oej34_kunena_messages_text.sql oej34_kunena_users_banned.csv oej34_kunena_users.csv oej34_users.csv old openelecj34prod.sql posts.sh replace.sh table_posts test.csv test.txt update_sample.sql punish_threshold
punish_modifier=2 ; When above average bbcode.txt done insert_posts.sh mybb_posts.csv mybb_posts.sql new newnew oej34_kunena_messages.csv oej34_kunena_messages_text.csv oej34_kunena_messages_text.sql oej34_kunena_users_banned.csv oej34_kunena_users.csv oej34_users.csv old openelecj34prod.sql posts.sh replace.sh table_posts test.csv test.txt update_sample.sql threshold multiply score by this value

length_strict_modifier=1.1
length_nonstrict_modifier=1.5
combined_length_strict_modifier=2.0
combined_length_nonstrict_modifier=1.25
logo_present_modifier=1
excessive_length_modifier=0.01
ar_wrong_modifier=1.0
min_schange_modifier=0.5
max_schange_modifier=2.0
schange_threshold=80
cc_commercial_type_modifier=4.0
cc_wrong_type_modifier=2.1
cc_correct_type_modifier=0.75
dictionary_modifier=1.00

; ### Logo ###

logo_percentile=0.95 ; if more then this amount of logo is found then logo detection will be
disabled
logo_threshold=0.78 ;
punish_no_logo=1 ; Default, set to 0 to avoid show segments without logo to be scored
towards commercial
aggressive_logo_rejection=1 ;
connect_blocks_with_logo=1 ; set to 1 if you want successive blocks with logo on the
transition to be regarded as connected, set to 0 to disable
logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do
not combine with subtitle setting
shrink_logo=10 ; Reduce the duration of the logo with this amount of seconds
after_logo=0 ; set to number of seconds after logo disappears

; ### Cutpoints ###

cut_on_ar_change=1 ; set to 1 if you want to cut also on aspect ratio
changes, set to 0 to disable
delete_show_after_last_commercial=0 ; set to 1 if you want to delete the last block if its
a show and after a commercial
delete_show_before_or_after_current=1 ; set to 1 if you want to delete the previous and the
next show in the recording, this can lead to the deletion of trailers of next show
remove_before=1.0 ; amount of seconds of show to be removed before ALL commercials
remove_after=0 ; amount of seconds of show to be removed after ALL commercials
comskip should start to search for silence to insert an additional cutpoint
padding=0
ms_audio_delay=5
max_repair_size=200 ; Will repair maximum 40 missing MPEG frames in the timeline, set to 1
to disable repairing for players that don't use PTS.

;### Output ###

output_framearray=0 ; create a big excel file for detailed analysis, set to 0 to disable
output_videoredo=0
output_womble=0
output_mls=0 ; set to 1 if you want MPeg Video Wizard bookmark file output
output_cuttermaran=0
output_mpeg2schnitt=0
output_mpgtx=0
output_dvrcut=0
output_zoomplayer_chapter=0
output_zoomplayer_cutlist=0
output_edl=1
output_edlx=0
output_vcf=0
output_btv=0 ; set to 1 if you want Beyond TV chapter cutlist output
output_projectx=0 ; set to 1 if you want ProjectX cutlist output (Xcl)
output_demux=0 ; set to 1 if you want comskip to demux the mpeg file while scanning
sage_framenumber_bug=0
sage_minute_bug=0
live_tv=0 ; set to 1 if you use parallelprocessing and need the output while recording
live_tv_retries=1 ; change to 8 when using live_tv in BTV
mpeg2schnitt_options="#Hier den Pfad eintragen#mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
dvrcut_options="#Hier den Pfad eintragen#"%s.dvr-ms" "%s_clean.dvr-ms" "

;### Cuttermaran ###

cuttermaran_options="cut="false" unattended="false" muxResult="true"
snapToCutPoints="true" closeApp="false""

; Wer keinen Wert auf perfekte Werbeschnittpunkte legt, kann alle Options auf "true" setzen.

so what i get is TXT file from comskip with for example the following content:
(the edl file is deleted at the moment as you can see in postrec.sh)

Code:
FILE PROCESSING COMPLETE 164971 FRAMES AT 2500
-------------------
90869 94236
125435 128778
150255 164971

if i tail -f xbmc.log in debug mode xbmc loads the cutmarks:
Code:
21:24:15 T:2906630976 DEBUG: AddCut - Pushing new cut to back [01:00:34.760 - 01:02:49.440], 3
21:24:15 T:2906630976 DEBUG: AddCut - Pushing new cut to back [01:23:37.400 - 01:25:51.120], 3
21:24:15 T:2906630976 DEBUG: AddCut - Pushing new cut to back [01:40:10.200 - 01:49:58.840], 3
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:00:34.760
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:02:49.440
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:23:37.400
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:25:51.120
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:40:10.200
21:24:15 T:2906630976 DEBUG: AddSceneMarker - Inserting new scene marker: 01:49:58.840
21:24:15 T:2906630976 DEBUG: WriteMPlayerEdl - MPlayer EDL file written to: special://temp/xbmc.edl

so - everyone does his job...... BUT

XBMC does not jump...... i don't know why.......

has anyone got a clue for me?

here are the files (careful, this is for i386) [attachment=1112]postrec.zip[/attachment]


ComSkip - compiled with static libraries - seminox - 03-22-2013

hmmmmm one clue could be that xbmc on openelec is not using mplayer, and therefore does not know what to do with the cutmarks..... new old :blink: :pinch: