SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-27-2008, 07:28 AM
jelwood jelwood is offline
Sage User
 
Join Date: Dec 2007
Posts: 74
Commercial skip support in portable devices (IPhone/IPod, PPC, and VLC confirmed)

I wanted to let everyone know about a great little utility that Babgvant created. This utility takes the normal edl files that Comskip creates and converts them to chapter files. The significance of this is you can use chapter markers in the IPhone/IPod, PPC, VLC and other players to skip commercials just like we enjoy in Sage TV.

The limitations to this are: First, only the MP4 and MKV containers support chapters. In the case of an IPhone/IPod I recommend using the M4V container (It is the MP4 container, however, for some reason it looks like Apple decided to support chapters in files with the extension of M4V and not MP4). Another limitation is you don’t get automatic commercial skip. As you are watching the show and you get to a commercial, you do have to tell the player to move to the next chapter (basically performing a manual commercial skip). However, this works great and gives us nice commercial skip capability on portable devices.

To use this you first have to setup Comskip so it’s creating the edl files. Also, you have to use your favorite utility to encode your TV show into a MP4 or MKV container (none of that is covered here).

Once you have comskip working and your show re-encoded you can use Babgvant’s utility to convert the edl file into a chap file. The command line is:
Edltochapterfile {inputfilename}.edl {outputfilename}.chap

Then you use either mp4creator or mkvmerge to write the chapter markers into an mp4 or mkv file that you’ve already created (I use Handbrake to convert all my shows into the mp4 container that is appropriate for the IPhone). The command line option for mp4creator is:
Mp4creator {inputchapterfile}.chap {inputshow}.mp4

Here is the link to Babgvant’s utility:
http://babgvant.com/files/folders/eadt/entry11419.aspx

Here is the link to mp4creator:
http://mp4creator.sourceforge.net/

Here is the link to mkvmerge:
http://www.bunkus.org/videotools/mkvtoolnix/

Here is the link to the original development thread on Babgvant's web site in case you need more information:
http://babgvant.com/forums/t/2189.aspx?PageIndex=1

This has been working great for me. It’s really nice to be able to skip the commercials when I’m watching the shows on the plane. Thank you Babgvant for another great utility.
Reply With Quote
  #2  
Old 12-27-2008, 08:39 AM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
That is awesome, I don't suppose you know if it will run in wine. If not, would you mind posting an edl and an output file?

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #3  
Old 12-27-2008, 08:43 AM
jelwood jelwood is offline
Sage User
 
Join Date: Dec 2007
Posts: 74
Quote:
Originally Posted by bcjenkins View Post
That is awesome, I don't suppose you know if it will run in wine. If not, would you mind posting an edl and an output file?

B
I don't know if it will work in wine. However, here is an example edl and chap file.
Attached Files
File Type: zip TheUniverse-LightSpeed-4745845-0.zip (576 Bytes, 281 views)
Reply With Quote
  #4  
Old 12-27-2008, 10:20 AM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
thank you. EDL is in raw seconds and chapter is HH:MM:SS.SS format. I'll just write a script that does the same thing. Curious to know why chapter 1 and 2 are the same timestamp?

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #5  
Old 12-27-2008, 12:44 PM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
Maybe we can ask the comskip guy to add the chapter file as one of the many comskip output formats
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
  #6  
Old 12-27-2008, 05:14 PM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
maybe, but he's a busy guy and I wouldn't want to impose

(When will it be ready?)
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #7  
Old 12-27-2008, 08:24 PM
jelwood jelwood is offline
Sage User
 
Join Date: Dec 2007
Posts: 74
Quote:
Originally Posted by bcjenkins View Post
Curious to know why chapter 1 and 2 are the same timestamp?

B
This is just a coincidence with this particular example. One important thing with chapters is the first chapter HAS to be the start of the video (so it is always 0.00). In the example I gave you, the first commercial segment happened to begin at 0.00. This doesn't normally happen in my edl files. In most of my examples the first commercial segment doesn't begin with 0.00 so Babgvant's conversion program didn't account for this. His logic is to simply always make chapter 1 - 0.00, then chapter 2 is the beginning of the first commercial segment. In this example that happened to also be 0.00. It would probably be good to add logic to account for this, I just didn't notice this anomaly.

Quote:
Originally Posted by erik View Post
Maybe we can ask the comskip guy to add the chapter file as one of the many comskip output formats
This would be awesome if you added this! Since Babgvant wrote the utility so quickly I never thought about asking you to just output the chapter files.
Reply With Quote
  #8  
Old 12-28-2008, 02:35 AM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
Why would you need a chapter market at the start of a commercial?
Why not only at the end?
Of course the answer is that you want to see the superbowl commercials.
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
  #9  
Old 12-28-2008, 04:15 AM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
It would be good to know beginning and end points for the purposes of skipping backward.

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #10  
Old 12-28-2008, 08:56 AM
jelwood jelwood is offline
Sage User
 
