Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.apps > #39484 > unrolled thread

DVD Player and osascript?

Started byPaul Förster <paul.foerster@gmx.net>
First post2017-09-16 12:44 +0200
Last post2017-09-27 11:34 +0000
Articles 15 — 3 participants

Back to article view | Back to comp.sys.mac.apps


Contents

  DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-16 12:44 +0200
    Re: DVD Player and osascript? Jolly Roger <jollyroger@pobox.com> - 2017-09-16 16:36 +0000
      Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-16 21:59 +0200
        Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-16 23:42 +0000
          Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-26 11:39 +0200
            Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-26 21:33 +0000
              Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-27 06:05 +0200
                Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-27 11:31 +0000
                  Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-27 19:56 +0200
                    Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-27 18:38 +0000
      Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-16 23:34 +0000
        Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-26 11:42 +0200
          Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-26 21:35 +0000
            Re: DVD Player and osascript? Paul Förster <paul.foerster@gmx.net> - 2017-09-27 06:06 +0200
              Re: DVD Player and osascript? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2017-09-27 11:34 +0000

#39484 — DVD Player and osascript?

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-16 12:44 +0200
SubjectDVD Player and osascript?
Message-ID<f24djjF4j1cU1@mid.individual.net>
Hi,

can I list the audio and subtitle track *names* of a DVD with osascript 
or some other Mac standard tool?

I can:

tell application "DVD Player" to audio track

and get for example "4" as an answer. But what is "4"? Taking a look at 
the menu Features/Audio reveals "4" to be "English 4 (Directors 
Comments)". How does DVD Player do that? Looking at the DVD Apple 
Script dictionary has no mention of a name list corresponding to the 
numbers.

Is there any way to list the names of audio tracks and subtitles 
without installing Handbrake and what not? I've searched the net for 
quite some time now but found nothing. :-(

Thanks very mich for tips in advance.
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [next] | [standalone]


#39501

FromJolly Roger <jollyroger@pobox.com>
Date2017-09-16 16:36 +0000
Message-ID<f2527pF909fU1@mid.individual.net>
In reply to#39484
On 2017-09-16, Paul Förster <paul.foerster@gmx.net> wrote:
> Hi,
>
> can I list the audio and subtitle track *names* of a DVD with osascript 
> or some other Mac standard tool?
>
> I can:
>
> tell application "DVD Player" to audio track
>
> and get for example "4" as an answer. But what is "4"? Taking a look at 
> the menu Features/Audio reveals "4" to be "English 4 (Directors 
> Comments)". How does DVD Player do that? Looking at the DVD Apple 
> Script dictionary has no mention of a name list corresponding to the 
> numbers.

DVD Player seems to offer only a very rudimentary scripting interface.
I'm afraid you won't be getting the information you want out of DVD
Player as a result.

> Is there any way to list the names of audio tracks and subtitles 
> without installing Handbrake and what not? I've searched the net for 
> quite some time now but found nothing. :-(

I'm curious: Why the aversion to installing HandBrake? It's a simple
drag-and-drop install, after all. 

Anyway, I think you need to look somewhere other than DVD Player. If I
were going to script something up, I'd probably start by seeing if
qt_tools / QT Coffee can do what I want since I am already familiar with
them and they work well enough:

<http://omino.com/sw/qt_tools/>

<http://web.archive.org/web/20150802051715/http://www.3am.pair.com/QTCoffee.html>

What is it you are actually trying to accomplish by listing audio and
subtitle track names? What is it you are actually trying to do here?

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

[toc] | [prev] | [next] | [standalone]


#39514

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-16 21:59 +0200
Message-ID<f25e56FbtlqU1@mid.individual.net>
In reply to#39501
Hi Jolly Roger,

On 2017-09-16 16:36:09 +0000, Jolly Roger said:
> DVD Player seems to offer only a very rudimentary scripting interface.
> I'm afraid you won't be getting the information you want out of DVD
> Player as a result.

yes, it's rudimentary but beside not spitting out the selection item's 
names sufficient for my use case.

> I'm curious: Why the aversion to installing HandBrake? It's a simple
> drag-and-drop install, after all.

it's not that I feel bad about Handbrake or something. I just want to 
stick to tools being part of a plain OS installation, if possible. This 
increases portability significantly.

> Anyway, I think you need to look somewhere other than DVD Player. If I
> were going to script something up, I'd probably start by seeing if
> qt_tools / QT Coffee can do what I want since I am already familiar with
> them and they work well enough:
> 
> <http://omino.com/sw/qt_tools/>
> 
> <http://web.archive.org/web/20150802051715/http://www.3am.pair.com/QTCoffee.html> 
> 

thanks for the links. I'll check them out.

> What is it you are actually trying to accomplish by listing audio and
> subtitle track names? What is it you are actually trying to do here?

I have a Mini sitting under my TV in the living room that I use to 
watch DVDs. I used a few Apple Remotes, but each one seems to fail 
sooner or later (no, not because of en empty battery). That seems to be 
a common and unsolved problem with Minis. God knows why...

So I need a way to control DVD Player remotely. I wrote a bash script 
that contains osascript calls to control the DVD Player application 
which works great. It shows a progress bar, total, playing and 
remaining time, lets me toggle full screen, closed captions, enter the 
title (PTT) and audio menus, play/pause, fast forward, rewind, move to 
chapters, etc. All fine. :-)

