Open porkcharsui opened 12 years ago
I believe this issue will be best solved cross platform following Apple's concept of HTTP Live Stream or HLS - full spec
The format is essentially a playlist file pointing to MP4 encoded files. VLC can act as the video transcode engine in either a live mode (two files) or a rendered mode which renders every segment of media to files on the disk which requires disk space for each simultaneous player.
Although this is not supported in Android versions less than 3.0 Honeycomb, I recently upgraded my HTC Supersonic to Android 4 so I have renewed interest in trying to solve this issue. A recent forum discussion makes me think the best approach to solving this issue would be software improvments in two areas:
My ideal approach would be a hybrid of live/VOD HLS modes for videos. The main goal from the UI is to start playback quickly and allow seeking quickly inside the video, while I desire my backend engine to be efficent on both CPU and disk by only storing/creating what is actually being watched in the player.
HTTP Web Client --> Supersonic Java (HTTP GET playback-XXX.ts) ----> VLC process control
\----- SERVE VLC file ----> player.ts (masquerading as player01.ts, player02.ts)
To acomplish this I will need to serve player.m3u8
which points to many player.ts
files that are indexed based on their position in the video. On start of playback instead of transcoding and saving every segement at every bit rate to file (HLS VOD mode), I use VLC's live HLS mode to create just one playlist and one video file. Based on the URL requesed my servlet I can detect a position change and thus change the current position of VLC playback.
To handle the different bit rates (and ultimately this issue) I need to first adopt a fixed bit rate approach until I get all the seeking issues worked out with the VLC backend.
Commits on supersonic/vlc
Looks like upstream branch merge will bring in HLS.
GOAL: Handle low network bandwidth situations when streaming bitrate is too high
Allow playback to use an variable bitrate transcoding scheme where current network bandwidth constraints would lower transcode bitrate to prevent skipping in music/video playback. Improve seek functionality in UI and playback on mobile platforms.