Page 1 of 1

How to build youtube-dl for salix 14.2 Xfce?

Posted: 16. Feb 2023, 22:12
by galmei
What to do to restore youtube-dl for salix 14.2 Xfce?
Got a complete dropout and am lost.
Please help me.

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 08:36
by djemos
install qt5
sudo slapt-get -i qt5
then copy this bellow and save it as SLKBUILD

Code: Select all

#Packager: Dimitris Tzemos <dijemos~at~gmail~dot~com>

pkgname=smtube
pkgver=21.10.0
pkgrel=1dj
source=("http://sourceforge.net/projects/smtube/files/SMTube/$pkgver/smtube-$pkgver.tar.bz2" "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp")
docs=("*.txt" "changelog")
url=http://smplayer.sourceforge.net

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"smtube (search and download videos from YouTube)"
"SMTube is an application that searches and downloads videos from"
"YouTube. It can use a variety of video players for playing back"
"content."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	if [ ${USE_QT5:-no} = yes ]; then
		QMAKE=qmake-qt5
		LRELEASE=lrelease-qt5
	else
		QMAKE=qmake
		LRELEASE=lrelease
	fi

	sed -i "s/youtube-dl/yt-dlp/g"  $startdir/src/$pkgname-$pkgver/src/*.cpp || return 1
	
	make \
		QMAKE=$QMAKE \
		LRELEASE=$LRELEASE \
		PREFIX=/usr \
		DOC_PATH="\\\"/usr/doc/$pkgname-$pkgver/\\\"" \
		QMAKE_OPTS="QMAKE_CXXFLAGS=\"$SLKCFLAGS\""  || return 1

	make install \
		PREFIX=/usr \
		DOC_PATH=/usr/doc/$pkgname-$pkgver \
		DESTDIR=$startdir/pkg || return 1
	
	    mkdir -p $startdir/pkg/usr/bin/ || return 1
        cp $startdir/src/yt-dlp $startdir/pkg/usr/bin/ || return 1
        chmod +x $startdir/pkg/usr/bin/yt-dlp
	
	# fix ownerships and permissions
	chown -R root:root $startdir/pkg
} 

and build the package

Code: Select all

USE_QT5=yes fakeroot slkbuild -X
install it with

Code: Select all

sudo spkg smtube-21.10.0-x86_64-1dj.txz

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 13:37
by gapan
You don't really need a package for this. The download instructions from its homepage should work just fine:
http://ytdl-org.github.io/youtube-dl/download.html

Code: Select all

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 15:20
by galmei
gapan wrote: 17. Feb 2023, 13:37 You don't really need a package for this. The download instructions from its homepage should work just fine:
http://ytdl-org.github.io/youtube-dl/download.html

Code: Select all

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl
Hello gapan,

I don't think so. Because:

Code: Select all

ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
v

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 15:27
by gapan
Oh, so I guess newer versions of youtube-dl cannot be used 14.2 anymore. It's probably that the python in 14.2 is just too old. There's nothing you can do about it.

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 15:45
by galmei
gapan wrote: 17. Feb 2023, 13:37 You don't really need a package for this. The download instructions from its homepage should work just fine:
http://ytdl-org.github.io/youtube-dl/download.html

Code: Select all

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl
Hi guys,

My question was simple.
What do you make of it? Pure chaos!
Should I repeat the question or what can I do now?

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 16:02
by gapan
You already got a simple answer. Read my previous post.

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 17. Feb 2023, 18:06
by djemos
try this

Code: Select all

sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp

Code: Select all

sudo chmod a+rx /usr/local/bin/yt-dlp 
Edit: The file downloaded from https://yt-dl.org/downloads/latest/youtube-dl is not working. Returns an error
but the yt-dlp file is working fine in smtube and in smplayer and in the terminal typing: yt-dlp URL
It is working with python3-3-9.10 and with pyton3-3.9.16. The problem is not the python version.
On smplayer under network in youtube support application choose yt-dlp. Then from smtube clicking on a link the smplayer is running to play the video.

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 20. Feb 2023, 10:37
by djemos
smtube, smplayer, mpv packages working with the yt-dlp for salix-15.0
smtube includes the yt-dlp.

Re: How to build youtube-dl for salix 14.2 Xfce?

Posted: 20. Feb 2023, 18:02
by DidierSpaier
I have upgraded yt-dlp recently, works well with mpv 0.35.0 on Slint-15.0, for what it's worth.