I only wish I could select audio and subtitle tracks by name rather 
than by number. Beside that, the script does exactly what it is 
supposed to do. So I can launch it on my laptop which usually sits on 
my lap when I watch TV or DVD and connect to the Mini in a terminal to 
control the DVD Player remotely.

I could of course analyze the VOB files for language codes but that 
requires me to study the VOB file format which I would like to avoid.

And the crop of the cream would be displaying the region code. ;-)
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39532

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-16 23:42 +0000
Message-ID<slrnorrdn3.3tl.g.kreme@snow.local>
In reply to#39514
In message <f25e56FbtlqU1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Jolly Roger,

> On 2017-09-16 16:36:09 +0000, Jolly Roger said:
>> DVD Player seems to offer only a very rudimentary scripting interface.
>> I'm afraid you won't be getting the information you want out of DVD
>> Player as a result.

> yes, it's rudimentary but beside not spitting out the selection item's 
> names sufficient for my use case.

>> I'm curious: Why the aversion to installing HandBrake? It's a simple
>> drag-and-drop install, after all.

> it's not that I feel bad about Handbrake or something. I just want to 
> stick to tools being part of a plain OS installation, if possible. This 
> increases portability significantly.

This is not realistic for anything having to do with DVDs.

> So I need a way to control DVD Player remotely.

Consider not using DVD Player. There are much better options.

In your situation what I would do is buy a 1TB drive (or larger) and rip
all my DVDs to it. Just do 5 or 10 a day until you're done. Start with
your favorites and work down. A 1TB drive should easily hold 1000 DVDs.

Then use something like Plex which has  good UI and is easily controlled
with a remote or a wireless keyboard.

Done and done.

And I say this because it is exactly what I did many years ago.

One other possibility, I *THINK* Plex supports VIDEO_TS folders, so you
could simply copy the DVDs to a drive and just put them into a folder in
the format

High Sierra (1940)/
   VIDEO_TS/
      (vob files here)

And you are good to go.

If this works it means much more wasted space, but you don't have to
spend any time encoding and HD space is cheap. Get a 4TB drive ($100 or
less) and you still have room for 1000 DVDs.


-- 
When and where does this "real world" occur?!

[toc] | [prev] | [next] | [standalone]


#39622

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-26 11:39 +0200
Message-ID<f2uliqF5ofaU1@mid.individual.net>
In reply to#39532
Hi Lewis,

On 2017-09-16 23:42:27 +0000, Lewis said:
> This is not realistic for anything having to do with DVDs.

yes, and no. As far as the DVD controlling part is concerned, you are 
right. Each DVD player program is controlled differently, which is 
perfectly natural. Still, my controlling program (which is a bash 
script) can be programmed most portably (does that word exist in 
English? Well, you get my point :-)).

> Consider not using DVD Player. There are much better options.

well, actually, DVD Player does exactly what I want. So, no need for me 
to use VLC or some other program.

> High Sierra (1940)/
>    VIDEO_TS/
>       (vob files here)

I found that the region code mask is always byte $36 of the 
VIDEO_TS.IFO file. So this is quickly read and analyzed even for such a 
slow thing as a bash script. I also found that the DVD movie name is 
always the name of the folder containing the VIDEO_TS/VIDEO_TS.IFO 
file. So, I can take the movie title from there (in 99% of the cases).

