How to embed local videos?
-
February 10, 2023 at 12:13 pm #9311[anonymous]
I couldn’t find an obvious way neither this information in the user docs.
Via the video embed button only URLs and embed codes are supported.February 26, 2023 at 11:43 am #9421[anonymous]Hi,
Please just use video tag: https://www.w3schools.com/tags/tag_video.asp
February 27, 2023 at 3:25 pm #9429[anonymous]Thank you very much!
July 19, 2023 at 2:38 pm #10323[anonymous]Please put this topic on the roadmap. It would be really handy to be able to embed a video locally including a preview image….
Because we want to create a privacy friendly website without cookies. Embedding the videos via YouTube is therefore also out of the question.
Thanks a lot!
July 20, 2023 at 1:49 pm #10327[anonymous][anonymous] wrote:Because we want to create a privacy friendly website without cookies. Embedding the videos via YouTube is therefore also out of the question.
There are many other options besides YouTube. Uploading a video to your server seems like a bandwith nightmare, and you would have to find a way to serve different quality versions and file types of that same video (depending on the type of video). You’ll also have to implement a media player library if you don’t want to use the default browser player.
I would recommend looking into:
- Peertube: self-hosted open-source YouTube alternative. There are many instances out there that you can join to upload videos.
- Cloud Storage CDNs like Cloudinary and Backblaze, which have generous free tiers.
July 20, 2023 at 2:31 pm #10331[anonymous]That’s just too much overhead and never practical for small websites. (and without technical knowledge)
I have in my case now only one 17MB video with 480p. This is quite enough and I do not need more quality. I have included it via html video tag. People without technical understanding will have problems. Ideally Publii would include a popup for this similar to the images:
– Preview image
– 480p file
– 720p file
– 1080p file
– 2k file
– 4k file
– Checkboxes for e.g. autoplay
– Size or responsivePublii can then generate the source code as required.
July 20, 2023 at 4:02 pm #10333[anonymous][anonymous] wrote:I have in my case now only one 17MB video with 480p. This is quite enough and I do not need more quality. I have included it via html video tag. People without technical understanding will have problems. Ideally Publii would include a popup for this similar to the images:
People without technical understanding should stick to uploading to Peertube, YouTube, Vimeo, Wistia, or any other video host that has embedding options. If you don’t know how HTML tags work or how to transcode video to multiple file types and sizes, you probably shouldn’t be hosting videos locally on your server.
Publii could certainly reconfigure the “Insert media” option to include more video parameters to make it easier for those who know what they’re doing, but local video hosting is typically discouraged (for good reason): https://wp101.com/10-reasons-why-you-should-never-host-your-own-videos/
Uploading to a video host and copy-pasting embed info is a lot easier and faster to do than manually converting your video to various formats, implementing your own video player library, etc.
July 20, 2023 at 4:14 pm #10334[anonymous]I’m sorry, but that’s very arrogant. Especially Publii is a great software for people with less technical understanding. These people should be given good tools without editing the html source code.
Publii does a good job here too. Support for locally uploaded videos would be great.
July 20, 2023 at 4:35 pm #10335[anonymous]Video is not the same as photo. Creating websites is no easy feat, and encouraging people with little understanding of video files and video hosting to host videos locally (especially long and large videos) is harmful. There’s risk of driving up bandwidth usage, slowing down page load, and it makes it incredibly easy for anyone to download their video file. This is an added burden and cost for people who lack technical understanding.
Again: It’s a lot harder to properly host video locally than it is to upload to a dedicated video host and embed. I say this as someone who edits videos professionally and has implemeted custom video players on my sites. It’s not as simple as adding more parameters to the insert media window.
Publii is a great tool for people of different skill levels, but things need to be implemented responsibly. Encouraging people with limited understanding of video to host locally is irresponsible and sets them up for frustration.
July 20, 2023 at 7:35 pm #10336[anonymous]But these are points that are easy to solve. e.g. info texts / warnings, file size query…
There are not only long videos, but frequently also short ones. For example, a screencast of a function of an app that is shown in 10 seconds. Or simply content that you don’t want to upload to an external platform like YouTube.
Other content management systems also support videos. It’s not like the internet is going down because of this. π
July 20, 2023 at 7:37 pm #10337[anonymous]Even here in the forum you can embed videos directly πΒ πΒ πΒ πΒ πΒ πΒ π
—-
Correction: Download Link only. But upload/size remains the same.July 20, 2023 at 8:42 pm #10341[anonymous][anonymous] wrote:Other content management systems also support videos. Itβs not like the internet is going down because of this. π
Look deeper into how cloud-based CMSs and website builders implement video. Inspect the code of their pages. Many of them upload the video to a separate content storage or video host, regardless of length. Many have media player libraries already running. Some will use the Vimeo API to display video as though it were uploaded locally. Most will take care of transcoding, processing, optimizing, and serving the correct file formats for you based on connection speed, browser, etc. Just because you don’t see that behind the scenes process doesn’t mean it’s not happening.
Publii doesn’t do that for you, and it can’t be compared to cloud-based CMSs which take care of hosting for you. I don’t think the average non-techie has time to manually do all these processes themselves. An info text/warning isn’t going to implement and maintain a JavaScript video player library for you or encode the videos to the necessary formats.
I think we all agree that the video insertion options could be improved to facilitate video tag generation. That said, arguing that “people without technical understanding” won’t run into more problems trying to locally host videos correctly is naive and misleading. There’s a reason why the majority of dev forums, articles, resources, tutorials from experts advise against locally-hosted videos.
[anonymous] wrote:Even here in the forum you can embed videos directly π π π π π π π β- Correction: Download Link only. But upload/size remains the same.
A link to download file =/= a streaming video.
Anyway, there isn’t much more to say on the topic that I haven’t already stated. I encourage anyone wishing to display videos on their Publii site to:
- thoroughly research how to work with video online (bitrates, file formats, browser compatibility, optimization, encoding, media player libraries, etc.),
- optimize their media using Handbrake,
- upload longer videos to the streaming host of their choice to avoid headaches (Wistia, Peertube, YouTube, Vimeo… there are sooo many to choose from: privacy-friendly options, free options, APIs capabilities, advanced analytics, ad capabilities, etc.). Most will provide embed code which can easily be pasted in the media insert window of the WYSIWYG Tiny Editor,
- videos can also be uploaded to media storage services that provide CDNs and optimization, such as Cloudinary.
I’m happy to assist or guide anyone looking for video advice on this forum.
July 20, 2023 at 9:45 pm #10343[anonymous]I have now looked once again in Publii. Via the video icon you can already embed a local video. You only have to enter the path to the video manually (and load it in the right place first).
So it is really only missing an upload field / icon (as it is already available for the thumbnail). π
Otherwise, yes, I agree with you. But as I said, there are also good reasons (for very short/small videos) to embed directly.
July 25, 2023 at 5:08 am #10374[anonymous]More discussion on video and self-hosting, for anyone interested:
“The HTML <video> element needs to go back on the drawing board”: https://www.ctrl.blog/entry/html-responsive-video.html
Hacker News discussion thread: https://news.ycombinator.com/item?id=29024868