ValdikSS / aceproxy

Ace Stream HTTP Proxy. ABANDONED! NO SUPPORT WHATSOEVER!
MIT License
196 stars 115 forks source link

Provide VLC streaming #25

Closed dvv closed 9 years ago

dvv commented 9 years ago

Hi!

I want to realise a TV from aceproxy at some 'tv' host, an android player and a monitor. I do not like how existing android apps handle playlists, plus I want this setup to be headless and to control it by simply wgetting an URL like http://tv:8000/pid/CID/stream.mp4.

Right now aceproxy internally makes VLC to broadcast to http://tv:8081/CID and proxies this stream to http://tv:8000/pid/CID/stream.mp4.

I wonder if aceproxy could provide an option to not append CID to VLC braodcast destination, so that it would be simply fixed http://tv:8081?

Changes are required then to VLC control: https://github.com/ValdikSS/aceproxy/blob/master/vlcclient/vlcmessages.py#L15 https://github.com/ValdikSS/aceproxy/blob/master/acehttp.py#L344

And proxy at https://github.com/ValdikSS/aceproxy/blob/master/acehttp.py#L377 then renders redundant as it degenerates into simple blocking call until wgetter exits.

Such setup would allow for easier control over headless TV.

Does the idea understandable and/or welcome?

TIA, --Vladimir

ValdikSS commented 9 years ago

I'm not sure If I understood you correctly.

I wonder if aceproxy could provide an option to not append CID to VLC braodcast destination, so that it would be simply fixed http://tv:8081?

It would be not possible to stream multiple streams with VLC then.

dvv commented 9 years ago

I see...

Well, imagine a remote monitor w/o any control to switch its source. It's just hardcoded to display a stream from some fixed URL at TV host running aceproxy. To switch the displayed data, the source of the stream coming from TV host must be changed. Just as in normal TV sets I believe -- there's no "playlists" there -- you act on its LC filter and thus select the channel (displayed data).

Then what about streaming to http://tv:8081/tv1 in reaction on http://tv:8000/pid/CID/tv1 etc.? As a workaround, I could use some nginx to do URL magic, but it would result in proxying twice...

I believe I'd better go on and propose a patch but I don't know what to replace https://github.com/ValdikSS/aceproxy/blob/master/acehttp.py#L377 with (just something blocking needed until the http client exits)?

ValdikSS commented 9 years ago

I still don't understand why do you need this. Can't you just use CID (pid) link then?

Quarx2k commented 9 years ago

I think he means that PID/CID can change sometimes and he need static link without pid/cid... But not sure :p

On Sat, Jan 3, 2015, 00:25 ValdikSS notifications@github.com wrote:

I still don't understand why do you need this. Can't you just use CID (pid) link then?

— Reply to this email directly or view it on GitHub https://github.com/ValdikSS/aceproxy/issues/25#issuecomment-68548982.

dvv commented 9 years ago

Well. I have a headless thingy X which I can just hardcode to play from, say, http://foo:8081/bar. Then I have an aceproxy host Y which waits for requests which are not constant (they have pids there). Evidently, X can't make such elaborate requests. The point is to operate on Y from another host Z which requests from Y particular pid, but so that Y streamed to the same http://foo:8081/bar (which X expects forever). That way I could operate implicitly via Z the picture that headless X displays.

Pity, I already see that it can't be done -- when aceproxy is requested a pid, it firstly creates a new stream and only then closes current stream. So it will be the clash if the names of that streams coincides.

So let the issue be just closed. Thanks

ValdikSS commented 9 years ago

You can easily write a plugin which will redirect your thingy X with HTTP Location header to needed pid or torrent or magnet or whatever.