Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local video #344

Closed
mxardre opened this issue Nov 2, 2015 · 16 comments
Closed

local video #344

mxardre opened this issue Nov 2, 2015 · 16 comments

Comments

@mxardre
Copy link

mxardre commented Nov 2, 2015

Hi, and thank you for this cool tool.

I'm struggling with videos.
How can I upload my local video in a presentation?
I'm running on a local build strut.

All the best

@refi64
Copy link

refi64 commented Nov 2, 2015

You could always upload it to YouTube but make it unlisted.

@mxardre
Copy link
Author

mxardre commented Nov 2, 2015

Thank you for your answer.
In this case it is scientific datas that I want to keep control on. So I don't want to download it on a server.

For now I found a way by saving the html from strut and adding embed video in the code.
But it may have a better way to do it?

All the best

@refi64
Copy link

refi64 commented Nov 2, 2015

@mxardre Well, I think you could open up the Markdown editor and put the embed video there.

@mxardre
Copy link
Author

mxardre commented Nov 2, 2015

I tried this in the markdown but nothing showed up :

@refi64
Copy link

refi64 commented Nov 2, 2015

@mxardre What if you save it and open the resulting HTML?

@mwcz
Copy link
Contributor

mwcz commented Nov 2, 2015

Is absolutePathOfTheVideo a file:// URL perhaps? Or a filesystem path like /home/user/etc?

@mxardre
Copy link
Author

mxardre commented Nov 2, 2015

both of them does not work actually.

@mwcz
Copy link
Contributor

mwcz commented Nov 2, 2015

That's why I asked, I wouldn't expect either of those to work. Webpages (Strut, for example) aren't allowed to load files from your local disk for security reasons. What you've got should work just fine if you put the video on a webserver (a local one is fine) and include it with an http URL.

One very (very) quick way to do that would be to use Python's built-in webserver:

cd dir_containing_image_file
python -m SimpleHTTPServer

Then set the embed's src to http://localhost:8000/video_filename.avi. That should work!

Keep in mind this will only work locally. If you share your strut presentation with anyone, the video won't work for them.

@mwcz
Copy link
Contributor

mwcz commented Nov 2, 2015

Oh, and since you have Strut running locally, it's possible that you can just copy the video file into the same directory as Strut and reference it under the same domain. I don't remember the specifics of Strut's local development environment though.

@mxardre
Copy link
Author

mxardre commented Nov 2, 2015

Thank you very much for your help.
So I built the server with python in the folder. When I upload the video in strut, it displays
No video with the format or the MIME type has been generated.
And the server crash : "Exception happened during processing of request from ('127.0.0.1', 55297)"

@mwcz
Copy link
Contributor

mwcz commented Nov 2, 2015

Hmm... I have no idea why the server crashed. You could always try a different local webserver. I've had good luck with the http-server package in npm. But perhaps more importantly, I noticed that in my version of strut, when I click Video, it says "Supports webm & YouTube." You may be out of luck with an avi. :(

@mwcz
Copy link
Contributor

mwcz commented Nov 2, 2015

Doh, my mistake, you're using <embed>, not the Video feature. Sorry about that. Sounds like Python's SimpleHTTPServer failed you. Try it a few more times in case it was a fleeting issue, and if it still doesn't work, another webserver probably will.

@mxardre
Copy link
Author

mxardre commented Nov 2, 2015

thank you very much.
i'm going to check out that and tell you

@mxardre
Copy link
Author

mxardre commented Nov 3, 2015

Ok, finally I just save the html file and edit it.
I did not manage to create local server.
To my opinion this is a big issue for strut.

Thank you all for your help

@mwcz
Copy link
Contributor

mwcz commented Nov 3, 2015

I don't think it's a big issue. No web-based presentation framework will be able to load arbitrary files from your hard drive, as that would be unconscionably insecure. If you want a video or any type of file to be available on the web, a web server is necessary.

One possible solution is to embed the video in your presentation, using a Data URI. As a warning, the base64 string generated will be HUGE, possibly larger than your clipboard allows. But if you want to try that, here goes:

  1. go to drop64.com
  2. drag and drop your video file into the black box
  3. wait as the base64 string is generated (it could take a while if your video file is large)
  4. copy and paste the base64 string into the src attribute of your embed element, ie src="data:video/avi;base64,..."

In all likelihood, your video will generate a string so big that this isn't going to work. I only mention it because I've used the same process for embedding other, smaller filetypes into strut presentations.

@mxardre
Copy link
Author

mxardre commented Nov 3, 2015

So I'm not using strut for the rigth purpose...
I was looking for something flexible to replace impress from ooo.

Many thanks anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants