Hello... from my Sat-Receiver (Dreambox with Enigma2) i want to download or stream a MEPG Video....
I already parse the Movie-List from the box:
B4X:
http://192.168.178.22:8001/file?file=/media/hdd/movie/20170101 0427 - tagesschau24 HD - made in Südwest.ts?bitrate=500000?width=854?height=480?aspectratio=2?interlaced=0
Now i have to download the file.... but how do i store (or stream if possible) the file???
I try with:
B4X:
.....
Case "Movie_JOB"
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "video.mpeg", True)
File.Copy2(Web_Job.GetInputStream, out)
out.Close
End Select
On the phone, i only get a little File....with "Http.... 400 Bad Request".....
HttpUtils2 downloads the data exactly as it is received from the server. Maybe your server rejects it because there is no user agent header (which you can add).
You need an different video-player (than the standard VideoView) which can stream and decode correctly mpeg-ts streams (standard format used by Enigma boxes). Try one of the following video-players: Vitamio5, vlcb4a or ffmpeg_b4a (all available here on the forum).
If you have an Enigma-box with built in transcoding (such as Vu+), then you can use the standard VideoView player.