How can I open a VLC stream?

I found another problem, but in this case I think that it is not due to plugin performance. I have a problem when streaming to my TV (LG with Medialink)

1) I can see the stream only through DLNA, Medialink can't play it
2) after some minutes the stream automatically restarts from the beginning and starts looping almost the same sequence (every loop it moves a little forward).

I'm pretty sure that this is a TV problem, (maybe due to buffering?) also because I noticed the same thing using MediaTomb.

I think that if it is due to buffering solution would be lowering the bitrate of stream, but how can I do it?

I also have LG medialink TV and can only see the stream through DLNA. Restarting of stream, however, not observed. I'm streaming a http stream from  SimpleTV app (http://iptv.gen12.net).

I tried this myself and this is what Plex logs are returning to me:

May 25, 2013 15:16:18 [0xacef1b40] DEBUG - Job running: /usr/lib/plexmediaserver/Resources/Plex Transcoder transcode http://192.168.9.6:8080 /tmp/plex-transcode-50e30fa7-0361-4cfe-bccd-92012eed63ad-6ccf0cb1-7c9d-4526-9b60-8d3264b3acc0/media 4 10 0 any nil 2 yes UTF-8 default   0.9375 a none   aac 3355443 yes  no http://127.0.0.1:32400/video/:/transcode/session/50e30fa7-0361-4cfe-bccd-92012eed63ad/progress 
May 25, 2013 15:16:18 [0xa83ffb40] DEBUG - [Transcoder] Starting transcoder v306 (t=10s, q=4)
May 25, 2013 15:16:18 [0xad6f2b40] DEBUG - [Transcoder] Registered components, about to parse arguments.
May 25, 2013 15:16:18 [0xad6f2b40] DEBUG - [Transcoder] Video caps: ca=1, cv=0, ac=libvo_aacenc, mp3=-1, aac=0,1, ac3=-1, dts=-1, pcm=-1, vp=4d, vr=0, vl=0, mss=3355443, anam=1
May 25, 2013 15:16:18 [0xad6f2b40] DEBUG - [Transcoder] About to apply initial settings.
May 25, 2013 15:16:18 [0xa83ffb40] DEBUG - [Transcoder] Opening the input file.
May 25, 2013 15:16:23 [0xa83ffb40] DEBUG - [Transcoder] Thread count: 2
May 25, 2013 15:16:23 [0xa83ffb40] DEBUG - [Transcoder] Input #0, asf, from 'http://192.168.9.6:8080':
May 25, 2013 15:16:23 [0xa83ffb40] DEBUG - [Transcoder]     Stream #0.0, 124, 1/1000: Video: h264, yuv420p, 1280x694, SAR 1:1 DAR 640:347
May 25, 2013 15:16:23 [0xa83ffb40] DEBUG - [Transcoder] Applying output settings.
May 25, 2013 15:16:23 [0xacef1b40] DEBUG -  [FFMPEG] Duration: -1
May 25, 2013 15:16:23 [0xacef1b40] DEBUG - Read line, and done: 0
May 25, 2013 15:16:23 [0xad6f2b40] DEBUG - [Transcoder] Frames per second is either 24.390244 or 23.976024.
May 25, 2013 15:16:24 [0xad6f2b40] DEBUG - Request: GET /video/:/transcode/segmented/stop [192.168.9.4:53870] (2 live)
May 25, 2013 15:16:24 [0xabeefb40] DEBUG -  * Cookie: SESSION-GUID=50e30fa7-0361-4cfe-bccd-92012eed63ad; expires=Thu, 13-Aug-2020 23:59:59 GMT; Path=/;
May 25, 2013 15:16:24 [0xabeefb40] DEBUG - Stopping transcode session 50e30fa7-0361-4cfe-bccd-92012eed63ad
May 25, 2013 15:16:24 [0xabeefb40] DEBUG - Killing job.
May 25, 2013 15:16:24 [0xabeefb40] DEBUG - Signalling job ID 15933 with 9
 

I've tried mux as "asf", "mp4", and "mpegts" but no go no matter how I do it. Any thoughts?

Currently: can view vlc streams without plex via remote vlc player. can view vlc stream to localhost on local pht but nothing else. can view movies on any remote plex client from pms. When viewing channel from any other machine video fails to play.

