Hey Sup Forums

Hey Sup Forums.
I made a website showing all contents of a 2TB hdd connected to a Raspberry Pi so I can watch my moves from anywhere using the html5 media player. Only problem is that this player only supports the formats webm, mp4 and ogg. I thought about converting all my media to one of the three but that seems tedious. Does Sup Forums have any better ideas?

Other urls found in this thread:

instantshift.com/2010/05/14/21-free-video-players-for-your-website-and-blogs/
pimylifeup.com/raspberry-pi-plex-server/
support.plex.tv/hc/en-us/articles/203824396-What-media-formats-are-supported-
twitter.com/NSFWRedditGif

Get a player with more codecs?

But it's literally changing the filename. If you have a lot of movies, (enough to fill up that drive) then that would be tedious, but if you have a few, then it's just a matter of not being lazy.

That was an alternative I thought of but it involved installing some additional player to whatever browser I was using. And on a phone this might be hard or impossible.

Are you suggesting that if I have a file called "dumbass.avi" I could simply change the name of that file to "dumbass.mp4" and everything would work just fine? And yes the hdd is nearly full.

Put a vlc stream link and use vlc.

nah man just dowload the src and and add it to your site. Found these quickly looking. Idk why it being on a phone is different unless its a mobile app?
instantshift.com/2010/05/14/21-free-video-players-for-your-website-and-blogs/

Holy shit are you retarded. That doesnt change what format its actually encoded in.

Not a bad idea at all but I was looking to play the videos using only the browser removing the necessity to download anything in order to view the media on there.

Use Plex.

what browser?

Would it be the raspberry playing the video or the browser of the client if I used one of these? The processing power of the raspberry is not much to brag about so making it decode the video instead of the client is I'll advised.

And thank you for this suggestion I will look into it.

i bet your "website" is just nginx with autoindex

The browser does yet not matter as long as it has HTML5

Then you would have to install Plex on whatever hardwear you wanted to stream to. The point is that I dont what to have to install anything in order to stream to a device. And the thing that most devices already have are browsers.

Close, some php code for sorting the movies and some CSS to amke it look decent. I have later planned to use some API of a movie database to fetch images from each movie and get some description on there as well.

i havent looked into it but pi's are pretty powerful (as far as mini pc's go) they should be able to decode you vids, especially if your the only user.

Yeah I regularly use it to play videos on the TV but I might not be the only user since I have siblings and friends who use it. I am thinking about getting a real server instead at some point since my Raspberry is doing more and more stuff such as hosting a Tor node, running transmission daemon, a website and so on.

if no then use client side storage and store the src for a compatible web player client side. This might require you to change your site to a web app thou.

I just downloaded flowplayer and it seems to work on my laptop at least. Just so that I understand what you mean, I could make my webpage upload the fowplayer files to the clients say %temp% folder and have them run the video that way?

Also what is the difference between a webpage and a "web app".

I asked on the flowplayer forum and it seems like the decoding is done on the client side. Thank you for the help!

you should make it so it turns them into one of those formats when you copy it onto the drive. either that or install a better media player on it.

Isn't the problem with html5.

Well yeah that HTML5 only supports those 3 formats is essentialy the problem.

I mount the share on my RPi via sshfs.

I think he meant basically the difference between a static web page (where the server just responds to simple requests) and a web app or dynamic site, where the server actually performs an action, in this case transcoding video.

I would guess that flowplayer probably does the encoding on the server side, since it looks like they're using normal html5 video tags.

>make my webpage upload the fowplayer files to the clients say %temp% folder

Not sure what you meant by this, but it sounds like flowplayer has some stuff that stays serverside and then it has javascript that is served to the client. I don't think you have to use the javascript; it's optional.

Post the link here so we can watch them too ;-;

Ok, so some page being a web app simply means it probably has at least one javascript running.

What I meant by uploading the flowplayer files to the client means that I might then be able to make the client use those files to play what I stream instead of having it run on my server. I am under the impression that web pages store temporary data that is needed in the %temp% folder, I hav found thumbnails from webpages I have been on in there so I thought it was a suitable place to put the player as well.

Also in one of my earlier posts I wrote that I had asked on the fowplayer forum and they said that everything would run on the client side.