Investing into physical storage and tons of copying times is not the 
way I want to go. After all, it's all on the disk...
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39625

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-26 21:33 +0000
Message-ID<slrnoslhtl.2lmf.g.kreme@snow.local>
In reply to#39622
In message <f2uliqF5ofaU1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Lewis,

> On 2017-09-16 23:42:27 +0000, Lewis said:
>> This is not realistic for anything having to do with DVDs.

> yes, and no. As far as the DVD controlling part is concerned, you are 
> right. Each DVD player program is controlled differently, which is 
> perfectly natural. Still, my controlling program (which is a bash 
> script) can be programmed most portably (does that word exist in 
> English? Well, you get my point :-)).

>> Consider not using DVD Player. There are much better options.

> well, actually, DVD Player does exactly what I want.i

And yet you are posting about having issues with it?

> So, no need for me to use VLC or some other program.

You don't know what you don't know.

>> High Sierra (1940)/
>>    VIDEO_TS/
>>       (vob files here)

> I found that the region code mask is always byte $36 of the 
> VIDEO_TS.IFO file. So this is quickly read and analyzed even for such a 
> slow thing as a bash script. I also found that the DVD movie name is 
> always the name of the folder containing the VIDEO_TS/VIDEO_TS.IFO 
> file. So, I can take the movie title from there (in 99% of the cases).

You have an odd selection of discs then. I had many DVDs where the
folder had names like MOVIEFIL0998 or SPECIALEDTN, (Special Edition of a
movie not named Special Edition) or BLSAD (for Blazing Saddles. not
saying that was an actual folder name, but many were along those lines.)

> Investing into physical storage and tons of copying times is not the 
> way I want to go. After all, it's all on the disk...

You save a lot of time not having to go find the disc, get the disc out of
the case, find a place to put the case with the disc not in it, put the
disc in the computer, sit through the FBI warnings, unskippable
previews, and shitty menus.

Also, you regain a lot of shelf space when you don't have to have the
DVDs out so you can access them.


-- 
May the forces of evil become confused on the way to your house.

[toc] | [prev] | [next] | [standalone]


#39637

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-27 06:05 +0200
Message-ID<f30mchFk9b7U1@mid.individual.net>
In reply to#39625
Hi Lewis,

On 2017-09-26 21:33:41 +0000, Lewis said:
> And yet you are posting about having issues with it?

did I say I have issues? I had a question. I have issues with Apple not 
updating the bash but I have no issues with DVD Player.

> You have an odd selection of discs then. I had many DVDs where the
> folder had names like MOVIEFIL0998 or SPECIALEDTN, (Special Edition of a
> movie not named Special Edition) or BLSAD (for Blazing Saddles. not
> saying that was an actual folder name, but many were along those lines.)

funny. I know that some do that, but most of my DVDs show a halfway 
meaningful name, though sometimes somewhat abbreviated, when mounted.

> You save a lot of time not having to go find the disc, get the disc out of
> the case, find a place to put the case with the disc not in it, put the
> disc in the computer, sit through the FBI warnings, unskippable
> previews, and shitty menus.
> 
> Also, you regain a lot of shelf space when you don't have to have the
> DVDs out so you can access them.

well, in that case, why do you have DVDs at all? Why don't you just use 
streaming services?

Also, I have few DVDs with an FBI warning because I'm not in FBI land. :-P
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39640

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-27 11:31 +0000
Message-ID<slrnosn30p.2ta9.g.kreme@snow.local>
In reply to#39637
In message <f30mchFk9b7U1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Lewis,

> On 2017-09-26 21:33:41 +0000, Lewis said:
>> And yet you are posting about having issues with it?

> did I say I have issues? I had a question. I have issues with Apple not 
> updating the bash but I have no issues with DVD Player.

>> You have an odd selection of discs then. I had many DVDs where the
>> folder had names like MOVIEFIL0998 or SPECIALEDTN, (Special Edition of a
>> movie not named Special Edition) or BLSAD (for Blazing Saddles. not
>> saying that was an actual folder name, but many were along those lines.)

> funny. I know that some do that, but most of my DVDs show a halfway 
> meaningful name, though sometimes somewhat abbreviated, when mounted.