Join Date: Dec 2007
Posts: 74
Actually, Babgvant made this an option in his conversion utility. I originally voted to have the beginning of a commercial segment marked as a chapter. However, Onlydarksets, and now Erik, have pointed out that it might be better only marking the chapters at the end of commercial segments. Babgvant made this an option in his program so we could try both options and see what is better. I haven't spend a lot of time watching shows with chapters, however after watching a few shows, I think that I might have been wrong and it is better to only mark the end of the commercial segments as chapters. The reason is, on the IPhone when you bring up the chapters list it is simply a list. It does have a marker so you see what chapter you are currently playing, however, it is a pretty long list. It might be nicer to only have the end of the segments listed as this would shorten the list by 50% (and that should make navigating the list a little easier). I originally thought I needed the beginning of the commercial segment because there are times when Comskip doesn't perfectly detect the beginning of the show (this isn't Comskip's fault, I haven't taken the time to completely tune it). I thought I would need to "skip back" when this happens and manually find the beginning of the show. However, the reality is, skipping to the beginning of what Comskip thought was the beginning of the commercial segment didn't do me any good. What I really did was just rewind a few seconds and that was the real end of the commercial segment. Anyway, my point is, I really didn't use the beginning of the commercial segments like I thought so I think Onlydarksets and Erik are right.

I'm going to switch my conversion process so I'm only marking the end of the commercial segments to see if this is truly better.
Reply With Quote
  #11  
Old 12-29-2008, 05:31 AM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
Would this be acceptable output?
Quote:
CHAPTER01=00:00:00.000
CHAPTER01NAME=1
CHAPTER02=0:01:00.59
CHAPTER02NAME=2
CHAPTER03=0:14:48.85
CHAPTER03NAME=3
CHAPTER04=0:26:33.92
CHAPTER04NAME=4
CHAPTER05=0:40:25.09
CHAPTER05NAME=5
CHAPTER06=0:49:15.22
CHAPTER06NAME=6
CHAPTER07=1:00:57.12
CHAPTER07NAME=7
Or must there be a leading zero for the hours and 3 digits for the fraction of the seconds?

(this is what has been implemented in Comskip)
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
  #12  
Old 12-29-2008, 05:58 AM
jelwood jelwood is offline
Sage User
 
Join Date: Dec 2007
Posts: 74
Quote:
Originally Posted by erik View Post
Would this be acceptable output?

Or must there be a leading zero for the hours and 3 digits for the fraction of the seconds?

(this is what has been implemented in Comskip)
I just did a quick test and it looks like this format will work just fine. I didn't see any adverse effects to not having the leading zero in the hour and the trailing zero in the fraction of seconds.

Thank you for implementing this!
Reply With Quote
  #13  
Old 12-29-2008, 02:01 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by erik View Post
Maybe we can ask the comskip guy to add the chapter file as one of the many comskip output formats
what needs to be added to the ini to make it do that?
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #14  
Old 12-29-2008, 02:04 PM
bcjenkins bcjenkins is offline
SageTVaholic
 
Join Date: Jan 2006
Posts: 3,764
It looks like Erik is adding it right now. The next release will likely have the support turned on.

Thanks for your utility though, this is something I wanted to do a while back but couldn't find clear instructions. I can tell you that the mp4creator runs under wine in Linux, so I will finally get to finish my nightly RSS automation script

B
__________________
Running SageTV on unRAID via Docker
Tuning handled by HDHR3-6CC-3X2 using OpenDCT
Reply With Quote
  #15  
Old 12-29-2008, 02:09 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
It's a .net app so if you have Mono installed it should work... Let me know if you want a copy.
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #16  
Old 12-29-2008, 10:19 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
nm... I moved it to the public section - http://babgvant.com/files/folders/sa...ntry11544.aspx
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #17  
Old 02-19-2009, 04:08 PM
HokiePerogi HokiePerogi is offline
Sage Advanced User
 
Join Date: Oct 2008
Posts: 187
Quote:
Originally Posted by jelwood View Post
In the case of an IPhone/IPod I recommend using the M4V container (It is the MP4 container, however, for some reason it looks like Apple decided to support chapters in files with the extension of M4V and not MP4).

...

(I use Handbrake to convert all my shows into the mp4 container that is appropriate for the IPhone). The command line option for mp4creator is:
Mp4creator {inputchapterfile}.chap {inputshow}.mp4

...

This has been working great for me.
I'm confused by your above statements. First you say that MKV will not be recognized with chapter marking/skipping on the iPhone. However, then you say you use Handbrake to convert to the MP4 container and then use Mp4creator to add the chapter points.

So does MP4 with integrated chapter markings (after using Mp4creator) work on the iPhone? Or did you mean to say you use MKV and mkvmerge in order to get it to work on your iPhone?

Thanks!
__________________
Server: AMD Phenom II X6 3.20 GHz ♠ 16 GB RAM (15.7 usable)
Capture: HDHomeRun PRIME ♠ Ceton InfiniTV 4 PCIe (Clear-QAM only)
Tuning: OpenDCT v0.5.20-RC2
Software: Windows 7 Ultimate 64-bit ♠ SageTV v9.0.12.504 ♠ Java 1.8.0_111
Clients: 4 x STX-HD300 ♠ 3 x STX-HD200 ♠ MacOS Placeshifter
Reply With Quote
  #18  
Old 02-20-2009, 12:47 AM
erik erik is offline
Sage Aficionado
 
Join Date: May 2005
Posts: 467
Quote:
Originally Posted by bcjenkins View Post
It looks like Erik is adding it right now. The next release will likely have the support turned on.
Forgot to mention is available now
__________________
Support Comskip, visit the forum and donate at http://www.comskip.org/
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.