LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-09-2021, 06:00 PM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
to find out what a programing riding on another program


I have searched the web, but find nothing regarding this issue:

let me use clipgrab for example:
Since Clipgrab is using youtube-dl to download video. while newer version of clipgrab is using yt-dlp.
how to know if the clipgrab is using which program ?
I tried to search clipgrab in Htop, but it just does not show youtube-dl nor yt-dlp.

example2:
i would like to know what program mpv riding on when i use mpv to play youtube url.
does the mpv uses youtube-dl or yt-dlp... ? that's what i want to know..

Please tell me how to do it.
Thx
 
Old 12-09-2021, 07:23 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

you can trace what is being called with strace. Try:
Code:
strace mpv 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'
Evo2.

P.S. I was soooo tempted to Rickroll
 
Old 12-09-2021, 08:20 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,226

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I'd just look at the source code.
 
Old 12-10-2021, 01:20 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
probably you can try pstree too
 
Old 12-10-2021, 06:22 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by andrewysk View Post
i would like to know what program mpv riding on when i use mpv to play youtube url.
does the mpv uses youtube-dl or yt-dlp... ? that's what i want to know..
Code:
man mpv| less +/yt-dlp
 
1 members found this post helpful.
Old 12-10-2021, 07:03 AM   #6
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Thumbs up learn something new

Quote:
Originally Posted by ondoho View Post
Code:
man mpv| less +/yt-dlp
Thank you! I have learned something new from you.
I never thought of looking into man of mpv to see what the author has to say about which package does the program ride on.

and i was always go into man then execute search with "/"..

now, i know i can do a 1 line method.. using your cli.

Gracias.
 
Old 12-10-2021, 03:39 PM   #7
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

you can trace what is being called with strace.
I tried Strace output into a log file.. but yielded no desired result. It does not shows any call for youtube-dl.
strace is no good for this purpose.

Code:
$ strace -qe execve mpv 'https://www.youtube.com/watch?v=aqz-KE-bpKQ' 
output:
execve("/usr/bin/mpv", ["mpv", "https://www.youtube.com/watch?v="...], 0x7ffc5ca23aa8 /* 67 vars */) = 0
 
Old 12-10-2021, 03:43 PM   #8
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably you can try pstree too
I tried pstree, but yield no useful info in this case. I see nothing related to youtube-dl.
I just learn by example on this utility.. 1st time user. .maybe i don't know how to use it right.

Code:
$ pstree -pt 88789
mpv(88789)-+-{dav1d-frame}(88818)
           |-{dav1d-frame}(88821)
           |-{dav1d-tile}(88816)
           |-{dav1d-tile}(88817)
           |-{dav1d-tile}(88819)
           |-{dav1d-tile}(88820)
           |-{mpv/ao}(88823)
           |-{mpv/demux}(88815)
           |-{mpv/lua script }(88790)
           |-{mpv/lua script }(88791)
           |-{mpv/lua script }(88792)
           |-{mpv/lua script }(88793)
           |-{mpv/vo}(88799)
           |-{mpv/worker}(88805)
           `-{threaded-ml}(88822)

$ pstree -pts 88789
systemd(1)---systemd(549)---krunner(33349)---mpv(88789)-+-{dav1d-frame}(888+
                                                        |-{dav1d-frame}(888+
                                                        |-{dav1d-tile}(8881+
                                                        |-{dav1d-tile}(8881+
                                                        |-{dav1d-tile}(8881+
                                                        |-{dav1d-tile}(8882+
                                                        |-{mpv/ao}(88823)
                                                        |-{mpv/demux}(88815+
                                                        |-{mpv/lua script }+
                                                        |-{mpv/lua script }+
                                                        |-{mpv/lua script }+
                                                        |-{mpv/lua script }+
                                                        |-{mpv/vo}(88799)
                                                        |-{mpv/worker}(8880+
                                                        `-{threaded-ml}(888+
 
Old 12-10-2021, 03:47 PM   #9
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Only manage to find out that mpv uses youtube-dl by default from man page using suggestion of ondoho

But this is not a permanent solution. If the author didn't write in man page.. then i won't know.
Looking into source code is not something i know how to do. so i skipped that suggestion.
 
Old 12-10-2021, 04:04 PM   #10
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
some youtube video not working with mpv.. weird

Quote:
Originally Posted by evo2 View Post

Code:
mpv 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'

Hii Evo2, After i tried out to play the youtube video as you attached in the link, my mpv only has audio, no video at all.

I also tried a random video that appears on the list ( https://www.youtube.com/watch?v=5-YjjrwAz8g) , no video, only got audio.

I tried a random video, like this one, mpv show both audio and video just fine (https://www.youtube.com/watch?v=16y1AkoZkmQ)

something is not right.. somehow, some video works while other not.. no idea what's wrong with mpv.
 
Old 12-11-2021, 02:33 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by andrewysk View Post
I tried pstree, but yield no useful info in this case. I see nothing related to youtube-dl.
pstree shows the actual situation, it will not tell you if youtube-dl (or anything else) will be (or was already) used.
 
Old 12-11-2021, 12:15 PM   #12
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
Also look at ldd - ldd programname or ldd /bin/programname etc.
 
Old 12-12-2021, 05:18 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by andrewysk View Post
Only manage to find out that mpv uses youtube-dl by default from man page using suggestion of ondoho
Then I suspect you have an older version of mpv.
Mine says:
Quote:
ytdl_path=youtube-dl

Configure paths to youtube-dl's executable or a compatible fork's. The paths
should be separated by : on Unix and ; on Windows. mpv looks in order for the
configured paths in PATH and in mpv's config directory. The defaults are
"yt-dlp", "yt-dlp_x86" and "youtube-dl".
On Windows the suffix extension
".exe" is always appended.
I suppose it means: in that order.
In any case, this is configurable in ~/.config/mpv/mpv.conf.
 
1 members found this post helpful.
Old 12-16-2021, 06:33 AM   #14
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Then I suspect you have an older version of mpv.
Mine says:

I suppose it means: in that order.
In any case, this is configurable in ~/.config/mpv/mpv.conf.
There isn't any .conf file in my ~/.config/mpv/

Is it possible to copy your mpv.conf into the specified address ? it could be possible to change which tool it uses to download youtube video in this config file. Hopefully.

so far, i have made the mpv works by made using sym link as suggested by someone on this forum.. i sym linked yt-dlp to youtube-dl (which i have renamed to otherthing).
 
Old 12-16-2021, 06:38 AM   #15
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
Also look at ldd - ldd programname or ldd /bin/programname etc.
Tried on mpv, it didnt' list out anything near to youtube... It only list out library files.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Riding the Rails with WebSphere Part 1 LXer Syndicated Linux News 0 02-01-2008 06:40 AM
LXer: Jboss World Berlin: riding with Red Hat LXer Syndicated Linux News 0 11-23-2006 06:21 AM
Enjoying riding the learning curve steelcap LinuxQuestions.org Member Intro 2 01-17-2006 05:24 PM
over riding system calls djgerbavore Programming 11 08-20-2004 12:03 AM
over riding udma -not a specific linux question salparadise Linux - Hardware 3 08-19-2003 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration