sebaro / ViewTube

Watch videos from video sharing websites with extra options.
http://sebaro.pro/viewtube
GNU General Public License v3.0
27 stars 5 forks source link

Add support for all streaming videos with naitive client software to play and send all streaming videos from the web browser to media players like vlc or polplayer and not only supported sites like youtube, dailymotion..... #7

Open trimechee opened 2 weeks ago

trimechee commented 2 weeks ago

I didn't think it was possible that we could watch video streaming with VLC since the abandonment of the VLC plugin in Chrome, Firefox.....

but by doing recent research, I was able to find techniques and scripts via web extensions to send streaming streams to VLC but it seems complicated and I haven't tested it....

I also found

https://github.com/woodruffw/ff2mpv

to send video streaming to mpv palyer but the developer says windows support is experimental because windows has bugs.....

i found also this awesome plugin that can be integrated wit potplayer and maybe mpc be but potplayer even with 3DYD Youtube Source can't play some streaming embed videos because not supported by yt-dlp :

https://ys.3dyd.com/

I was happy happy when I found this video:

How to Play Web Videos in VLC Media Player| Watch Web Movies in VLC

https://www.youtube.com/watch?v=FdVhRPQGmWg&t=253s

I thought it was a feature similar to the preview option of the downloader extension cat-catch, I installed native client, and the send-to-vlc extension but it didn't work unfortunately :(

https://github.com/belaviyo/send-to-vlc/

https://add0n.com/send-to.html?context=explore&fwx

same problem with external Application Button, video playback failure with vlc, potplayer.....:

https://github.com/andy-portmen/external-application-button/

https://webextension.org/listing/external-application-button.html

using these extensions with vlc, , potplayer ..... I was unable to play video streaming from my favorite streaming sites like:

https://french-anime.com/animes-vf/

https://v5.voiranime.com/?filter=dubbed

https://vostfree.ws/last-anime-vf.html

but our Cat-catch extension achieved this feat by previewing the video with potplayer !

https://github.com/xifangczy/cat-catch

And so, at the beginning I was not able to play the video streaming with the preview of Cat-catch with potplayer then the developer of Cat-catch helped me and advised me to add the parameters: potplayer:// ${url}/referer=${referer} and it works!

And so I said to myself perhaps the native client tool which is an important program to send streams of the web browser to local media players, so it could be a good idea to integrate native client with ViewTube to play all the streaming video with vlc ou potlayer not only supported websites like youtube , dailymotion ......and resolve possible integration problems and to add support for other powerful media players like kikoplay, moonplayer, smplayer, qmplay2, mpc-qt, mpc-be, implay......

Thank you so much !

How to install native client

https://github.com/andy-portmen/native-client

https://www.youtube.com/watch?v=18jAqTXBiZA

https://github.com/andy-portmen/native-client/blob/master/windows/install.bat#L26-L31

EDIT :

Hello, maybe it can help to sens links to external media players .....so i find these extensions that have maybe similar features ad use vlc protocol....:

Open vlc:// links directly from your web browser :

https://github.com/stefansundin/vlc-protocol

a browser extension to send media links to VLC media player : https://github.com/andy-portmen/open-in-vlc/

" Open websites with VLC. You must install the vlc:// protocol handler as well. You should use this together with playlist parsers.

Open websites with VLC. You must install the vlc:// protocol handler as well: https://github.com/stefansundin/vlc-protocol

You should use this together with VLC playlist parsers, e.g: https://addons.videolan.org/p/1167220/ "

https://chromewebstore.google.com/detail/open-with-vlc/jcccmhdgkfinhddlhpahoeofmdlljglh

Play most multimedia files, and various streaming protocols with this VLC distributed online.

Effortless VLC online Media Player Integration:

Online Media Streaming: Access your favourite online media platforms, including popular streaming websites, and enjoy a seamless experience with VLC's versatile playback capabilities.

https://www.winfy.net/vlc-online/

here a discussion between vc protocol users :

"Edit the vlc-protocol.bat file and add this line (after the last set url command):

set url=!url:https/=https:/!

For some reason, Firefox is removing colons from links, so this puts them back in. That code is for https, but you could do the same for http, if you need it."

