|
Post by vovchik on Apr 20, 2018 10:01:26 GMT 1
Dear Rik,
Thanks for the update. I was playing around with the code a bit and discovered that omxplayer can also play network streams. You can place the stream url inside an m3u8 text file in the video directory, and it should play, e.g.:
http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
With kind regards, vovchik
|
|
|
Post by rikky on Apr 20, 2018 19:57:22 GMT 1
|
|
|
Post by vovchik on Apr 20, 2018 20:58:20 GMT 1
Dear Rik, This is an older version (not your latest) that I had modified to play network files using playlist files. Have a look. Maybe there is somthing there you can grab. With kind regards, vovchik
|
|
|
Post by rikky on Apr 21, 2018 23:12:39 GMT 1
In the SUB FILE_DIALOG changed something to : this_movie$ = GRAB$(dialog) this_movie_extension$ = LAST$(this_movie$,1,".") IF REGEX(this_movie_extension$, "pls|mru|m3u8|url") THEN this_movie$ = CHOP$(LOAD$(this_movie$)) ELSE this_movie$ = CHOP$(REPLACE$(this_movie$, "%20", "\\ ")) END IF Now you can play streams, IF the link to your stream is in a file with the extension .m3u8 I do think though, that this is not the proper format for a .m3u8 file, for if I do a wget qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8 Then I get a file sl.m3u8 containing : #EXTM3U #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=688301 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/0640_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=165135 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/0150_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=262346 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/0240_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=481677 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/0440_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1308077 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/1240_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=1927853 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/1840_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=2650941 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/2540_vod.m3u8 #EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=3477293 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/3340_vod.m3u8
And that file doesn't play with the new method, but did play the old way. But, what the heck, we've got a method that works, that's important. And then there are the other formats : pls, mru and url What are they meant for? I've tried a file called try_out.url, containing www.youtube.com/watch?v=FMKwq-mQVgoTo no avail. Rik. Edit : And fixed the bug. Attachments:OMXPLAYER.bac (58.79 KB)
|
|
|
Post by vovchik on Apr 22, 2018 13:37:16 GMT 1
Dear Rick, It does work for streams, which is great. The m3u8 playlist can contain just a single URL - and that plays OK. We have to think of how to get a youtube address to play. Mpv on the PI does play them. Youtube-dl might have to be installed first, and it knows how to disambiguate youtube links. With kind regards, vovchik
|
|
|
Post by rikky on Apr 22, 2018 17:29:48 GMT 1
Well ehm, playing youtube movies directly in omxplayer is too slow, I have already noticed. You can play like omxplayer -blablabla $(youtube_dl -blablabla youtube-link), or something like, if I remember well. some of your streams are also too slow. The Raspi is just too little. Maybe download the movie with one Raspi, and stream it to another. But this is probably even slower. A security camera stream would be quick enough though, I hope, so the stream purpose might come in handy in the future. Downloading the stream or youtube movie would be the preferred way to go. Don't know how to download a stream though. I had already some pre embrional little programs. One is for downloading a youtube movie in MP4, since that is what the omxplayer is sure to eat. Another is for finding youtube links in a web page, for even opening a youtube page, causes the Raspi to slow down, let alone if you open more pages simultaneously. Be warned, they are not yet ready. Use at your own risk. Rik. Attachments:YOUTUBE-DL.bac (2.88 KB)
get_youtube.bac (2.56 KB)
|
|
|
Post by rikky on May 18, 2018 7:20:30 GMT 1
I was waiting for making an update until I made some more serious changes, but somehow I've moved on, and abandoned the OMXPLAYER. However, the last minor changes are a significant improvement. You do not want to lie down on the couch, with some chips and a beer, and somehow mingle your mouse just above the button-bar, just under the OMX screen, click, and the button-bar is gone. So I've decided to upload the last few changes. This time in the original first post, as seems to be the convention on this forum. Rik.
|
|
|
Post by vovchik on May 18, 2018 23:44:18 GMT 1
Dear Rik,
Sstill testing, but the network stuff and mp3 playback are working. Thanks for the update.
With kind regards, vovchik
|
|