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 05-07-2009, 09:57 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Arrow Utility: Bluray MPLS Editor

Bluray movies include a playlist (.MPLS) file to link to all of the video/audio/subtitle streams and to store the chapter information in. TS Muxer (great program) messes up the TIME_IN variable in the playlist and assigns it something other than 0 (usually 10 min). This causes Sage to not start the movie at Time = 00:00:00.000 and Chapter = 1. To fix this I wrote two small windows console applications.

readmpls

Like the name sounds this takes as input a .mpls file and outputs the TIME_IN, TIME_OUT, DURATION, and CHAPTER MARKERS.

fixmpls
takes as input a .mpls file and requests a new TIME_IN value. It then fixes all the timestamps in the file to reflect the new TIME_IN value. I always use TIME_IN = 0.00 secs, but can be whatever you want.

fixmpls creates a backup of the mpls file at runtime NAME.mpls.XX.back, where NAME = the playlist name, and XX increments from 01.

usage
fixmpls.exe [path to .mpls file] OR drag and drop a .mpls file onto the exe. I use a shortcut from the Send To: menu to send the .mpls to the exe

download link
http://forums.sagetv.com/forums/down...d=319&act=down

download page

http://forums.sagetv.com/forums/down...do=file&id=319

history
05/30/09 - V0.2
-fixed bug in chapter detection that crashed the HD200 requiring a hard reset. "extra" chapters were detected and erroneous chapter info was written to the playlist

05/07/09 - V0.1
-Initial Release



Attached Images
File Type: jpg read mpls.jpg (35.5 KB, 15930 views)
File Type: jpg fix mpls.jpg (20.9 KB, 15780 views)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer

Last edited by razrsharpe; 05-30-2009 at 10:33 AM.
Reply With Quote
  #2  
Old 05-30-2009, 10:29 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
I found a bug in the way i was detecting the chapter marker in the mpls file that only happens very occasionally. With the corrupted .mpls file the movie crashed the HD200 requiring a hard reset. I discovered this on "Pride and Glory". It should be much more robust now. See below link to new file.

download link
http://forums.sagetv.com/forums/down...d=319&act=down

download page

http://forums.sagetv.com/forums/down...do=file&id=319

history
05/30/09 - V0.2
-fixed bug in chapter detection that crashed the HD200 requiring a hard reset. "extra" chapters were detected and erroneous chapter info was written to the playlist

05/07/09 - V0.1
-Initial Release
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer

Last edited by razrsharpe; 05-30-2009 at 10:32 AM.
Reply With Quote
  #3  
Old 03-03-2010, 02:12 AM
s4pp3r s4pp3r is offline
New Member
 
Join Date: Mar 2010
Location: Hungary
Posts: 4
I'd like to make a chapter generator for mkvs, based on your program, but i'm stucked to decode the information from the mpls files, is there any chance to share the source code or share some tips about decoding tech datas from movie playlist file?
Thx in advance
s4
Reply With Quote
  #4  
Old 03-03-2010, 07:42 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
yup that was certainly the tricky part.... If you open the .mpls file in a hex editor youll begin to see a pattern for where the chapters are defined in HEX. I ended up looping through the .mpls file byte by byte, creating a 4 bit unsigned int, and seeing if that was a valid integer to get the chapter breaks...

Just an FYI there are other tools out there that will output the chapter info for you (bdinfo, bdedit, tsmuxer, clown_bd (i think) )... The reason I dug into decoding the .mpls file directly is because i needed to modify the it....

I'm not at home right now but I'll see if i can dig up the souce and post it...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #5  
Old 03-03-2010, 01:33 PM
s4pp3r s4pp3r is offline
New Member
 
Join Date: Mar 2010
Location: Hungary
Posts: 4
That would be great! Thanks in advance!
Reply With Quote
  #6  
Old 03-03-2010, 08:05 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
s4pp3r, what are you trying to do with your mkvs? I think makemkv already pulls the chapter information from the BD and includes it in the MKV file, so that may be your solution right there.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #7  
Old 03-03-2010, 09:56 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
here is the source that I use to read the mpls, determine the PTS integer (presentation time stamp), and convert it to Hour:Min:Sec.ms format... Good luck (note the only reason i converted the PTS from Hex to Decimal to HH:MM:Sec.ms is for display purposes...)
Attached Files
File Type: txt readmpls.cpp.txt (3.7 KB, 1096 views)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #8  
Old 03-04-2010, 08:46 AM
s4pp3r s4pp3r is offline
New Member
 
Join Date: Mar 2010
Location: Hungary
Posts: 4
Quote:
Originally Posted by Fuzzy View Post
s4pp3r, what are you trying to do with your mkvs? I think makemkv already pulls the chapter information from the BD and includes it in the MKV file, so that may be your solution right there.
Yes, but i have some old mkvs without chapters in it, so its faster to get the mpls from the bd, then dl the whole disc only for the correct chapters

razrsharpe: thx the source!
Reply With Quote
  #9  
Old 03-04-2010, 09:34 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Ahhh.. okay.. still, you may find it easier to use something like eac3to to get the chapters, then just modify the file to put it in the right format for mkvmerge, by hand...
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #10  
Old 03-04-2010, 09:36 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
Quote:
Originally Posted by Fuzzy View Post
Ahhh.. okay.. still, you may find it easier to use something like eac3to to get the chapters, then just modify the file to put it in the right format for mkvmerge, by hand...
ya my thoughts too.... decoding the mpls file was a major PITA and probably not worth it.... to automate you could write some batch type file to call eac3to, get the chapters, translate the chapters to the correct format, then insert them into the mkv with mkvmerge...
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
Reply With Quote
  #11  
Old 03-05-2010, 03:29 AM
s4pp3r s4pp3r is offline
New Member
 
Join Date: Mar 2010
Location: Hungary
Posts: 4
Yeah i made it before
Quote:
readmpls.exe %1 > chapter.txt
type chapter.txt | find "CH" > chap.txt
set /a num=1
@Setlocal ENABLEDELAYEDEXPANSION
for /F "tokens=3" %%I in (chap.txt) do (
echo CHAPTER!num!=%%I>>chapter-out.txt
echo CHAPTER!num!NAME=Chapter !num!>>chapter-out.txt
set /a num=!num!+1
)
But its not automatic, because you have to press any key coz its built in your program
I removed the while cycle and now its working correctly
CHAPTER1=timecode
CHAPTER1NAME=Chapter 1 ...
Thanks for your help!
Reply With Quote
  #12  
Old 04-21-2018, 06:03 AM
faviogames faviogames is offline
New Member
 
Join Date: Apr 2018
Location: Belgium
Posts: 1
Unable to download it, could reupload to other site. Thx! in advance!
Reply With Quote
  #13  
Old 05-20-2018, 12:27 PM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
attached is what i believe is the most recent version of this that i could find on my server. Note i have not used these tools in several years.
Attached Files
File Type: zip MPLS Tools v0_2.zip (237.6 KB, 378 views)
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux MPEG Editor ChePazzo SageTV Linux 2 09-14-2010 05:58 PM
Does the nanoPEG editor work? EdwardATeller General Discussion 0 08-04-2008 07:29 AM
HD/Bluray for HTPC or buy standalone HD/Bluray player m1abrams Hardware Support 19 11-16-2007 10:44 PM
Standalone Editor? sakker SageTV Studio 2 03-24-2007 01:12 PM
Audigy 2 ZS Video Editor SHS Hardware Support 2 04-25-2005 02:19 PM


All times are GMT -6. The time now is 01:04 PM.


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