VLC on desktop will not open vlc:// urls

https://code.videolan.org/videolan/vlc/-/issues/26581

a call protocol management software has been developed to provide support for software that does not support URL Protocol calls.

https://github.com/xifangczy/URLProtocol

" Sounds like his biggest complaint is that vlc:// is "not a scheme"?

Honestly I'm not 100% sure exactly what he means but maybe something like video:// or media:// would be more acceptable? Or is there a pre-existing scheme that VLC can adopt? Not sure where to look for that. "

sebaro commented 2 weeks ago

Please keep the comments short, I don't undrestant the issue/request.

trimechee commented 2 weeks ago

Sorry Mr @sebaro , i have put some solutions to help ViewTube to integrae more websites....my request please, make ViewTube compatible with new streaming websites , not ony youtube, dailymotion....for example my favourites streaming websites : i try but ViewTube and SaveTube don't work with these streaming webistes :

https://french-anime.com/

https://v5.voiranime.com/

https://vostfree.ws/

sebaro commented 2 weeks ago

These sites show videos from video hosting sites. I can get the videos but these sites do not allow to be played directly only embedded (they check the referrer header).

trimechee commented 2 weeks ago

Yess Mr @sebaro ! i talked with the developers of downloader extensons and the developer of Live stream donwload advises to me to use Open-in-Vlc extension to avoid preview referer problems....

so I talked to the developer of Open-in-Vlc about it because his extension doesn't work with my favorites streaming websites and he told me today:

" You can use this extension with any custom player. Configure a different player using the options page. If your player requires different arguments, you can direct this extension to a batch script that converts the VLC arguments to the format needed for the other player.

Support for referrer has already been added, but it is not yet public. This feature will be included in the next release."

and Mr Andy also explained to me the difference between his 2 extensions:

".......The external-application-button extension is useful if you know the link and the open-in-vlc is useful if you need to detect media links."

The only problem even if the new version of open in vlc comes out, the developer advises me to do a "batch script that converts the VLC arguments....." and I am not an expert and I find that doing scripts is difficult and complicated :(

So we hope please that our beloved ViewTube could maybe integrate with this extension and automatically add the necessary scripts so we can watch all the video streams with vlc, or potlayer, or wit other powerful media players like : qmplay2 or gridplayer or mpc qt or kikoplay or moonplayer, implay......

Thank you so much for your patience and important help !

trimechee commented 2 weeks ago

Mr @sebaro , i have suggestion please ! May be it is good idea to fork the part of the code of the "preview setting" of the open-souce cat-catch extension which seems to be the only video download extension to natively integrate the rare feature "preview video wit local media player" , maybe that could help Open-in -Vlc to more intercept and send all video streams to vcl or potPlayer without potenial problems of referer !

Thank you very much!

https://github.com/xifangczy/cat-catch/blob/master/README_en.md

Mr @sebaro , you said "I can get the videos but these sites do not allow to be played directly only embedded" , this is great news ! maybe we can paly them with tweaked ou other hml5 player with increse of the buffer network because one of the main problems I encounter is that my sister or other members of my family use hdmi and multimedia content and the wifi sometimes becomes very weak, and even downloading the videos takes time and I have to wait.....

So as for ViewTube for youtube, maybe ViewTube can change the default html5 player, disable dash.....for more stable playback on our favorite streaming sites, thank you very much!

sebaro commented 2 weeks ago

These video hosts don't allow video playback outside their web pages, they check request headers (in this case the referrer). You can't play these without this header.

Example: https://video.sibnet.ru/shell.php?videoid=4705407

Without referrer:

mpv https://video.sibnet.ru/v/3d3ea531dcfcf63e2994e6b7e39da3db/4705407.mp4 [ffmpeg] https: HTTP error 403 Forbidden

With referrer:

mpv https://video.sibnet.ru/v/3d3ea531dcfcf63e2994e6b7e39da3db/4705407.mp4 --referrer="https://video.sibnet.ru/" (+) Video --vid=1 () (h264 1280x720 23.976fps) (+) Audio --aid=1 --alang=fra () (aac 2ch 44100Hz) File tags: Artist: vostfree Title: Kakkou.no.Iinazuke.01.VF.720p.www.vostfree.tv Using hardware decoding (vaapi). AO: [alsa] 48000Hz stereo 2ch float VO: [gpu] 1280x720 vaapi[nv12] AV: 00:00:00 / 00:23:03 (0%) A-V: -0.004 Cache: 59s/14MB

trimechee commented 2 weeks ago

Interesting ! Thank you so much :)

