Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Intranet Apache server, and multimedia

  1. #1
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Intranet Apache server, and multimedia

    Hi,

    I got myself a cheap Android tablet with the main purpose of watching
    videos in bed or the sofa, instead of sitting at the computer. And
    instead of saving the video to the flash card of the tablet, I serve it
    from a machine running apache. It works nicely.

    In /etc/apache2/httpd.conf.local I wrote (or rather, YaST wrote, and I
    modified a bit):

    Code:
    Alias           /data/store   /data/store
    
    <Directory /data/store/>
    
    Options FollowSymLinks Indexes Includes
    AllowOverride All
    
    IndexOptions FancyIndexing \
    ScanHTMLTitles \
    NameWidth=*
    
    order deny,allow
    deny from all
    allow from localhost .valinor 192.168.1.51 192.168.1.52 192.168.1.32
    </Directory>
    And I allow wwwrun access to the directory by using ACLs, instead of
    giving the tree universal read rights, or changing the owner or group:

    Code:
    CAMINO=/data/store
    find $CAMINO -type d -exec setfacl -m u:wwwrun:rx '{}' \;
    find $CAMINO  -type f -exec setfacl -m u:wwwrun:r '{}' \;
    It is like a way of adding "owners" or "groups".

    I also created a terribly simple web page. On
    "/srv/www/htdocs/index.html" I have:

    Code:
    <html><body>
    <h1>Welcome to AmonLanc</a></h1>
    <h2>
    <a href="/data/store/">[Data]</a> <br>
    </h2>
    </body></html>

    The pages served are like this (auto generated by Apache, and trimmed a
    bit for clarity):

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Index of /data/store/Sueltos</title>
    </head>
    <body>
    <h1>Index of /data/store/Sueltos</h1>
    <pre>
    <img src="/icons/blank.gif" alt="Icon ">
    <a href="?C=N;O=D">Name</a>
    
    
    <a href="?C=M;O=A">Last modified</a>
    <a href="?C=S;O=A">Size</a>
    <a href="?C=D;O=A">Description</a>
    <hr><img src="/icons/back.gif" alt="[PARENTDIR]">
    <a href="/data/store/">
    Parent
    Directory</a>
    
    -
    
    <img src="/icons/movie.gif" alt="[VID]">
    <a href="Salvados%2011x05.(laSexta).avi">
    Salvados 11x05 Españoles por Suiza.avi</a>
    2013-11-26 05:46  1.0G<hr>
    </pre>
    <address>Apache/2.4.6 (Linux/SUSE) Server at amonlanc.valinor Port
    80</address>
    </body></html>



    It does work, with caveats.

    In the tablet, when tapping on a video with Firefox, it asks me how to
    complete the action; it offers a number of apps, and one of them is VLC.
    VLC is started standalone, given the URL, and renders the video on the
    fly without saving it locally (which is perfect, as some of the videos
    are too big for FAT).

    However, in Linux, I think it worked yesterday (I'm unsure), but not
    today after a reboot of the client machine. Maybe it did not.

    Firefox wants to display the video internally, with several plugins.
    First xine, which fails. I disable it. Then it wants windows media
    player. I disable it. Then mplayer something. I also disable it. Then,
    when about the only plugin active is "vlc web plugin", it works... but
    inside Firefox... I would like it _outside_, stand alone vlc.

    If on the plugin page I say "act to activate", it asks to activate the
    plugin it chooses. I can't choose plugin, or none at all, standalone app.

    If I disable VLC plugin, instead FF asks me to save or open with
    application. If I tell it to open with vlc, it first downloads the full
    video, then starts VLC with it. I do not want that at all.

    What should be done so that Firefox starts vlc as a standalone app, same
    as in Android, giving VLC the URL as a parameter, automatically?

    I can copy the URL to the clipboard, start VLC, then paste the URL. That
    does work. But it is a nuisance, not automatic.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,306
    Blog Entries
    2

    Default Re: Intranet Apache server, and multimedia

    If I understand what you are asking... that you want to launch the standalone VLC, connecting to a remote URL...

    From a command line, type
    Code:
    vlc target 
    "Target" can be a URL, path, filename, etc.

    So, you will probably want to find a console app for your tablet to do this.

    Some alternatives...
    Create a shortcut to your tablet desktop configured with the command line above.
    Create a playlist. Then after launching VLC, you can select the playlist which includes your URLs.
    As for your idea of creating an Index page with URLs to your clips, it <might> work to embed the same command line in the webpage but would require testing to verify it doesn't run afoul of a security issue launching a local app using a command from the Internet.

    Note how using the "vlc" command is how you explicitly invoke the standalone VLC player, over-riding any browser or other settings. Should work with any network-enabled player.

    HTH,
    TSU

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Intranet Apache server, and multimedia

    On 2014-09-26 20:36, tsu2 wrote:
    >
    > If I understand what you are asking... that you want to launch the
    > standalone VLC, connecting to a remote URL...
    >
    > From a command line, type
    >
    > Code:
    > --------------------
    > vlc -target -
    > --------------------


    That is exactly what I do.

    I just want to do that automatically from Firefox, with clicks, not cli.

    Firefox in the tablet, does that. Several taps, not one, but works.

    Firefox in Linux does not.

    I want Firefox in Linux to do it, too.

    It insists on opening the URL with a plugin, if found; if not found, it
    offers instead to download the target, or download and start VLC on the
    locally downloaded file. It does not offer to start "vlc target_url"

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  4. #4

    Default Re: Intranet Apache server, and multimedia

    Not sure this would help you but i have the package

    Code:
    gecko-mediaplayer
    And i have some videos that is hosted by my home webserver vial lan. which plays the video via firefox and not download it. I don't remember if all the video formats are supported though or is there is a size limit with the video file it can handle.


    Code:
    rpm -ql gecko-mediaplayer
    /usr/lib64/browser-plugins/gecko-mediaplayer-dvx.so
    /usr/lib64/browser-plugins/gecko-mediaplayer-qt.so
    /usr/lib64/browser-plugins/gecko-mediaplayer-rm.so
    /usr/lib64/browser-plugins/gecko-mediaplayer-wmp.so
    /usr/lib64/browser-plugins/gecko-mediaplayer.so
    .................................
    .............................
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  5. #5

    Default Re: Intranet Apache server, and multimedia

    It is a lot easier if your videos are coming from your tablet and you want to play it with you openSUSE box if you have kde install kdeconnect on both tablet and suse
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Firefox, intranet Apache server, and multimedia

    On 2014-09-27 01:26, jetchisel wrote:
    >
    > Not sure this would help you but i have the package
    >
    >
    > Code:
    > --------------------
    > gecko-mediaplayer
    > --------------------
    >
    >
    > which plays the video via firefox and not download it.


    It is installed (since May).

    But you don't understand.

    I can play the videos via Firefox just fine, inside a window or tab of
    Firefox, with several plugins. But I want they run *outside* of Firefox,
    in any standalone player of my choice, called automatically by Firefox,
    when I click on a video.

    Firefox in Android does that. I want Firefox in Linux to do that too.


    The server side problem is solved. The issue is Firefox, not Apache,
    contrary to what I thought initially.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7

    Default Re: Intranet Apache server, and multimedia

    Configure XBMC?
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Intranet Apache server, and multimedia

    On 2014-09-27 03:36, jetchisel wrote:
    >
    > Configure XBMC?


    What for?

    Sigh... :-(

    I repeat: I want Firefox to do in Linux the exact same thing that it
    does in Android. Period.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  9. #9

    Default Re: Intranet Apache server, and multimedia

    Quote Originally Posted by robin_listas View Post
    On 2014-09-27 03:36, jetchisel wrote:
    >
    > Configure XBMC?


    What for?

    Sigh... :-(

    I repeat: I want Firefox to do in Linux the exact same thing that it
    does in Android. Period.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)
    Right, sorry it is clear now :-), I have no sleep since shellshock saga started
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Firefox, Intranet Apache server, and multimedia

    On 2014-09-26 16:45, Carlos E. R. wrote:


    I'll try again to explain what I want.

    I have a machine serving video files with apache (runs openSUSE).

    On a Linux client machine, I can open a terminal, type:

    Code:
    vlc "http://amonlanc.valinor/data/store/Sueltos/a_video.avi"
    and vlc dutifully obliges by opening a window and displaying the video
    on the fly, with little network traffic.

    Now, I want to speed up the procedure and have the same thing by
    clicking on firefox on the link.


    What Firefox does instead is:

    a) if a suitable plugin is available, say VLC Web, xine plugin,
    xine-player, gecko-mediaplayer, etc, I get a new or same tab, with an
    icon on the center asking politely if I want to activate the plugin. I
    click on it, and the video starts displaying _inside_ that firefox tab.
    It displays instantly, with little network usage. I can fullscreen it,
    but it is firefox which is running:

    Code:
    
    > cer       7467  7.6  8.4 1463416 335928 ?      Sl   04:59   0:55 /usr/lib64/firefox/firefox
    > cer       7851  6.4  2.2 1097680 90152 ?       Sl   05:10   0:05  \_ /usr/lib64/firefox/plugin-container /usr/lib64/browser-plugins/libvlcplugin.so -greomni /usr/lib64/firefox/omni.ja -appomni /usr/lib64/firefox/browser/omni.ja -appdir /usr/lib64/firefox/browser 7467 true plugin
    > cer       7860  0.0  0.0 126528  3040 ?        Sl   05:10   0:00      \_ rccexternal
    It is not the standalone vlc player which runs, with full controls.


    b) If I disable all plugins capable of displaying a .avi file, then
    firefox offers to download the file, or to "open with". I can say open
    with vlc, but what it does is download the full file (which takes long
    and is a waste; it is saved to /tmp/something), and then it calls vlc to
    open the _local_ file (not the URL).


    What I want is instead to click on the file, and get vlc called with the
    URL as a parameter.


    And this is what, as far as I can see, happens on my cheap Android
    tablet. When I tap on the same link, I get a sort of pop up that says (I
    have to translate from Spanish): "Complete this action with" and I get
    some icons:

    Code:
    firefox     MX player      ES3 downloader
    download
    
    1Mobile Market           VLC
    
    
    ··············
    
    only this time          always


    I tap on "VLC" and "only this time" and VLC starts streaming and playing
    the video, with little network usage. Perfect.


    That is what I want to happen in the Linux Firefox, the same that the
    Firefox in Android does: call an external application and pass it the
    URL to handle. In other words, automatically call «vlc "URL"» when I
    click on the link.


    Maybe in Linux an addon is needed that adds an entry to the context menu
    to offer that action :-?
    Or another entry besides save as and open with.


    Maybe Android does not have plugins and does it that way natively?

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •