AutoHotkey Community

It is currently May 27th, 2012, 12:07 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: January 29th, 2012, 12:15 pm 
Hy,

I entered the correct path C:\Program Files (x86)\VideoLAN\VLC\http\, activated html interface. 127.0.0.1 is not being saved. 8080 should be the default anyway, but it is strange, that the line is not saved at all. (Write Restrictions?)

I went to the vlc config file and added it there:


[oldhttp] # HTTP remote control interface

# Host address (Text)
http-host=127.0.0.1:8080


The location of the Config File:

Linux / Unix: $(HOME)/.config/vlc/vlcrc (v0.9.0 and above), $(HOME)/.vlc/vlcrc (v0.8 and older)
Mac OS X: HOME/Library/Preferences/org.videolan.vlc HOME/Library/Preferences/VLC (v0.9 and older)
Windows 95/98/ME: C:\Windows\Application Data\vlc\vlcrc
Windows 2000/XP: C:\Documents and Settings\%username%\Application Data\vlc\vlcrc
Windows Vista/7: C:\Users\%username%\Application Data\vlc\vlcrc
BeOS: config/settings/vlcrc

Now the adress appears correctly in the vlc Options.

then, from your library I came up with that script:

Code:

SC171::VLCHTTP_Pause()
SC12C::VLCHTTP_VolumeUp(12)
SC172::VLCHTTP_VolumeDown(12)
SC107::VLCHTTP_JumpForward(10)
SC108::VLCHTTP_JumpBackward(10)



It is using my additional keys. they are working with ahk.

But in VLC with the above commands, nothing happens. I see that the script is executing the command line in the ahk window, but vlc isn't doing anything.

Any mistakes?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2012, 6:05 pm 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
Oddly the 127.0.0.1 is not being saved on this computer either but the library still works. It is saved on my home computer, don't know what the differences is. I'm guessing it just doesn't get displayed when options is opened again since it does still work.

The only other difference I see is the final backslash which it would seem should be needed but I don't have it. Try without it and see if it makes any difference.

I'm trying to get checked out of my hotel right now and will have limited time to access the internet for the next few days but I'll keep working on this. Let me know if you figure out the problem.

_________________
Links to my scripts.
---------------------------------------------------------------------------------------------

I too have an app for that... and that... and that, and that, and that.
It's called a web browser.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2012, 10:29 pm 
Offline

Joined: November 14th, 2007, 2:47 pm
Posts: 335
Location: London, England
Is there anyway to get a screen grab from VLC using this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 22nd, 2012, 3:38 am 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
doyle wrote:
Is there anyway to get a screen grab from VLC using this?


Nope, the number of commands available in the HTTP interface is limited.

The RC interface does have the capture commands but I have not been able to figure out how it works.

_________________
Links to my scripts.
---------------------------------------------------------------------------------------------

I too have an app for that... and that... and that, and that, and that.
It's called a web browser.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2012, 11:18 am 
Offline

Joined: November 14th, 2007, 2:47 pm
Posts: 335
Location: London, England
What about getting the size of the video being played?

I


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2012, 6:01 pm 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
doyle wrote:
What about getting the size of the video being played?


The Status commands returns a lot of information about what is being played. You have to parse the returned information to retrieve specifics. If you try the example from the first post, the information returned from the status command is displayed on the first tab of the third window. Here is a function for getting the video size.

Add this to the library,
Code:
;;;;;;;;;;;;;;;;;;;;;;  Video Size  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
VLCHTTP_VidSize() ;   Returns the resolution of the currently playing item.
   {
   Status := VLCHTTP_Status()
   Loop, parse, Status, `n, `r 
      {
      IfInString, A_LoopField, Resolution
      Resolution = %A_LoopField%
      }
   VidRes := UnHTM(Resolution)
   Return, %VidRes%   
   }   



Here's an example of it's use.
Code:
Gui, Add, Edit, x5 y5 w160 vVidSize,
Gui, Add, Button, x+5 40 gGetSize, Go
Gui, Show, Center w200 h40, Get Size
Return

GetSize:
Size := VLCHTTP_VidSize()
GuiControl , , VidSize, %Size%
Return

_________________
Links to my scripts.
---------------------------------------------------------------------------------------------

I too have an app for that... and that... and that, and that, and that.
It's called a web browser.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: April 24th, 2012, 4:27 pm 
The lib didn't quite work for me at first (with VLC 2.0 and AutoHotkey_L Unicode), I had to:

- Activate VLC HTTP interface (obvious)

- Replace UrlDownloadToVar by
Code:
UrlDownloadToVar(URL, ByRef aResponse="") {
   WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
   WebRequest.Open("GET", URL)
   WebRequest.Send()
   aResponse := WebRequest.ResponseText
   WebRequest := ""
}


- Replace e.g.
Code:
cmd = http://127.0.0.1:8080/?control=pause

and similar by
Code:
cmd = http://127.0.0.1:8080/requests/status.xml?command=pl_pause


Thanks for the library !

PS: I am quite new to this, so use at your own risk :P


Report this post
Top
  
Reply with quote  
PostPosted: April 25th, 2012, 8:21 am 
Offline

Joined: January 15th, 2007, 2:37 pm
Posts: 573
Actually this library doesn't work at all with VLC 2.**. They have rebuilt the the entire http interface. I'm not sure if it works on AHKL either.

I am working on a new library for the new VLC release. I'll post it as soon as I can.

_________________
Links to my scripts.
---------------------------------------------------------------------------------------------

I too have an app for that... and that... and that, and that, and that.
It's called a web browser.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: notsoobvious and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group