Open cagnulein opened 2 years ago
better https://videojs.com/
Even more better: HTML5. Everything should be possible:
<!DOCTYPE html>
<html>
<body>
<button onclick="getPlaySpeed()" type="button">What is the playback speed?</button>
<button onclick="getPosition()" type="button">Get Time</button>
<button onclick="setPosition()" type="button">Set Time+2</button>
<button onclick="setPlaySpeedSlower()" type="button">Slower</button>
<button onclick="setPlaySpeedFaster()" type="button">Faster</button>
<button onclick="setPlaySpeedFasterFine()" type="button">Faster fine</button>
<button onclick="setPlaySpeedSlowerFine()" type="button">Slower fine</button><br>
<video id="myVideo" width="1024" height="768" controls muted>
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<script>
var vid = document.getElementById("myVideo");
function getPlaySpeed() {
alert(vid.playbackRate);
}
function getPosition() {
alert(vid.currentTime);
}
function setPosition() {
vid.currentTime = vid.currentTime+2.0;
}
function setPlaySpeedSlower() {
vid.playbackRate = vid.playbackRate-0.5;
}
function setPlaySpeedFaster() {
vid.playbackRate = vid.playbackRate+0.5;
}
function setPlaySpeedSlowerFine() {
vid.playbackRate = vid.playbackRate-0.1;
}
function setPlaySpeedFasterFine() {
vid.playbackRate = vid.playbackRate+0.1;
}
</script>
</body>
</html>
@Bepo7012 i actually built without issues the https://github.com/cagnulein/QmlVlc in this repo there is also the speed method, so we are good to go.
this is the ios kit for vlc https://github.com/videolan/vlckit android one https://github.com/masterwok/libvlc-android-sdk
do you find something about speedrate on iOS via HTML?
@Bepo7012 another good library https://github.com/wang-bin/QtAV probably easiest to use
I opened a bug on the videojs project https://github.com/videojs/video.js/issues/7961
What I found about html on iOS, or better, on every mobile device ( so on android too) is, that all browsers on these devices always do a streaming and not playing of videos because of saving data usage. And with streaming the possible speed rates are naturally limited because there is not enough buffer to use. Convincing the browser to do a video play on mobile devices is not easily done, the only reliable way would be a kind of buffering between source and video renderer (what jwplayer also do) but I heave not investigated how this task can be accomplished.
Von: Roberto Viola @.> Gesendet: Friday, October 14, 2022 8:40:16 AM An: cagnulein/qdomyos-zwift @.> Cc: Bepo7012 @.>; Mention @.> Betreff: Re: [cagnulein/qdomyos-zwift] QmlVLC in order to improve video playbackrate (Issue #981)
@Bepo7012https://github.com/Bepo7012 i actually built without issues the https://github.com/cagnulein/QmlVlc in this repo there is also the speed method, so we are good to go.
this is the ios kit for vlc https://github.com/videolan/vlckit
do you find something about speedrate on iOS via HTML?
— Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/981#issuecomment-1278552261, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWDBIKEWT7PMNJ2STS64ITTWDD55BANCNFSM6AAAAAAREJCEZY. You are receiving this because you were mentioned.Message ID: @.***>
Same effect, playing locally works on iOS only until factor 2 then the video is displayed "jumpy"
So i guess native library it's the only way to go. This is very disappointing
So i guess native library it's the only way to go. This is very disappointing
yes, if we can't get some kind of buffering managed :-(
@Bepo7012 another good library https://github.com/wang-bin/QtAV probably easiest to use
as far as i can estimate it (too less experince with libraries) it looks promising too
Yeah, have a working sample with Video.js :-) Will do some test's and post it here
you dropped the bomb!
As usual i was happy a little bit to early ;-) But it seem's that we are getting closer. In the sample i used there was a m3u8 playlist used which worked perfectly, but as soon as i switched over to my mp4 file again the Issue reappeared. So it seem's we can't use mp4 files for this purpose, i'm just searching which file-types can be played smoothly. Do you think it's a problem not to use mp4's?
if the playlist works, i think there is no problem at all since we can incapsulate it in the js.
Unfortunately it seem's it is not only an incapsulation of the file. I have tried this resulting in a very long loading time of the video. It seem's that we need a possibilty to split the .mp4 to many small .ts files and encapsulate this ts files into a m3u8 playlist, exactly the format that our "Source" is doing it ;-)
@cagnulein Working now on Windows, new iPad and old iPad via a local Webserver :-) . Can you test it on MacOS and also locally on the iPad? Just use this
html file, there are buttons for all needed functionality on it. To get the Video use the following:
ffmpeg.exe -i {url to source m3u8} -map 0 -c copy -f segment -segment_list test.m3u8 -segment_time 18 test_%03d.ts
This downloads the video completely, splits it in parts of about 18 seconds (same as i have seen on the "source") and write the needed m3u8 file. Don't forget to change the source url in the html an look what happens. I keep my fingers crossed
Wow! I'm out actually but I will try this tomorrow!
@cagnulein Hmm, played around with the possibility of playing this HLS Videos locally, but it seem's not to be possible. Isn't a small Webserver already implemented too?
@cagnulein Hmm, played around with the possibility of playing this HLS Videos locally, but it seem's not to be possible. Isn't a small Webserver already implemented too?
yes it is! I didn't the time yet to check your yesterday's implementation
No problem at all, just good to know that there would be a solution for playing the files locally too :-)
@cagnulein If you like to try it with dash.js here it is:
This i have used to convert the mp4 to the needed .mpd structure:
ffmpeg -i {mp4 File} -vcodec copy -acodec copy test.mpd
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
yes bot, you're right, i'm lazy :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
maybe I can check if it's portable to Qt5 in the future, not an easy job for sure.
@cagnulein I assume a quite hard Job. I think we need a little more Feedback if the current way of double speeding the recorded Video and limit the players speed to the max playback rate possible is useable for the Users. This way the Variant with an HTML player would be the much more easier solution.
@cagnulein And BTW: Will upload a few more Videos maybe today or tomorrow
https://github.com/RSATom/QmlVlc?fbclid=IwAR3BIcl0Z9E3zKTWZtDLUhcLGZipi56GdIKj5ft-yOV_RiQ5dMo-rROoXN4 @Bepo7012