Jump to content

Suddenly cannot open youtube live on DVBViewer


jactkwn

Recommended Posts

Posted

I am wondering if this is my computer's iP address problem, or something has to be changed on DVBViewer. Many thanks

Posted

I think Youtube changed something. It ends up with a server-side 403 Forbidden error here, as DVBViewer debug mode reveals. Youtube doesn't allow us to play live streams in DVBViewer anymore. Dunno yet if something can be done about it.

 

  • 3 weeks later...
  • 1 month later...
Posted (edited)

Would it be wrong to give an idea? Or two?

Edited by Iks Brasil
Posted

What do you mean by "give an idea"?

 

If you want to tell me something that shall not become public please use a personal forum message.

 

Posted

I had created a tool in another post that basically took the link and sent it to DVB. It still gets the link, but it doesn’t open anymore.

 

 

Idea: In another program that has already been discontinued, something like this was done: yt-dlp was placed in the program’s folder, and when using links supported by it, automatically—or with an option in the settings—it would open the YouTube video.

 

https://prnt.sc/Kjbf3dPEismx

Posted

Looks like a clever solution. I don't need it, but maybe other people want to use it. Obviously there is need for it.

 

I had a short look at your script:

 

# Abre no DVBViewer
def abrir_no_dvbviewer(url):
    caminho_dvbviewer = r"C:\Program Files (x86)\DVBViewer\DVBViewer.exe"
    subprocess.run(['start', '', caminho_dvbviewer, url], shell=True)

 

I would not use a hard-coded DVBViewer path. E.g. on my PC the path is C:\Program Files (x86)\DVBViewer Pro\DVBViewer.exe. So it may be better to read the path from the registry, e.g. from 

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\dvbviewer.exe.

 

Posted (edited)

Or also, is there no way to edit the script "search.m3u8"?

Edited by Iks Brasil
Posted
Am 10.3.2026 um 13:56 schrieb Iks Brasil:

Is there any way to call external applications through a URL?

 

No, there isn't. It could be implemented, but enabling something like this is a potential security risk.

 

I suppose what you want is some kind of channel list entry in DVBViewer, that launches the whole process that is necessary for passing an URL to yt-dlp, getting the stream URL from it, passing it to DVBViewer and let it play the stream. However, I see no possibility to launch external executables with the current DVBViewer version.

 

Am 10.3.2026 um 14:39 schrieb Iks Brasil:

Or also, is there no way to edit the script "search.m3u8"?

 

The search.m3u mechanism would require a HTTP server running locally all the time in the background, while DVBViewer is running. Let's assume 5077 as its port. It would have to do the following

  • Receive a request from DVBViewer, something like http://localhost:5077/?url=https://www.youtube.com/watch?v=YDvsBbKfLPA. The original URL in the DVBViewer channel list would be http://localhost:5077/search.m3u8?url=https://www.youtube.com/watch?v=YDvsBbKfLPA. However, search.m3u8 is not sent to the server. It only tells DVBViewer that it shall search for an m3u8 URL in the server response.
  • Pass the part after ?url=... to  yt-dlp and read the URL created by it.
  • Send this URL as response to DVBViewer, enclosed in single or double quotes ('url' or "url"). DVBViewer will now search in the server output for an URL containing .m3u8 and play it.

That would work. I don't know if it is possible to create such a server with Python. I could also try do it in Delphi (maybe even as a DLL loaded as plugin by DVBViewer), which would be some work, but I already have templates like the server in the WiFi Remote Input Plugin. That makes it a bit easier. The hard part will be reading the yt-dlp output from stdout. I first have to find out how this can be done in Delphi.

 

Posted
vor 2 Stunden schrieb Griga:

The search.m3u mechanism would require a HTTP server running locally all the time in the background, while DVBViewer is running (...) I could also try do it in Delphi (maybe even as a DLL loaded as plugin by DVBViewer), which would be some work, but I already have templates like the server in the WiFi Remote Input Plugin.

 

