<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about vlc)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/vlc.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2022 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-SA"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/l_by-sa_4.0_88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Mon, 14 Mar 2022 18:59:07 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Drag-and-drop target to open video weblinks in VLC or youtube-dl</title><link>https://bgstack15.ddns.net/blog/posts/2021/07/27/drag-and-drop-target-to-open-video-weblinks-in-vlc-or-youtube-dl/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;&lt;a href="https://gitlab.com/bgstack15/drop-videos"&gt;Drop-videos&lt;/a&gt; is a small project for
personal use, that displays an icon that acts as a drag-and-drop target that
invokes either a downloader or a viewer, depending on how you invoked the
program. The main utility is drop-videos.sh which displays a small icon that
lets you drop video links on it. Depending on the environment variables at
invocation, the program will download/view the links.&lt;/p&gt;
&lt;h3&gt;Using&lt;/h3&gt;
&lt;p&gt;Several example scripts are provided, which is every script in this directory
excluding drop-videos.sh. My main use cases include the following provided
examples.  Use case | file&lt;br&gt;
---|---&lt;br&gt;
Download all videos from this playlist | &lt;code&gt;save-playlist.sh&lt;/code&gt;&lt;br&gt;
Download the specific link | &lt;code&gt;save-audio.sh&lt;/code&gt;&lt;br&gt;
View the specific link | &lt;code&gt;view-video.sh&lt;/code&gt;&lt;br&gt;
The application accepts the standard environment variables DEBUG and DRYRUN.&lt;/p&gt;
&lt;h3&gt;Upstreams&lt;/h3&gt;
&lt;h4&gt;Dragon&lt;/h4&gt;
&lt;p&gt;This project uses a customized &lt;a href="https://github.com/mwh/dragon"&gt;dragon&lt;/a&gt; binary.
The diff is provided here, as well as the customized source code.&lt;/p&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;I read article &lt;a href="https://www.linuxuprising.com/2021/07/open-youtube-and-more-videos-from-your.html"&gt;Open YouTube (And More) Videos From Your Web Browser With mpv
[Firefox, Chrome] - Linux Uprising
Blog&lt;/a&gt; which describes how to set up a browser extension that lets you add
a userscript that shows a small button in a youtube browser page that opens
that video in a local video player. This worked on my systems (aside from the
fact that I don't have mpv installed so the protocol handler fails), but I
wanted a solution that would work without having to visit each and every link
first. This article that inspired me refers to Tampermonkey which appears to
be a fork of greasemonkey which has a fork for Palemoon. This Greasemonkey can
use the userscript that will introduce a custom protocol which you can
configure the OS to send to a specific program.&lt;/p&gt;
&lt;h3&gt;Dependencies&lt;/h3&gt;
&lt;h4&gt;Compiling&lt;/h4&gt;
&lt;p&gt;To compile the C binary, you need gtk3 libraries.&lt;/p&gt;
&lt;h4&gt;Running&lt;/h4&gt;
&lt;p&gt;Bourne shell youtube-dl vlc or other media player&lt;/p&gt;</description><category>drag-and-drop</category><category>vlc</category><category>youtube-dl</category><guid>https://bgstack15.ddns.net/blog/posts/2021/07/27/drag-and-drop-target-to-open-video-weblinks-in-vlc-or-youtube-dl/</guid><pubDate>Tue, 27 Jul 2021 12:36:51 GMT</pubDate></item><item><title>Fix vlc ui scaling problems</title><link>https://bgstack15.ddns.net/blog/posts/2019/04/11/fix-vlc-ui-scaling-problems/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;Vlc disable hidpi scaling&lt;/h2&gt;
&lt;h3&gt;tl;dr&lt;/h3&gt;
&lt;p&gt;Set the environment variables:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;QT_AUTO_SCREEN_SCALE_FACTOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;QT_SCREEN_SCALE_FACTORS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;The story&lt;/h2&gt;
&lt;p&gt;I am testing Fluxbox on Devuan on a physical system (instead of just a VM)
with two monitors. I discovered that on one monitor, the ui for vlc is scaled
way wrong. For my left monitor, the buttons are way larger than they should
be. &lt;img alt="VLC with large buttons and normal
menus" src="https://bgstack15.ddns.net/blog/2019/03/vlc_bad_scaling_left.png"&gt;
And on the other monitor, the buttons were normal-sized, but the menus and
other text widgets were way too small. &lt;img alt="VLC with normal buttons and tiny
menus" src="https://bgstack15.ddns.net/blog/2019/03/vlc_bad_scaling_right.png"&gt;
When I set the environment variables as described above, vlc appears in the
correct scaling. At one point, I had some OS or DE installed that showed that
my system viewed the left monitor (HDMI-connected) as a 7" screen with
1920x1080 resolution, which is why the scaling on the left side was messed up.
&lt;img alt="VLC with normal buttons and
menus" src="https://bgstack15.ddns.net/blog/2019/03/vlc_scaling_good.png"&gt; Not
only did I add those variable exports to my ~/.fluxbox/startup file, I also
wrote a wrapper for vlc as &lt;strong&gt;/usr/local/bin/vlc&lt;/strong&gt;&lt;/p&gt;
&lt;table class="codehilitetable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt;1&lt;/span&gt;
&lt;span class="normal"&gt;2&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;QT_AUTO_SCREEN_SCALE_FACTOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;QT_SCREEN_SCALE_FACTORS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; /usr/bin/vlc
&lt;/code&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;I was not aware that VLC was a QT program. But, after setting some environment
variables,&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://forum.videolan.org/viewtopic.php?t=144476"&gt;How to Enable hiDPI Scaling? - The VideoLAN Forums&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Internet searches&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://duckduckgo.com/?q=vlc+disable+hidpi+scaling&amp;amp;t=palemoon&amp;amp;ia=web"&gt;vlc disable hidpi scaling&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>graphics</category><category>hidpi</category><category>oneliner</category><category>scaling</category><category>vlc</category><guid>https://bgstack15.ddns.net/blog/posts/2019/04/11/fix-vlc-ui-scaling-problems/</guid><pubDate>Thu, 11 Apr 2019 12:51:14 GMT</pubDate></item></channel></rss>