Yeah, for sibnet, i remember i was able to watch videos in potplayer without header because probably i use potlayer with plugin " 3DYD Youtube Source " and I think the header problem is solved in potplayer with the sites supported by yt-dlp because maybe 3DYD Youtube Source downloads the video in the background and then sends it to potplayer.....edit : i checked the network activity and there is network activity in potplayer with 3dyouttube source only when the yuutube video is active so I don't think 3dyoutubesource download the video)

trimechee commented 2 weeks ago

I just did some tests again, when I put the url address of the download link given by the live stream extension donwload, cat-catch.....and I put the link in potplayer, the video streaming works... ..so apparently no need to referrer, on condition not trying to play several streaming videos consecutively because when I tried several times, it doesn't work anymore and I get an error message....

sebaro commented 2 weeks ago

What are the video link and stream link? Maybe potplayer sends the referrer header (the video host name). Other players and browsers don't.

trimechee commented 2 weeks ago

it's strange, I was quite confident that I could preview all the video streaming with the preview option with potplayer with cat-catch extension but yesterday while watching video sport highlights of the euro (we are sorry for the defeat of the Romanian team against Holland) the cat catch preview with potplayer no longer worked!

https://dasfootball.com/

https://hufoot.com/

however the preview worked on my favorite streaming sites voiranime, vostfree, french anime.....

The likely explanation for this bug is that I changed the default "potplayer://${url}/" from cat catch to "potplayer://${url}/referer=${referer}" and maybe sites like sports highlights sites don't require referrer hence the bug.....

I was able to resolve the bug in the preview of sports highlight sites by copying the url address of the video detected by the live stream donwload extension.....I think the ideal would be to combine live stream download with the extension open in vlc in a single extension to be able to open the majority of videos, but we must wait for the new version of open in vlc which will include the referrers in order to test it....

sebaro commented 2 weeks ago

You can try mpv + youtube-dl/yt-dlp:

mpv --ytdl=yes "https://video.sibnet.ru/shell.php?videoid=4705407" (+) Video --vid=1 () (h264 1280x720 23.976fps) (+) Audio --aid=1 --alang=fra () (aac 2ch 44100Hz) File tags: Artist: vostfree Title: Kakkou.no.Iinazuke.01.VF.720p.www.vostfree.tv Using hardware decoding (vaapi). AO: [alsa] 48000Hz stereo 2ch float VO: [gpu] 1280x720 vaapi[nv12] AV: 00:00:05 / 00:23:03 (0%) A-V: 0.000 Cache: 340s/73MB

You can also try my script SaveTube+, this gets all videos from a web page, it doesn't work for embedded videos.

trimechee commented 2 weeks ago

Great ! Thank you so much ! may be we can find the original link of embed videos with :

chrome://media-internals/

and then maybe embed videos will work with ViewTube Plus , i will try......Thank you :)

trimechee commented 2 weeks ago

Mr @sebaro , here is a comment from the developer of cat catch in my issue to add support for new cli programs to increase support and downloading of complex files.....apparently the developer invented a new open source tool called "url protocol", may be it can help to intercept more streams......

https://github.com/xifangczy/URLProtocol

" - ".......The author of N_m3u8DL-CLI and N_m3u8DL-RE has basically given up updating. It is indeed necessary for the boss to consider other CLI download engines. If possible, consider the problem of mobile download when considering other download engines."

-N_m3u8DL-RE is still being updated.

I actually regret writing a special call setting for N_m3u8DL-CLI. I should make a more universal call setting solution instead of limiting it to N_m3u8DL-CLI

Currently solving this problem, a call protocol management software has been developed to provide support for software that does not support URL Protocol calls.

https://github.com/xifangczy/URLProtocol

(Note that this software is under development and is unreliable. Use with caution. It only supports Windows and is only in Chinese. It should have multiple languages ​​after the official release)

