Hi all, I take advantage of this post to wish everyone on the forum a happy new year, especially the administrators.
Then I need help to add a webcam to the pwsdashboard whose video is in m3u8, I don’t understand how to edit the webcam_c_block file to add streaming video, I can’t find any line where to add url.
Do we need to create a separate php file or are there other ways to view the video?
I look forward to your kind reply, thank you.
The webcam video stream links are in the attached file.
Hi “jaltman”, thanks for your reply, yes I saw the file you named “webfilm_popup.php” but inside it there is no entry like “$url = $_GET[‘https://xxxxxxx.xxx/ yyyyy/zzzzzz.m3u8’];”
but I only see these two syntaxes:
“$filenameReal = FILE;”
“$download_size = filesize($filenameReal);”
to me it seems that it refers to physical files present in the storage not a url for streaming from the internet or am I wrong…
How do I go about inserting this m3u8 video stream into the php webfilm_popup?
Or do you need to create a special php file or edit the “webfilm_popup” php file to use m3u8 video streaming?
Many thanks in advance for your kind replies.
Regards.
PS: The webcam in question is public, so it’s not managed by me, so I don’t have access to other video sources of different formats or streams or multi-frames format of jpg images.
Hi “jaltman” I modified the file “webfilm_popup.php” I inserted the link of the webcam on line 29 (iframe src=),
then I also modified the file webcam_c_block by removing the # to enable line 8 ($click_large = ‘./_my_settings/webfilm_popup. php’;).
After saving everything, reloading the dashboard,
I click on the webcam block and it gives me the following error: “Script needs to be adapter to your movie first”.
Where am I doing wrong?
I look forward to other suggestions, thanks.
Regards.
PS: in the config screen of the dashboard in devices in the “Your weather-cams” section I selected:
you have webcam you want to show > yes we do
and in the box
Specify the link to your webcam image > I put a link pointing to a static jpg image.
then in the “Tiles” section I selected in the block “position14Choose optional 4-th block or decide later” >>> Webcam: add url of your webcam to webcam_c_block.php
I don’t know if I did it right to set these settings like this, if I set something wrong, correct me, thanks.
I did some other tests I commented line 24 “die ('Script needs to be adapted to your movie first ') ;”,
then I also modified the file ““PWS_blocks.php”” on line 422 or put array ('show ’ => false), while in 423 trarray (‘show’ => true), as I read about doing in another post of the site
and now when I click on the webcam on the dashboard it opens the popup to save the file “XXXXXXX.m3u8” instead of opening video playback window.
Already changed something just to understand why it does not play streaming video.
Maybe because the format is not .mp4 (mpeg type) but an m3u8 (hls type)?
In your first post you included the text file with the links. The first link downloads, not plays. The second link plays. Looking at the source code of the page that plays it has a line to play the file:
Perhaps you need a tag like the playsinline=“” or some of those other tags. I don’t know much about the diffferences between HTML5 and iframe playing the file.
Hi “jaltman” yes the first link is the direct link to the XXX.TS video stream (hls format), while the second is an html5 script that I made using a hls player in java (hls.mini.js) from CDN to test viewing the webcam because via direct link did not work even with vlc or other video programs.
Furthermore, doing some tests, I noticed that through the chrome or firefox browser of the android mobile device the webcam is reproduced correctly, as it should have worked, therefore the php webfilm_popup.php script works in theory (only on mobile devices), it opens the popup with the video screen but does not go into autoplay you have to press the play button in the center of the popup screen. So the problem is with desktop browsers that instead of playing videos make you download the m2u8 file.
Now we need to understand why it behaves this way on different operating systems, perhaps there is something to modify in the php script to make it functional on all devices and browsers or use a different command to call up the video, I don’t know…
Then I also wanted to see animation also in the small prewew box of the dashboard but maybe I think there is a need to have screenshots of the video in multiple jpg images. (I was looking for a php script that allowed me to create jpg snapshot of the video every few seconds using ffmpeg-php)
I keep testing, if you come up with any other solution let me know.
Thanks again for your help.
I look forward to some advice from all users of the forum, thanks.
Regards.
I am afraid you have exceed my knowledge of this programming. I notice on your website that you have 182.9 mm rain for the year but only 10.4 mm for the month.
Yes, I noticed you’re right, but I don’t understand why, but I saw that 182.9mm value is taking it from the Ecowitt site ( Event 0.0 mm, Hourly 0.0 mm, Weekly 9.8 mm, Monthly 10.4 mm, Yearly 182.9 mm).
Must be indicates it as the amount of annual rainfall.
Perhaps the year doesn’t start on 01/01 but when the sending of the station data started… I think, I can’t give other explanations.
Or maybe I should reset the amount of annual rainfall in the Disply HP1000se-pro device and manually set the data for the month ie 10.4mm, what do you say?
We need to check this problem in more detail, I’ll talk about it with wvdkuil.
Thanks again for your interest and your suggestions have been very useful anyway, I look forward to other responses from users with higher level knowledge on managing video streaming on php.
You have to go into the WSVIEW app and manually set it. Put it on your January 1st to-do list to 0 it. You can go in there now and set yearly to the monthly value now. It will change the webpage magically.
Ok, in fact I added that question to you if I have to change the setting manually.
OK then I set the correct data manually.
So this has to be done every year, it doesn’t reset itself, right?
Hi all, in the end I managed to get the popup webcam to work both from a desktop browser and from a mobile browser with two different types of links.
But now I ask if it is possible to display the webcam also in preview in the small box on the dashboard, thanks.
If the dashboard tile doesn’t play video, would it be possible to play a sequence of images created from snapshots of webcam video?
If so, how do I create daily snapshots from webcam video?
Ok thanks WIM, I’ll do some tests and let you know.
I also wanted to ask you if it is possible to retrieve a script that allows me to take snapshots every 30/60 minutes and create a sequence of images of the webcam in question to put in the dashboard preview.
I was legend you have to use ffmpeg to create this but I don’t know how to make script. I can use raspberry to run scripts and sequence images and upload them to server, to use your “imgcurl.php” script.
I had thought something like that:
but it should be revised to create jpg images and in sequence every XX minutes and using the m3u8 remote link, if possible or from another stream or web page.
In addition, I found other codes to integrate into a script that would be used to make jpg but I don’t quite understand how to insert or use them:
A lot of users who achieved what you want to achieve are present on multiple weather forums…
Probably also on a local Italian language forum.
Your question is not related to PWS_Dashboard scripts. And I am not familiar with code for what you want to make.
Posting in the PWS_dashboard forum with only a few hundred users you have a small change to find a user with the code you need.
Especially as your topic subject is about “m3u8 video stream”, not about this new idea.
Also post your question on other weather-forums in a topic “more or less compatible” with what you want to achieve.
You must try to have short topic description which explains what you want to create.
And a short introduction with what you need to have operational.
Ok, i understand, thanks.
It was just one more thing…
I’ll try to search in other forums as you suggested, thanks.
Instead, I wanted to ask you something else, I tried to insert this external webcam “https://aircam.io/cam/carloforte” as an iframe in the “webfilm.php” but it gives me an error, it doesn’t open it in a popup but only in another window or card. Is there any other way to display it in popup window?
Or there may be some other method to reproduce it on the dashboard, such as even with single images, as reproduced on this site: “Windy: Wind map & weather forecast” the same wevbcam? Thank you.
Regards.
PS. If it shouldn’t be possible to open the webcam in question in popup view, what command should I insert instead of “iframe” in the webfilm.php to make it open in a new tab or window? Thank you.