Well, it was easier than I thought, because I found a Delphi module for launching external applications, that also enables receiving their stdout Output (used by the DVBViewer Media Server for communication with FFmpeg). So I only had to change some things in the WiFi Remote Input Plugin. Here the result works for .m3u8 URLs. You can try... check your personal messages.

 

Posted

Good afternoon. It worked perfectly; it just took a few extra seconds… but it worked perfectly.

Posted

OK, thanks for testing.

 

In the meantime I also managed to make it work with search.mp4 URLs for playing MP4 videos. However, this requires additional code in DVBViewer (which means, a new version), and it revealed a problem in the plugin. It captures the whole yt-dlp output to stdout. The output may also contain warnings. Therefore the plugin searches for http in the output to find the URL determined by yt-dlp. Unfortunately the warnings may also contain URLs, and that's where the plugin goes wrong. The solution was to let the plugin only capture the last line of the yt-dlp output.

 

Furthermore I only got a low-resolution version of the MP4 test video, though it is also available in full HD. This is probably due to my yt-dlp configuration. I didn't install a JavaScript runtime, as recommended.

 

Something that should already work with current DVBViewer versions and the plugin are URLs like http://localhost:5077/search.mpd?url=... for playing streams in MPEG Dash format (untested).

 

The plugin still needs to be elaborated a bit. An already occupied port 5077 should be handled somehow, e.g. by automatically searching for the next free port and writing it to a file yt_dlp_server.ini in the Plugins sub-directory of the DVBViewer configuration folder. I'll provide an update for you via PM, when it's done, or upload it to the members area, so it becomes available for all DVBViewer users.

 

Posted

After rethinking the matter I found a much better solution for the yt-dlp server plugin. It doesn't use the search.m3u8 mechanism anymore, but a HTTP mechanism called "Redirect". Please read more about it here.

 

If a DVBViewer request like http://localhost:5077/?url=... arrives in the plugin, its HTTP server replies with a "302 Found" HTTP header, that looks like this:

 

HTTP/1.0 302 Found
Location: <here the URL received from yt-dlp>
Content-Length: 0
Server: yt-dlp plugin
... other header fields

 

This header tells DVBViewer "The URL of the desired content has been changed. Please use the URL in the location header". DVBViewer is able to handle such a redirect since version 6. Doing it this way is faster than using the search.m3u8 mechanism, and it's more versatile. It is possible to play MP4 videos in this way with current DVBViewer versions, not requiring a new version anymore. However, URLs with search.m3u8 in the channel list will not work anymore. URLs can now simply look like this:

 

http://localhost:5077/?url=...

 

or, if you want to help DVBViewer and tell it which format it has to expect, in this way

 

http://localhost:5077/x.m3u8?url=... or  http://127.0.0.1:5077/x.mp4?url=...

 

where the "x" is irrelevant (it can be as well y or z or abc...), and the file extension  .m3u8 /.mp4 indicates that a HLS / MP4 stream will be received. This lets playback start faster, because DVBViewer can select the suitable playback branch immediately, without having to try this and that first.

 

Other enhancements in the plugin are :

  • A cache that remembers the results obtained from yt-dlp for the URLs requested by DVBViewer. So if DVBViewer requests the same URL once more, the plugin does not need to ask yt-dlp again, but simply picks the URL from its cache. This is much faster. However, since the URL may have an expiration date, it is discarded from the cache after a configurable time (default 5 minutes).
  • The plugin writes a file yt_dlp_server.ini to the Plugins sub-directory of the DVBViewer configuration directory, where the following values can be configured:
    • Port (default = 5077). Here you can also see if the plugin has changed the port automatically because 5077 was occupied.
    • YT_DLPCommand (default = yt-dlp.exe -g -f b). Here you can change the command parameters passed to yt-dlp.
    • URLValidity (default 5 minutes). Here you can change how many minutes URLs in the cache remain valid.

That's all for now - more enhancements may follow...

 

@Iks Brasil You have another PM.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...