ValdikSS/aceproxy

Implement HLS

potyt opened this issue · 13 comments

Any idea if it is possible to get this on a Roku or through Plex (ideally without transcoding for the Roku)?

Cheers

Yes, I suppose. Plex supports playlists.

Just looking into all this for the first time... Does ace proxy ultimately produce those m3u8 playlists, what seems to be called HLS (Http Live Streaming)?

If so, it must be possible to knock up a Roku channel itself for this I'd think...

No, AceProxy outputs usual HTTP streams, not HLS.

I tried yesterday to play aceproxy mp4 streams on Plex, no luck so far. Both using ".strm" files and https://github.com/Cigaras/IPTV.bundle

Is anything changed since May?

The Roku can stream only HLS, which means it's not straightforward, I finally gave up and got a Chromecast which can stream MKV. But they both support only H264, so MPEG2 streams need to be transcoded.

I see. HLS support is possible with VLC but is not currently planned.
I'll think about it.

Yeah, it's not straightforward to do HLS because it serves an M3U8 file which is just a list of chunks. The Roku periodically requests this file to get an updated list. To add support for it you would need to keep track of which chunk was last requested and/or when the playlist was last requested; otherwise you won't know when to stop playing. I don't think it's worth the effort personally.

I think it is easier to forward video stream to RTMP server capable of generating HLS

Aceproxy can't forward video streams to RTMP servers as far as I understand. It really shouldn't be that hard to implement HLS given that aceproxy already relies on VLC. See my any_to_m3u8 script which does the same but with FFMPEG: https://github.com/elwebmaster/any_to_m3u8 . I know it can be done with VLC also, but I don't know the correct syntax.

Yeah, that's exactly what I mean. Is it possible to stream from aceproxy to ffmpeg? FFMpeg can output the stream to RTMP server which will serve it in the way it likes.

What I see in code, is that video stream is being forwarded through telnet client to vlc. Can't see a reason for not making it a http stream

I am not familiar with aceproxy's code, but VLC and FFMPEG have very similar features. It should be possible to make VLC write out HLS chunks instead of mp4. Otherwise you can just use my script on top of aceproxy, this will have the same result but will involve both VLC & FFMPEG (which I think is unnecessary).

Hello,


    # transcodecmd['100k'] = 'ffmpeg -i - -c:a copy -b 100k -f mpegts -'
    # transcodecmd['mp2'] = 'ffmpeg -i - -c:a mp2 -c:v mpeg2video -f mpegts -qscale:v 2 -'.split()
    # transcodecmd['mkv'] = 'ffmpeg -i - -c:a copy -c:v copy -f matroska -'.split()
    # transcodecmd['default'] = 'ffmpeg -i - -c:a copy -c:v copy -f mpegts -'.split()
    # ----------------------------------------------------
    # Transcoding configuration for HLS
    # ----------------------------------------------------
    # If you use acestream engine ver >= 3.1.5 and vlcuse=True
    # proxy automaticaly switch to HLS (HTTP Live Streaming) instead of HTTP Progressive Download
    # You can use this settings for audio transcoding. This option applies only for Live-stream

What is the hls url I can get ? Like this one:
http://178.62.18.13:8000/pid/8933c0e34bbe9448da63a806b3098d19ee909b8d/stream.mp4

AndreyPavlenko@06f4a00