>> You save a lot of time not having to go find the disc, get the disc out of
>> the case, find a place to put the case with the disc not in it, put the
>> disc in the computer, sit through the FBI warnings, unskippable
>> previews, and shitty menus.
>> 
>> Also, you regain a lot of shelf space when you don't have to have the
>> DVDs out so you can access them.

> well, in that case, why do you have DVDs at all? Why don't you just use 
> streaming services?

I do not have DVDs any longer, but I did have many DVDs.

> Also, I have few DVDs with an FBI warning because I'm not in FBI land. :-P

The DVDs I got from Europe had the same warning, only Interpol instead
of FBI. Same diff.

-- 
Why is it so damn hot in here, and why are we all in a handbasket?

[toc] | [prev] | [next] | [standalone]


#39654

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-27 19:56 +0200
Message-ID<f3271jF394jU1@mid.individual.net>
In reply to#39640
Hi Lewis,

On 2017-09-27 11:31:37 +0000, Lewis said:
> I do not have DVDs any longer, but I did have many DVDs.

but you have copies on some drive. Is that legal without owning the 
original media they came on?

> The DVDs I got from Europe had the same warning, only Interpol instead
> of FBI. Same diff.

hmm, my collection of about 600 DVDs, only a few have that don't steal 
clip. Most have more like Disney trash trailers and stuff like that. 
All of them have a 5-10 second don't copy warning with white text on 
black background, though. But that doesn't present a problem for me.
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39656

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-27 18:38 +0000
Message-ID<slrnosns23.1dl9.g.kreme@snow.local>
In reply to#39654
In message <f3271jF394jU1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Lewis,

> On 2017-09-27 11:31:37 +0000, Lewis said:
>> I do not have DVDs any longer, but I did have many DVDs.

> but you have copies on some drive.

Not so much. I have some that kept DVDs for, but with a 10' screen,
standard def is rpetty hideous, so I have replaced most everything with
HD versions.

> Is that legal without owning the original media they came on?

Oh, I still have the discs that I've not replaced, they just sit on a
spindle in a storage box in the garage, not taking up space where I
would need them to on hand to insert them in a DVD player.

-- 
"A politician is a man who approaches every problem with an open mouth."

[toc] | [prev] | [next] | [standalone]


#39531

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-16 23:34 +0000
Message-ID<slrnorrd8g.3tl.g.kreme@snow.local>
In reply to#39501
In message <f2527pF909fU1@mid.individual.net> Jolly Roger <jollyroger@pobox.com> wrote:
> On 2017-09-16, Paul Förster <paul.foerster@gmx.net> wrote:
>> Hi,
>>
>> can I list the audio and subtitle track *names* of a DVD with osascript 
>> or some other Mac standard tool?
>>
>> I can:
>>
>> tell application "DVD Player" to audio track
>>
>> and get for example "4" as an answer. But what is "4"? Taking a look at 
>> the menu Features/Audio reveals "4" to be "English 4 (Directors 
>> Comments)". How does DVD Player do that? Looking at the DVD Apple 
>> Script dictionary has no mention of a name list corresponding to the 
>> numbers.

> DVD Player seems to offer only a very rudimentary scripting interface.
> I'm afraid you won't be getting the information you want out of DVD
> Player as a result.

And there is no standard way that DVDs lay out their track numbers. I
might make sense, to mere mortals, that title 1 is, you know, the movie.
But who knows, it might be, but probably not. Which title is it And
which track is English? It's different on every disc.