Haha, sorry but I don't think I can do that for several reasons, you might be a cop and me sharing movies over the internet wouldn't exactly be legal. It isn't recommended to post your IP and password to your Raspberry online (I have authentication requirements on the webpage). If I posted it here it would probably start to lag since so many would try to watch at the same time and with 10MB/second I can only upload to maybe 5 people at the same time at a decent quality. I thought about making a script that changes the password to the page every 10 minutes so that I could hand out one password letting one person watch a movie and then the password wouldnt work anymore. Of course as long as he has the has the cookie he can watch any number of movies so I would have to make an expiration date on the cookie, maybe 3 hours. I have not gotten that far yet though.

What I meant by web app was that something was running on the server, but yeah, I suppose a web page running javascript would also be a web app.

Anyway, I looked into it and it looks like Flowplayer actually uses Flash to decode video. By default the server will download the flash video player onto your computer before it gets streamed from the server. It will get cached somewhere, probably in the %temp% directory like you said, but basically that happens automatically. And that means you won't have to download it every time, although that probably doesn't matter since you're already downloading a lot of data for the video.

One concern is that I'm not sure how much compatibility Flash is going to have with different video files. Also, I'm not sure how much compatibility Flash itself has these days. iOS doesn't support it (although Flowplayer seems to have support for some filetypes on there) and not all browsers on Android support it.


I know you were against using a separate video player program/app, but it might be the best option. Most modern video players, such as VLC, can play video streams just fine, and support many file types. And at least on Android, clicking a link to a video file in the browser allows you to choose what app to play it in, so it transitions very easily from web to player. (pic related) VLC is on iOS as well, and I think it's relatively straightforward to play a video stream in there as well.

I understand your desire to rely on using just the browser, and not to have to download anything, but VLC is going to be a smaller download than the video itself.

It's your call, but overall, I think something like VLC is going to have more filetype compatibility and more device compatibility than Flash/Flowplayer.

I have to agree with you now, although Flowplayer was very easy to use it would only enable me to also play ".flv" and ".f4v" files and with the vast spread of formats amongst my movies its hardly enough. VLC really seem to be my best option. I am gonna look through what video formats the embedded players can play but unless I find one that can play most of them I will probably end up using VLC. Thank you for your input on this.

You can go to the plex website and launch a player from a browser

How would it work in practise? Would I just download plex for my raspberry and then be able to view all my media from a browser assuming I have opened the right port on my router?

If you are accessing your media from outside your local network, your plex server at home streams to a server owned by plex, which then forwards that stream to whatever machine you are using. I did not have to open any ports on my end to get it to work.

>inb4 botnet

Yea, it is kind of botnet, but I am ok with it. The entire connection is encrypted if it makes you feel any better.

I have an extra SD card at hand so I will probably check out RasPlex.

rasplex is for the plex client only. for setting up a plex server, check out this guide

pimylifeup.com/raspberry-pi-plex-server/

FYI, I have a raspi3 and it was fine as a server as long as you didn't have to do any transcoding.

As long as it can stream all the formats its good enough for me, question is if the server Plex would require my raspberry to transcode before streaming or not.

support.plex.tv/hc/en-us/articles/203824396-What-media-formats-are-supported-

So in the end it only supports 2 formats and the rest would have to be transcoded? Or directly streamed but I am not entirely sure what that would implicate but I would probably not be able to just view it in a browser anymore.

transcode means plex will have to convert the encoding whereas direct stream means plex only needs to convert the container. your server hardware will determine how smoothly those processes go

Thought as much, and I doubt the raspberry can handle both transcoding and streaming smoothly at the same time.

Wrong, well sort of.

It only streams to a plex server then the client if it can't connect directly.

If you open your ports then all the plex server does is redirect you to your local plex installation and lets you stream from it directly.

it cannot. If you want to use a raspberry pi for plex then you need to have everything encoded in a supported format so that the raspberry pi doesnt need to transcode anything.

Yeah, so I am back at my original problem that urged me to make this thread. I do have the VLC thing though.

I wonder, would it be possible with hardware decoding? The pi can decode mpeg-2 and vc-1 in hardware (although you need to buy a license to do it), but it depends on how OP's files are encoded. I think he mentioned avi, which I think often uses mpeg-2 codecs, so it might be useful in that case. But would hardware decoding make enough of a difference to matter?

you need hardware acceleration to play anything on the rpi

I don't think decoding on the rpi is a viable solution, especially when I want several people to be able to watch at the same time. Some of the formats are: mp4, mkv, avi, m2ts, webm, flv, wmv and mov

My problem isn't playing video on the pi itself, that works just fine.

So I think to play videos in the browser, the only real option is to transcode the videos ahead of time.

Otherwise you'll have to use a separate media player.

Just play the file through VLC or mpv