[PP-Script] Set Default Language

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
cxhamilton
Posts: 4
Joined: 19 Nov 2013, 14:42

[PP-Script] Set Default Language

Post by cxhamilton » 20 Nov 2013, 14:31

Hello.

I have been working on a pp-script that will analyze an MKV and reset the track's default audio language flags based on a series of preferences (preferred language, ignore words, etc.). I'm writing this script to solve a problem with TV shows and movies having a foreign language set as the default audio language track. I have a couple of questions for the group:

1. Would anyone else find value in this script? If so, I'll make it "release" worthy. If not, I'll make my own assumptions and rock on.

2. If the answer to #1 is "yes" -- how would you like me to handle the scenario where you are an English speaker, the default audio track is French, and the English track is not indicated as an English track. From a programatic perspective, it is "None". My thought was to have a config param to assume that "None" is English or "None" should be considered the same as your defined "preferred language".

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Set Default Language

Post by hugbug » 21 Nov 2013, 09:37

I'm interested.
How much data needs to be written to change the language? Is it just changing of few bytes in the file or the whole file needs to be rewritten? In the later case this would take too much time on my slow device and I wouldn't use the script.

prinz2311
Posts: 464
Joined: 08 Dec 2012, 00:03

Re: [PP-Script] Set Default Language

Post by prinz2311 » 21 Nov 2013, 12:25

For mkv you just need to change the default flag for the tracks in the header of the file. So only a few bytes.

cxhamilton
Posts: 4
Joined: 19 Nov 2013, 14:42

Re: [PP-Script] Set Default Language

Post by cxhamilton » 21 Nov 2013, 18:22

The current version uses enzyme to parse the MKV. It generates the appropriate command arguments and executes mkvpropedit. Total time is < 5 seconds, even for very large MKVs.

hugbug
Developer & Admin
Posts: 7514
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Set Default Language

Post by hugbug » 22 Nov 2013, 21:51

mkvpropedit is not available on my platform :( It has a lot of dependencies.
How about writing directly into file or extend enzyme for that? ;)

cxhamilton
Posts: 4
Joined: 19 Nov 2013, 14:42

Re: [PP-Script] Set Default Language

Post by cxhamilton » 25 Nov 2013, 15:12

hugbug wrote:mkvpropedit is not available on my platform :( It has a lot of dependencies.
How about writing directly into file or extend enzyme for that? ;)
Well, since you asked with a winky-smiley ...

I have a working prototype, based on enzyme code, that will correctly flip the default flag bit. Before I clean up and integrate this with the pp-script, I would like to get a few MKV (very small) samples from anyone who may be interested in using the pp-script, as I have fixed my entire library and there are a couple of use cases that I need to make sure that my approach is sound.

If I set up a Dropbox, would anyone be willing to contribute a few samples?

mystik
Posts: 7
Joined: 19 Mar 2015, 17:39

Re: [PP-Script] Set Default Language

Post by mystik » 20 Mar 2015, 00:54

Sorry to dig up an old thread, but was this ever released? I'm not seeing a download link. I am interested. :) Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests