프로그램 사용/VLC2010. 4. 22. 11:06
http://192.168.10.94:8080/?control=pause

현재 사용중인 PC의 ip가 192.168.10.94 이고, VLC 에서 웹 인터페이스를 켜놨을 경우
위와 같이 URL을 입력하면 플레이 중인 동영상이 일시정지 된다.
pause는 토글 방식으로, 한번 보내면 멈추고, 다시 보내면 재생된다.

위는 dreambox에서 PC의 VLC로 원격명령을 날리는 부분을, wireshark로 캡쳐한 화면

2010/04/21 - [프로그램 사용/VLC] - VLC를 웹 쿼리로 제어하기 - VLC web control

'프로그램 사용 > VLC' 카테고리의 다른 글

VLC - V4L2 modules  (0) 2010.07.03
VLC 1.1.0 Luggage  (0) 2010.07.03
VLC를 웹 쿼리로 제어하기 - VLC web control  (0) 2010.04.21
x264 와 h264의 관계?  (0) 2010.04.15
VLC nightly build  (0) 2010.04.13
Posted by 구차니
프로그램 사용/VLC2010. 4. 21. 15:08
VLC 에는 web interface 라는 넘이 있는데,
이녀석을 원격지에서 http query를 통해 제어가 가능하다.

윈도우에서 기본설치시
C:\Program Files\VideoLAN\VLC\http\requests 경로에 존재하는 파일을 읽어보면 될 듯 하다.

웹에서 접속시에는
http://localhost:8080/requests/filename.xml?query
식으로 하면된다.

아래는 readme.txt 파일
$Id$

This file describes commands available through the requests/ file:

Lines starting with < describe what the page sends back
Lines starting with > describe what you can send to the page

All parameters need to be URL encoded.
Examples:
 # -> %23
 % -> %25
 + -> %2B
 space -> +
 ...

status.xml:
===========
< Get VLC status information, current item info and meta.

> add <mrl> to playlist and start playback:
  ?command=in_play&input=<mrl>

> add <mrl> to playlist:
  ?command=in_enqueue&input=<mrl>

> play playlist item <id>:
  ?command=pl_play&id=<id>

> toggle pause. If current state was 'stop', play item <id>:
  ?command=pl_pause&id=<id>

> stop playback:
  ?command=pl_stop

> jump to next item:
  ?command=pl_next

> jump to previous item:
  ?command=pl_previous

> delete item <id> from playlist:
  ?command=pl_delete&id=<id>

> empty playlist:
  ?command=pl_empty

> sort playlist using sort mode <val> and order <id>:
  ?command=pl_sort&id=<id>&val=<val>
  If id=0 then items will be sorted in normal order, if id=1 they will be
  sorted in reverse order
  A non exhaustive list of sort modes:
    0 Id
    1 Name
    3 Author
    5 Random
    7 Track number

> toggle random playback:
  ?command=pl_random

> toggle loop:
  ?command=pl_loop

> toggle repeat:
  ?command=pl_repeat

> toggle enable service discovery module <val>:
  ?command=pl_sd&val=<val>
  Typical values are:
    sap
    shoutcast
    podcast
    hal

> toggle fullscreen:
  ?command=fullscreen

> set volume level to <val> (can be absolute integer, percent or +/- relative value):
  ?command=volume&val=<val>
  Allowed values are of the form:
    +<int>, -<int>, <int> or <int>%

> seek to <val>:
  ?command=seek&val=<val>
  Allowed values are of the form:
    [+ or -][<int><H or h>:][<int><M or m or '>:][<int><nothing or S or s or ">]
    or [+ or -]<int>%
    (value between [ ] are optional, value between < > are mandatory)
  examples:
    1000 -> seek to the 1000th second
    +1H:2M -> seek 1 hour and 2 minutes forward
    -10% -> seek 10% back

playlist.xml:
=============
< get the full playlist tree

browse.xml:
===========
< ?dir=<dir>
> get <dir>'s filelist

vlm.xml:
========
< get the full list of VLM elements

vlm_cmd.xml:
============
< execute VLM command <cmd>
  ?command=<cmd>
> get the error message from <cmd>



[링크 : http://forum.videolan.org/viewtopic.php?f=16&t=45842]

2009/12/08 - [프로그램 사용/VLC] - VLC 웹 인터페이스 원격지에서 안될경우
2009/11/24 - [프로그램 사용/VLC] - VLC web interface(웹 인터페이스)
Posted by 구차니
프로그램 사용/VLC2009. 12. 8. 18:13
기본값으로 설치했을 경우
C:\Program Files\VideoLAN\VLC\http\.hosts
라는 파일의 내용은 아래와 같다.

#
# Access-list for VLC HTTP interface
# $Id$
#

# localhost
::1
127.0.0.1

# link-local addresses
#fe80::/64

# private addresses
#fc00::/7
#fec0::/10
#10.0.0.0/8
#172.16.0.0/12
#192.168.0.0/16
#169.254.0.0/16

# The world (uncommenting these 2 lines is not quite safe)
#::/0
#0.0.0.0/0

위의 localhost 부분이 자기 스스로 접속하면 되는데,
외부에서는 접속해도 forbidden 이라면서 접속하지 못하도록 하는 부분이다.

만약에 C Class를 허가하고 싶다면 ip/24로 적어주면된다.
(예를 들어 192.168.0.1~255를 허가하고 싶다면
192.168.0.1/24로 하면 된다.)


참고 : 굳이 VLC 죽였다 하지 않아도 자동으로 갱신되는 듯 하다.
Posted by 구차니
프로그램 사용/VLC2009. 11. 24. 15:18
VLC는 ffmpeg 의 GUI FrontEnd 인데
ffmpeg 가지고 놀다가, 문득 VLC에서 설정하면 어딘가 ffserver.conf 와 유사한 파일이 생성되지 않을까?
라는 생각이 이것저것 가지고 놀다보니, 신기한 것을 발견하게 되었다.


바로 웹 인터페이스!

가동시킨 컴퓨터의 ip와 8080 포트로 접속하면 웹에서 VLC를 원격제어 할 수 있다.
첫 페이지인 main VLC interface의 화면은 VLC 모습과 유사하다.

파일 열기를 선택하면 위와 같은 텍스트 기반의 파일 선택 창이 나오고

귀차니즘에 Browse를 누르니 목록이 뜬다.(물론 원격지의 파일이다)

두번째 페이지인 VLM interface 페이지.
VLM은 VideoLan Manager 의 약자이고, 스트리밍등의 VOD 서비스를 제어한다.
[링크 : http://wiki.videolan.org/Documentation:Streaming_HowTo/VLM]

세번째 페이지인 Mosaic wizard

1.0.3 버전의 스냅샷이지만, 0.8.6 버전에서도 지원된다.(Flash Based remote playback 제외)


2009/11/25 추가

0.8.6 버전에서는 외부에서도 접속이 가능했지만, 보안상의 문제인지 1.0.3 에서는
기본값으로 localhost 에서만 접속을 허용한다.

Access control

Access control - specific IPs or ranges of IP addresses - to the http interface can be done globally by editing "/usr/share/vlc/http/.hosts" (or "%PROGRAMFILES%\VideoLAN\VLC\http\.hosts" for Windows).

[링크 : http://wiki.videolan.org/Web_Interface]

Posted by 구차니