>> Is there any way to list the names of audio tracks and subtitles 
>> without installing Handbrake and what not? I've searched the net for 
>> quite some time now but found nothing. :-(

> I'm curious: Why the aversion to installing HandBrake? It's a simple
> drag-and-drop install, after all. 

I don't think the title name and track labels are exposed on the DVD,
are they? It's been a while, but I think even Handbrake would simply
list "Title 1: 02:13" and "Title 2: 13:21" and "Title 3: 1:47:09" and
you'd have to think, "Hey, I bet the one that's 107 minutes long is the
movie" and select that one.

Maybe that also varies. When I ripped my Loony Tunes discs I had to hand
rename every single file.


-- 
Personal isn't the same as important

[toc] | [prev] | [next] | [standalone]


#39623

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-26 11:42 +0200
Message-ID<f2ulobF5pnuU1@mid.individual.net>
In reply to#39531
Hi Lewis,

On 2017-09-16 23:34:40 +0000, Lewis said:
> And there is no standard way that DVDs lay out their track numbers. I
> might make sense, to mere mortals, that title 1 is, you know, the movie.
> But who knows, it might be, but probably not. Which title is it And
> which track is English? It's different on every disc.

well, in fact, there is. But the files seem to caintain heavy chains of 
pointers. So, following them is the way to go. I already found the 
language information and region code mask. I'm not yet sure how to get 
to the language codes programatically, but I'm sure I will figure that 
one out too.

> I don't think the title name and track labels are exposed on the DVD,
> are they? It's been a while, but I think even Handbrake would simply
> list "Title 1: 02:13" and "Title 2: 13:21" and "Title 3: 1:47:09" and
> you'd have to think, "Hey, I bet the one that's 107 minutes long is the
> movie" and select that one.
> 
> Maybe that also varies. When I ripped my Loony Tunes discs I had to hand
> rename every single file.

the title names must be there. After all, DVD Player shows them. So 
there must be a way to get to them. They're definitely on the disk 
somewhere.
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39626

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-26 21:35 +0000
Message-ID<slrnosli12.2lmf.g.kreme@snow.local>
In reply to#39623
In message <f2ulobF5pnuU1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Lewis,

> On 2017-09-16 23:34:40 +0000, Lewis said:
>> And there is no standard way that DVDs lay out their track numbers. I
>> might make sense, to mere mortals, that title 1 is, you know, the movie.
>> But who knows, it might be, but probably not. Which title is it And
>> which track is English? It's different on every disc.

> well, in fact, there is. But the files seem to caintain heavy chains of 
> pointers. So, following them is the way to go. I already found the 
> language information and region code mask. I'm not yet sure how to get 
> to the language codes programatically, but I'm sure I will figure that 
> one out too.

>> I don't think the title name and track labels are exposed on the DVD,
>> are they? It's been a while, but I think even Handbrake would simply
>> list "Title 1: 02:13" and "Title 2: 13:21" and "Title 3: 1:47:09" and
>> you'd have to think, "Hey, I bet the one that's 107 minutes long is the
>> movie" and select that one.
>> 
>> Maybe that also varies. When I ripped my Loony Tunes discs I had to hand
>> rename every single file.

> the title names must be there. After all, DVD Player shows them. So 
> there must be a way to get to them. They're definitely on the disk 
> somewhere.

They are embedded in the vob files as I recall, which is not really the
same thing as "on the disc".

-- 
I would rather be a mute poet, a blind artist or a deaf musician than a
heartless man. -Graffiti, bathroom wall @ The Napoleon House New Orleans
1967 (via @johnlarroquette)

[toc] | [prev] | [next] | [standalone]


#39638

FromPaul Förster <paul.foerster@gmx.net>
Date2017-09-27 06:06 +0200
Message-ID<f30mf1Fk9ooU1@mid.individual.net>
In reply to#39626
Hi Lewis,

On 2017-09-26 21:35:30 +0000, Lewis said:
> They are embedded in the vob files as I recall, which is not really the
> same thing as "on the disc".

splitting hairs? The VOB files are on the disc. Whereelse should they be?

Why so aggressive?
-- 
cul8er

Paul
paul.foerster@gmx.net

[toc] | [prev] | [next] | [standalone]


#39641

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2017-09-27 11:34 +0000
Message-ID<slrnosn368.2ta9.g.kreme@snow.local>
In reply to#39638
In message <f30mf1Fk9ooU1@mid.individual.net> Paul Förster <paul.foerster@gmx.net> wrote:
> Hi Lewis,

> On 2017-09-26 21:35:30 +0000, Lewis said:
>> They are embedded in the vob files as I recall, which is not really the
>> same thing as "on the disc".

> splitting hairs?

Not really.

> The VOB files are on the disc. Whereelse should they be?

Having something on the disc that is easily readable (filename,
directory name, metadata) as opposed to having something encoded in a
VOB file is not the same thing. Also, there are other files on the DVD
besides the VOB files.

But this is all going back quite a number of years.

> Why so aggressive?

I don't think you know what that word means?

-- 
I'm completely in favor of the separation of Church and State. My idea
is that these two institutions screw us up enough on their own, so both
of them together is certain death.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.mac.apps


csiph-web