SOLVED-ISH: (can't say yet which was the partial fix) Used internal lan IP instead of localhost, ensured i was logged in on the remote plex client (yeah didnt think much of this...fml), swapped the acodec in the vlc script for mp3, changed the ip in the default prefs file to the local lan ip and port also....BOOM, streaming live vlc stream through plex client...will continue to update in hopes this helps somebody someday

Will continue to tweak this vlc script as i know it could be better...1st time i ran vlc from cli was yesterday so i don't feel too bad

cvlc ~/Movies/FILE.mp4 --sout '#transcode{vcodec=h264,acodec=mp3,vb=800,ab=128}:standard{access=http,mux=ts,dst=192.168.1.250:1234}'

*plex/web returns "this channel currently unavailable"* *android app returns "there was a problem accessing or playing the media"*

Figured editing my previous post again would make it tiring to read, but here it is...i have dvd streaming to remote clients, at least on the windows machine...

I used this plugin, changed the prefs from localhost to 192.168.x.x (whatever the network IP is for the lunux box running pms) and ran the following on the linux box running the dvd.

I’m having some issues with getting this plug-in to work…


I can see the channel in my PMS, but every time I attempt to ‘Play VLC Stream’ I get a ‘This Channel is Currently Unavailable’. I’ve tried using both a StreamTorrent stream, and also a re-stream through VLC player that look like this:


127.0.0.1:15900/7.asf (Stream torrent)

127.0.0.1:8902/tv.asf ( VLC player; I’ve tried changing this encoding to a TS stream, as well)


I’ve confirmed that both work outside of PSM.


To account for the additional address after the port, I added an ‘extension’ field in the json Preference file and accounted for it in the Main Method (tried without this parameter by excluding it in the VLC stream, without success, too):

{

“id”: “vlc_ext”,

“label”: “Extension”,

“type”: “text”,

“default”: “”,

},

When checking the log files, I notice this:


2013-12-01 15:18:53,158 (2f2c) : INFO (core:598) - Started plug-in

2013-12-01 15:18:53,158 (2f2c) : DEBUG (socketinterface:144) - Starting socket server

2013-12-01 15:18:53,184 (2f2c) : DEBUG (runtime:1107) - Created a thread named ‘start’

2013-12-01 15:18:53,184 (2f2c) : INFO (socketinterface:168) - Socket server started on port 49873

2013-12-01 15:18:53,186 (2f2c) : INFO (pipeinterface:25) - Entering run loop

2013-12-01 15:18:53,186 (2f2c) : DEBUG (runtime:717) - Handling request GET /:/prefixes

2013-12-01 15:18:53,187 (2f2c) : DEBUG (runtime:814) - Found route matching /:/prefixes

2013-12-01 15:18:53,190 (2f2c) : DEBUG (runtime:914) - Response: [200] MediaContainer, 685 bytes

2013-12-01 15:19:24,759 (29ac) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.plugins.vlc/prefs

2013-12-01 15:19:24,773 (29ac) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.plugins.vlc/prefs

2013-12-01 15:19:24,779 (29ac) : DEBUG (runtime:914) - Response: [200] MediaContainer, 478 bytes

2013-12-01 15:20:10,137 (2b50) : DEBUG (runtime:717) - Handling request GET /video/vlc

2013-12-01 15:20:10,138 (2b50) : DEBUG (runtime:814) - Found route matching /video/vlc

2013-12-01 15:20:10,138 (2b50) : DEBUG (base:123) - Checking if com.plexapp.plugins.vlc is broken

2013-12-01 15:20:10,140 (2b50) : DEBUG (networking:172) - Requesting ‘http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMjMKY29tLnBsZXhhcHAucGx1Z2lucy52bGNzMTAKaWRlbnRpZmllcnIwCg__

2013-12-01 15:20:10,167 (2b50) : WARNING (objectkit:199) - Media part has no streams - attempting to synthesize
2013-12-01 15:20:10,167 (2b50) : DEBUG (services:602) - No service found for URL ‘http://127.0.0.1:15900/7.asf

2013-12-01 15:20:10,168 (2b50) : DEBUG (services:617) - No matching services found for ‘http://127.0.0.1:15900/7.asf


2013-12-01 15:20:10,168 (2b50) : DEBUG (services:41) - Loading service code for Fallback (URLServiceRecord)

2013-12-01 15:20:10,305 (2b50) : DEBUG (runtime:914) - Response: [200] MediaContainer, 1149 bytes

2013-12-01 15:20:11,242 (2e3c) : DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.plugins.vlc/prefs

2013-12-01 15:20:11,243 (2e3c) : DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.plugins.vlc/prefs

2013-12-01 15:20:11,246 (2e3c) : DEBUG (runtime:914) - Response: [200] MediaContainer, 478 bytes


It cant ever seem to find a service for the URL I’m providing it. Any ideas what the issue is here?



EDIT:


Noticed that it was trying to find a service (and couldnt) because we set URL in the VideoClipObject. We should instead set the key and rating_key title. Still havent resolved the issue, but am receiving, “Error loading player: No playable sources found” now when playing the stream, instead of ‘This Channel is Currently Unavailable’.


Edit 2:


Got it working with HLS. The encoding is being done via vlc (h.264 + mp3, ts container). Plex/Web was the culprit. Still can’t stream from it, but it works with Skifta and the android client.

So my init py looks so:

def Start():
	ObjectContainer.no_cache = True

####################################################################################################
@handler(“/video/dvdplayer”, “DVDPlayer”)
def MainMenu():
oc = ObjectContainer(title1=“VLC Player”)

mo = MediaObject(parts=[PartObject(key=HTTPLiveStreamURL("http://192.168.1.109:8080/test.asf"))])

vco = VideoClipObject(title="Play", url='http://192.168.1.109:8080/test.asf')
vco.add(mo)
oc.add(vco)

return oc

####################################################################################################

I tried streaming from vlc and tested that I can play that stream with other vlc app. But my LG tv refuses to play that stream. "Cannot play media"

Logs from plugin:

<...>

013-12-14 13:51:27,313 (1ab8) :  DEBUG (base:123) - Checking if com.plexapp.plugins.vlc is broken
2013-12-14 13:51:27,325 (1ab8) :  WARNING (objectkit:199) - Media part has no streams - attempting to synthesize
2013-12-14 13:51:27,326 (1ab8) :  DEBUG (services:602) - No service found for URL 'http://192.168.1.109:8080/test.asf'
2013-12-14 13:51:27,326 (1ab8) :  DEBUG (services:617) - No matching services found for 'http://192.168.1.109:8080/test.asf'
2013-12-14 13:51:27,328 (1ab8) :  DEBUG (services:41) - Loading service code for Fallback (URLServiceRecord)
2013-12-14 13:51:27,453 (1ab8) :  DEBUG (runtime:914) - Response: [200] MediaContainer, 923 bytes

Do you have a service in place for this?

When you create vco, your VideoClipObject, you're providing it with a url. If you provide this object with a URL it attempts to find an associated service to handle it (creating metadata and such). As you can see in your logs, it cant find a matching service, and attempts to load the Fallback service which is of little use to you. Instead you should create your vco object with a 'key', and a 'rating_key' object, like this:

url_vlc = "http://192.168.1.109:8080/test.asf"

@route(’/video/vlc/stream’)
def CreateVideoClipObject(title, include_container=False):
items = []

items.append(
	MediaObject(
		parts = [PartObject(key=HTTPLiveStreamURL(url_vlc))],
		container = Container.MP4,
		audio_codec = AudioCodec.AAC,
		video_codec = VideoCodec.H264,
		audio_channels = 2,
		optimized_for_streaming = True
		)
	)

items.reverse()

videoclip_obj = VideoClipObject(
	key = Callback(CreateVideoClipObject, title=title, include_container=True),
	rating_key = url_vlc,
	title = title,
	items = items
)

if include_container:
	return ObjectContainer(objects=[videoclip_obj])
else:
	return videoclip_obj

Also note, the Media Object that you provide to the clip should be a list (even if there's a single entry).

So I modified it so:

####################################################################################################
@handler("/video/vlc", "vlcPlayer")
def MainMenu():
 
oc = ObjectContainer(title1="VLC Player")
 
mo = MediaObject(parts=[PartObject(key=HTTPLiveStreamURL(url_vlc))])
 
#vco = VideoClipObject(title="Play", url=url_vlc)
vco = CreateVideoClipObject(title="Play", include_container=False)
#vco.add(mo)
oc.add(vco)
 
return oc

####################################################################################################

And added your suggested method. but now it loads forever

That MediaObject in your MainMenu(), is it doing anything? If you create the media object in 'CreateVideoClipObject', you shouldnt need it in your Main..

Also, what client are you testing on? Plex/Web doesnt support the majority of these hacks, for example.

Try testing a different container. For example, if I want to stream from StreamTorrent, I first transcode and stream through VLC; taking the Streamtorrent stream @ '127.0.0.1:xxxx/7.asf', and transcoding it into H.264/MP3 with a ts container at 127.0.0.1:xxxx/tv.ts

What're the logs showing? Does your router mess with anything on port 8080?

The combination of an .asf stream and HTTPLiveStreamURL is almost certainly wrong. HTTPLiveStreamURL is meant for streams in Apple's HTTP Live Stream format (usually works with an .m3u8 playlist and lots of small .ts fragments). The values used for the container, audio and video codec are also not very common for .asf as far as I know.

Advanced System Format (ASF) is Windows proprietary, so you usually see WMV and WMA as the given codecs. The ASF spec doesnt give a hard limit on what codecs are, and are not, supported however:

“Windows Media Codecs” means all versions of the audio, video, and data compression/decompression algorithms (“codecs”) that have a ASF Codec Description that begins with “Windows Media” or “Microsoft”. Windows Media Codecs includes, but is not limited to, the “Windows Media Audio” codecs, “Windows Media Video” codecs, and “Microsoft MPEG-4” codec.

Tried this and the plugin doesn’t show up

Does this still work? I’m not even sure I’m doing this correctly. I’ve got the channel installed, but I’m not sure what to do now lol.

Considering this thread is from 2013, I highly doubt any code referenced here still works.

I would love to get this working and I cannot find any other threads regarding this topic. I can get my VLC streams to play in VLC locally and remotely, but I cannot get Plex to play the stream. I tried modifying init.py manually and using the channel that yakumo created but no luck.

This is my log when trying to connect to the stream “http://192.168.0.21:8080” It is not the same machine.
Oct 01, 2017 20:39:33.524 [0x80c27b000] DEBUG - Request: [192.168.0.135:51034 (Subnet)] GET /system/services/url/lookup?url=http%3A%2F%2F192.168.0.21%3A8080&checkFiles=1&asyncCheckFiles=0 (9 live) TLS GZIP Signed-in Token (travishauch) Oct 01, 2017 20:39:33.524 [0x80c27b000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/services/url/lookup?url=http%3A%2F%2F192.168.0.21%3A8080&checkFiles=1&asyncCheckFiles=0 Oct 01, 2017 20:39:33.524 [0x80c27b000] DEBUG - HTTP requesting GET http://127.0.0.1:26110/system/services/url/lookup?url=http%3A%2F%2F192.168.0.21%3A8080&checkFiles=1&asyncCheckFiles=0 Oct 01, 2017 20:39:33.733 [0x80c27b000] DEBUG - HTTP 404 response from GET http://127.0.0.1:26110/system/services/url/lookup?url=http%3A%2F%2F192.168.0.21%3A8080&checkFiles=1&asyncCheckFiles=0 Oct 01, 2017 20:39:33.734 [0x80c27b000] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content. Oct 01, 2017 20:39:33.735 [0x80a4edc00] DEBUG - Completed: [192.168.0.135:51034] 404 GET /system/services/url/lookup?url=http%3A%2F%2F192.168.0.21%3A8080&checkFiles=1&asyncCheckFiles=0 (9 live) TLS GZIP 210ms 363 bytes (pipelined: 4)

What I’m noticing are 404 errors like there’s nothing there. What should an HTTP response be from an HTTP stream?

If anyone is still using this, I would love to hear feedback.
Thank you!

Hello,
Within my local LAN, I have VLC on a WinXP HTPC generating a live audio mp3 stream (http) from the sound card’s line-in. I would like to know if there is a bundle/plugin for PMS that can create a channel that can stream this out via dlna to my multi-room wi-fi audio renderers?

If only SWYH (Stream What You Hear) were supported on WinXP, I wouldn’t need to do this, but I’m stuck due to other legacy software/driver upgrade constraints.

Thanks!!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.