Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

VLC PLayer and Plex

Hi I want to playback my videofiles on a vlc player served by a plex media server running on a windows machine.

So i d like to get a resizable videoplayer working with plex but i dont get it...

if i try to open the mediaserver with the windows media player it cant diplay folders or any movie and on vlc i can see the server in the playlist menue but cant open it to add a single movie oer anything else. My serverversion is 0.9.6.5

if annybondy can help me pls answer tx ... (if anyone can tell me how i get apis and how to fetch media mybe we can start making a vlc plugin)

Comments

  • baabaa Posts: 3,952Members, Plex Pass, Forum Moderator Forum Mod
    edited July 2012
    Not sure if this helps...
    a couple of month ago I tried to understand a little more about the internals of Plex, especially the communication between the Server and the clients. In the end I came up with a small application to
    - dig through the (remote) library
    - ask VLC to replay the file.
    It worked for the basic stuff, but misses some core features like...
    - defining the clients capabilities (to start a transcoder session)
    - replaying transcoded or streamed files thats PMS sends in chunks.
    Anyway, I added the main C file for your reference, it basically outlines the idea behind it. If you want I also can share the secondary helper functions to bring it to live. Have a look and check back if you need more :-)

    /*
     *  main.c
     *  LilPlex
     *
     *  Created by Baa on 9/12/11.
     *  Copyright 2011 __MyCompanyName__. All rights reserved.
     *
     */
    
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    
    #include "help_Bonjour.h"
    #include "help_HTTP_XML.h"
    #include "help_PMS.h"
    
    
    
    int main(int argc, const char * argv[])
    {
    	/*
    	 * look up Plex Media Server on Bonjour...
    	 */
    	printf("*** look up PMS\n");
    
    	char* IPAddr;
    	int IPPort;
    	Bonjour_FindPMS(&IPAddr, &IPPort);
    
    	/*
    	 Result:
    	 HTTPAddr: 192.168.178.20
    	 HTTPPort: 32400
    	 */
    
    	/* 
    	 * request "http://<PMSadr>
    	 */
    
    	int choice;
    
    	char* HTTPAddr = NULL;
    	HTTP_BuildAddr(&HTTPAddr, IPAddr, IPPort, "/");
    	
    	char* HTTPResponse = NULL;
    	struct Menu_T* Menu;
    	
    	do
    	{
    		printf("*** HTTP request\n");
    		
    		HTTP_Request(&HTTPResponse, HTTPAddr);
    	
    		/*
    		 Result:
    		 <MediaContainer size="15" friendlyName="baas-imac.fritz.box" machineIdentifier="8c47f270d8fd11e08ba764d8f5c34de07f9c950c" platform="MacOSX" transcoderActiveVideoSessions="0" transcoderVideoBitrates="64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000" transcoderVideoQualities="0,1,2,3,4,5,6,7,8,9,10,11,12" transcoderVideoResolutions="128,128,160,240,320,480,768,720,720,1080,1080,1080,1080" version="0.9.3.4-397e914">
    		 <Directory count="1" key="accounts" title="accounts"/>
    		 <Directory count="1" key="applications" title="applications"/>
    		 <Directory count="1" key="channels" title="channels"/>
    		 [...]
    		 </MediaContainer>
    		 */
    		
    		/*
    		 * receive XML and decode. display "folders"
    		 */
    		
    		printf("*** decode XML\n");
    		
    		XML_Decode(&Menu, HTTPResponse);  // Menu[256]
    		
    		/*
    		 Result:
    		 Menu[0].key = "accounts"
    		 Menu[0].title = "accounts"
    		 Menu[0]...
    		 Menu[0].IsDir = 1 // Directory
    		 */
    		
    		/*
    		 * receive user input: move up/down in folder hirachy
    		 */
    		
    		printf("*** Menu and Selection\n");
    		
    		PMS_ShowMenu(Menu);
    		PMS_Selection(&HTTPAddr, IPAddr, IPPort, Menu);
    
    		/*
    		 if Dir loop to HTTP request
    		   system/plugins/all/...
    		   video/abc
    		   library/sections/
    		 if video file call video player
    		   library/parts/12466/file.avi
    		 */
    	}
    	while(Menu[choice].IsDir==1);
    		
    	/*
    	 * call video player
    	 * VLC/Safari/Quicktime: open Network/URL - http://192.168.178.20:32400/library/parts/12466/file.avi
    	 */
    	/*
    	 '/video/:/transcode/segmented/start.m3u8?identifier=com.plexapp.plugins.library&offset=0&quality=5&url=http%3A%2F%2F127.0.0.1%3A32400${video}&3g=0&httpCookies=&userAgent=';
    	 */
    	printf("*** call video player\n");
    		
    	printf("PLAY FILE: %s\n", HTTPAddr);
    	
    	char cmd[5000];
    	strcpy(cmd, "/Applications/VLC.app/Contents/MacOS/VLC ");
    	strcat(cmd, HTTPAddr);
    	strcat(cmd, " &");
    
    	free(HTTPAddr);
    	free(HTTPResponse);
    	//free(Menu);
    	
    	system(cmd);
    	free(Menu);
    	return(0);
    }
    
  • falcofalco Posts: 8Members
    Hello buddys,

    could you tell me where I can get the includes header files?

    thanks,
    Chris
  • tlochnertlochner Posts: 19Members ✭✭

    this is where i started ... it said vlc player worked with flex, i never even heard of flex.
    http://www.iphonehacks.com/2014/01/stream-videos-ipad-iphone-plex-vlc.html

    does vlc player work over cellular network with flex?
    it asks for flex login info,
    server,port, user,pass
    what do you put in for server and port?
    ext ip 108.51.xxx.xx
    server name is main_2600k
    port 28047 is the only port i can get open, that open port will see.
    i can't get this to work,
    please help.

Sign In or Register to comment.