• 1
  • 5
  • 6
  • 7
  • 8(current)
  • 9
Solved Chapter Selector Window
OK i ask in the skin thread, but maybe you have a hint for me in which file i must look to fix this ?
Reply
have a look for something "bookmarks", this should be the related window
Reply
OK thanks i will take a look.
Reply
(2015-03-12, 16:17)Ace Wrote: I think we should trim the chapter name. Can you check if there's whitespace at the beginning?

Ace been meaning to ask, is this supposed to work with DVD/Blu-Ray rips to either file structure or iso as it doesn't seem to work for those file types?
Reply
Thumbs don't work, but chapters should.
Reply
(2015-03-12, 18:09)Ace Wrote: Thumbs don't work, but chapters should.

Should the chapters still show in Bookmarks? as I'm pretty sure they didn't when I last looked on Monday, if they are supposed to show then I'll test again and grab a debug log if I still see nothing in Bookmarks.
Reply
Yes, they should show up with an empty thumbnail.
Reply
Ok thanks for confirming.

My stuff is from a mixture of sources Wink so might have to be careful what files I'm testing with, as there's the possibility that some could have had the chapter marks stripped.
Reply
Ace, I haven't tested v15 but from description and screenshots it seems like there is not text-only list option?
I prefer simple text (or tiny thumbnails not very much bigger than the text) in order to browse through long chapter lists more easily.
Reply
This should be skin specific, the file you'll have to change is VideoOSDBookmarks.xml
Reply
I have been moving my old DVD collection to mpeg 4 files for some time now (300+ DVD's), and during the encoding process I have been embedding the chapter names in the encoded files (mostly grabbed from chapterdb.org) using the "--markers" option & a csv file during the Handbrake encoding.
I began looking for a way to display all of the chapters inside of xbmc/kodi (complete with a short looping video clip, or a screenshot from each chapter), and this add-on looked like a great fit for what I needed.
The only problem I faced with this add-on was creating all of the screenshots, and the xml file for this add-on to display all of the data I wanted to see.
I wrote a quick shell script to create a sub-directory "chapters" where the movie exists, and place all of the jpg screenshots inside of that directory.
This script will also create the xml file needed to display this information inside of kodi.
A couple external programs are needed to run this: mediainfo & ffmpeg

I'm sure this could be improved somewhat, but I really wanted to make this a simple command line script that can be easily automated. Possibly even to the point of being integrated into this add-on in the future at some point.
Any, and all feedback is welcome. Please see below for the script, and how it works.
Enjoy!

Code:
./chapterimages.sh /path/to/moviefile.mkv
This will create:
/path/to/moviefile.chapters.xml
/path/to/chapters/
/path/to/chapters/moviefile-001.jpg
/path/to/chapters/moviefile-002.jpg
/path/to/chapters/moviefile-003.jpg
etc...

Code:
#!/bin/bash
#chapterimages.sh
#created by The_Dave; 4.22.15

### Choose the same of the subdirectory you want all of the screenshot images to be placed in
THUMBS="chapters"

### END EDITABLE SECTION
### The script below will create the xml file & needed chapter images for each video defined after the script call
### example:  user@shell> chapterimages.sh video_file.mkv

FILE=$1
n=${FILE,,}
#directory the file exists in
nn=$(dirname $n)
#just the filename
m=$(basename "$n")
#the "base" file name with NO extension
mkf=${m%%.*}

CHAPIMGS=$nn/$THUMBS
XMLFILE=$mkf.chapter.xml
DESTFILE=$nn/$XMLFILE

### Perform checks to see if the files / directories already exist
if [ ! -d "$CHAPIMGS" ]; then
  echo "The directory $CHAPIMGS was NOT found; It will be created for you";
  mkdir $CHAPIMGS
fi
if [ -e "$DESTFILE" ]; then
  echo "The chapter XML file $DESTFILE already exists";
  echo "Please delete this file before running this command again; exiting"
  exit
fi

echo "Beginning work on the chapters images & xml file for the video: $mkf"

#determine the image caputure size from the video resoltion
SIZE=`mediainfo "--Inform=Video;%Width%x%Height%" $FILE`
#get the list of chapters from the video file
CHAPSTR=`mediainfo --Output=CSV $FILE |egrep "^[0-9]{2}:[0-9]{2}:\.*"`
IFS=$'\n'
CHAPARR=( $CHAPSTR )
N=1

XML='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><chapters>'

for i in "${CHAPARR[@]}";do
  #cheat to create leading zero for image file names;supports up to 999 chapters
  nm=00$N
  num="${nm: -3}";
  echo "Chapter: $num -Image: $mkf-$num.jpg -Time,Name: $i";
  ts="$( cut -d ',' -f 1 <<< "$i" )";
  chapname="$( cut -d ',' -f 2- <<< "$i" )";
  #change quote characters to xml friendly
  chapname=${chapname//\"/&quot;}
  chapname=${chapname//\'/'}
  XML="$XML<chapter mark=\"$ts\" title=\"$chapname\" title2=\"\" thumb=\"chapters/$mkf-$num.jpg\" />"
  if [ -e "$CHAPIMGS/$mkf-$num.jpg" ]; then
    echo "The chapter image file $mkf-$num.jpg already exists...";
    echo "Please delete this image file before running this command again; exiting"
    exit;
  else
    ###Tried making 3 images every 3 seconds after the timestamp, but was not much better...
    #ffmpeg -ss $ts -i $FILE -vframes 3 -t 3 -s $SIZE $CHAPIMGS/$mkf-$num-%03d.jpg >/dev/null 2>&1
    ffmpeg -ss $ts -i $FILE -vframes 1 -t 1 -s $SIZE $CHAPIMGS/$mkf-$num.jpg >/dev/null 2>&1
  fi
  ((N++))
done

XML="$XML</chapters>"

#echo $XML
### Output the $XML to a new file
echo "$XML" > "$DESTFILE"
Reply
Having been using the chapter selector for a bit now, I would recommend that there should be a default keymapping for it. For example, I've mapped my "Guide" button to open and close the bookmarks - my keymap.xml contains:

Code:
<FullscreenVideo>
    <remote>
        <title>XBMC.ActivateWindow(videobookmarks)</title>
    </remote>
</FullscreenVideo>
<VideoBookmarks>
    <remote>
        <title>Close</title>
    </remote>
</VideoBookmarks>

For the default keyboard mapping, the G key seems reasonable - it's only used for ActivateWindow(PVROSDGuide) currently, and has the "Guide" mnemonic.
Reply
Hmm, that should work, since it shouldn't be possible to have chapters at the same time as being in PVR :)
Reply
I have two questions

1) Kodi appears to be extracting thumbnail images from the video about 1/2 second before the actual chapter timestamps. Have others had this happen? It would be perfect if the extracted thumbnail was the first frame I see when opening a chapter.

2) Is there a way to assign a "guide" button on my remote so it will open the EPG while in the PVR section and the bookmarks menu when playing back movies/TV shows? The button is assigned under the <fullscreenvideo> tag, which covers both scenarios as far as I can tell. It's a little jarring opening the EPG while watching a movie... as I have it set now. Sad
Reply
1] Unfortunately that's indeed current code behaviour. Would be nice to have an +offset setting or "fix" it by adding a fixed offset to current thumbnail extraction code (+1s ?) .

2] Live TV mapping should go under <FullscreenLiveTV>
Reply
  • 1
  • 5
  • 6
  • 7
  • 8(current)
  • 9

Logout Mark Read Team Forum Stats Members Help
Chapter Selector Window3
This forum uses Lukasz Tkacz MyBB addons.