The corresponding extended settings have been completed in the latest version of the source code.

If possible, please help test it. "

sebaro commented 2 weeks ago

I can't test it, it's Windows only. You can create a browser protocol and associate a script to it, then call the video with this protocol. See the ViewTube web page on how to create a protocol.

trimechee commented 2 weeks ago

Interesting ! thank you so much :)

trimechee commented 1 week ago

Hello Mr @sebaro , maybe it can help to sens links to external media players .....so i find these extensions that have maybe similar features ad use vlc protocol....:

Open vlc:// links directly from your web browser :

https://github.com/stefansundin/vlc-protocol

a browser extension to send media links to VLC media player : https://github.com/andy-portmen/open-in-vlc/

" Open websites with VLC. You must install the vlc:// protocol handler as well. You should use this together with playlist parsers.

Open websites with VLC. You must install the vlc:// protocol handler as well: https://github.com/stefansundin/vlc-protocol

You should use this together with VLC playlist parsers, e.g: https://addons.videolan.org/p/1167220/ "

https://chromewebstore.google.com/detail/open-with-vlc/jcccmhdgkfinhddlhpahoeofmdlljglh

Play most multimedia files, and various streaming protocols with this VLC distributed online.

Effortless VLC online Media Player Integration:

Online Media Streaming: Access your favourite online media platforms, including popular streaming websites, and enjoy a seamless experience with VLC's versatile playback capabilities.

https://www.winfy.net/vlc-online/

here a discussion between vc protocol users :

"Edit the vlc-protocol.bat file and add this line (after the last set url command):

set url=!url:https/=https:/!

For some reason, Firefox is removing colons from links, so this puts them back in. That code is for https, but you could do the same for http, if you need it."

VLC on desktop will not open vlc:// urls

https://code.videolan.org/videolan/vlc/-/issues/26581

a call protocol management software has been developed to provide support for software that does not support URL Protocol calls.

https://github.com/xifangczy/URLProtocol

" Sounds like his biggest complaint is that vlc:// is "not a scheme"?

Honestly I'm not 100% sure exactly what he means but maybe something like video:// or media:// would be more acceptable? Or is there a pre-existing scheme that VLC can adopt? Not sure where to look for that. "

sebaro commented 1 week ago

Check the script web page, it explains how to create a browser protocol: http://sebaro.pro/viewtube/ You can replace "viewtube" with any name you want for the protocol.

trimechee commented 1 week ago

Great ! Thank you so much for your precious help :) 💯 🥇

trimechee commented 6 days ago

Hello Mr @sebaro , sorry to bother you again, but I have important news!! With the new update which adds referrer and browser's user-agent string, the Open-in-vlc extension , we can preview streaming video and send complex hls streaming video to local media players like vlc or potplayer !!

https://github.com/andy-portmen/open-in-vlc

the new update of Open in vlc works with new streaming platforms and even embed videos, for exemple in my favourite streaming website :

https://v5.voiranime.com/anime/high-rise-infestation-vf/high-rise-infestation-02-vf/

it also works with potplayer but we have to copy the m3u8 link offered by Open-in-vlc manually.... so i'm talking about it because it seems vlc player and potplayer are capable of previewing the videos if the extension adds the referrer and browser's user-agent string.....maybe these informations can help our beloved ViewTube when we copy m3u8 link from or when we need to download embed videos.....

trimechee commented 6 days ago

EDIT : i specify also taht currently there is apocalypse disaster concerning the downloading of streaming video , streaming platforms have changed their streaming protocol or defense mechanism and it has almost become impossible to download streaming videos despite the fact that I have tried several extensions, a donwload mabager like FDM ......except this stream recorder extension for chrome can download streaming videos but it is not open source:

https://www.hlsloader.com/

so the ultimate solution to get around the download bug that affects many extensions and download managers is to preview the streaming videos and watch them with vlc or ptplayer by using our beloved ViewTube with scripts.....

sebaro commented 6 days ago

As I said, for most sites I can get the stream. The problem is the browser that can only play progressive (mp4) and can't send http headers. For the rest you have to use an external player with a browser protocol or copy and open stream in player.

trimechee commented 5 days ago

Interesting ! Thank you for these important informations :) 💯