LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-17-2018, 09:43 AM   #1
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Rep: Reputation: Disabled
youtube software suggestion


I need to listen to all videos of a certain youtube user. I say listen because I'm only interested in the audio. I want software that can accept the link to the user profile and play all of its files, newest first. I want it to save state and everytime I start it - play last video if it was interrupted in the middle, so it keeps going back and back. I need functionality similar to youtube-dl --download-archive playlist, but I don't need to store anything locally, just want to listen to the audio. CLI programs are fine too, just need to be free software.
 
Old 01-17-2018, 09:58 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,134
Blog Entries: 21

Rep: Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478Reputation: 3478
Not sure if smtube fits your requirements or not.
 
Old 01-17-2018, 10:21 AM   #3
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rokytnji View Post
Not sure if smtube fits your requirements or not.
Doesn't even work with single videos well, segfaults often.
 
Old 01-17-2018, 10:33 AM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by FlinchX View Post
I need to listen to all videos of a certain youtube user. I say listen because I'm only interested in the audio. I want software that can accept the link to the user profile and play all of its files, newest first. I want it to save state and everytime I start it - play last video if it was interrupted in the middle, so it keeps going back and back. I need functionality similar to youtube-dl --download-archive playlist, but I don't need to store anything locally, just want to listen to the audio. CLI programs are fine too, just need to be free software.
Look into youtube-dl and mps-youtube/pafy.
 
Old 01-17-2018, 10:54 AM   #5
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by orbea View Post
Look into youtube-dl and mps-youtube/pafy.
Thank you but I just hope that someone will tell me "this software does exactly what you need". Because I asked in forum after reading the whole youtube-dl manpage twice and not finding what I need. Either youtube-dl indeed can do it and I've managed to overlook it twice, or it can't, but some other software can, and I hope to learn about it here.
 
Old 01-18-2018, 02:23 AM   #6
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
this software does exactly what you need:
https://rg3.github.io/youtube-dl/
 
Old 01-18-2018, 03:37 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
youtube-dl or minitube? Most will still require a bit of effort to target a users archive.
 
Old 01-18-2018, 07:27 AM   #8
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
this software does exactly what you need:
https://rg3.github.io/youtube-dl/
Closest I came to is:

Code:
youtube-dl -v --download-archive playlist -o - URL_OF_USER_VIDEOS | vlc -
but:

1. i'm not sure it works at all with whole playlists this way. with a single file, like in the example from the manpage, it works fine
2. it keeps downloading forward a lot, player can still be playing first file, while youtube-dl might be downloading many files ahead. i would like it to pause and wait till player finishes to play current file, then start to download next. but i suppose this would require two-way communication between youtube-dl and the player, which is not the case?
3. when i interrupt youtube-dl with Ctrl-C, for some reason it won't write the playlist file. when i download files without -o -, but with archive persistence, the playlist file is written fine

i'm close to giving up and just download everything locally first
 
Old 01-18-2018, 12:55 PM   #9
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Quote:
I need to listen to all videos of a certain youtube user.
Examples:

Example Username search:
https://www.youtube.com/results?q=PBS+NewsHour

Get first 10 video titles and url's for user
Code:
youtube-dl -eg "ytsearch10:PBS NewsHour"
Look at the man page for other info

Make a list of video id's
Code:
list=$(youtube-dl --get-id "ytsearch10:PBS NewsHour")
Play each one out of the list
Code:
for i in $list; do 
    youtube-dl https://www.youtube.com/watch?v="$i" -o - | mplayer -
done
If you don't want to use that much bandwidth then get a smaller format:
See whats available
Code:
youtube-dl -F $url ...
Smaller mp4
Code:
youtube-dl -f 140 ....
Or audio only
Code:
youtube-dl -f 139 ....
If you want a log then make one either with tee or redirect the output of your player.
Code:
mplayer $url 2>&1 | grep Playing | tee -a mylog.txt
Make a script that does what you wish. Ask for help after you've tried/made your script. Lots of people here can help you with that.

Last edited by teckk; 01-18-2018 at 12:56 PM.
 
2 members found this post helpful.
Old 01-18-2018, 02:54 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Some more ideas. https://unix.stackexchange.com/quest...youtube-player
 
Old 01-18-2018, 06:54 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
VLC will accept URLs and if they are video, use the Video menu > Video Track > Disable.
Play.

Save playlist.
 
Old 01-19-2018, 12:55 AM   #12
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
VLC will accept URLs and if they are video, use the Video menu > Video Track > Disable.
Play.

Save playlist.
vlc doesn't seem smart enough to understand an https://www.youtube.com/user/USERID/videos link
 
Old 01-19-2018, 12:58 AM   #13
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
Make a list of video id's
Code:
list=$(youtube-dl --get-id "ytsearch10:PBS NewsHour")
Play each one out of the list
Code:
for i in $list; do 
    youtube-dl https://www.youtube.com/watch?v="$i" -o - | mplayer -
done
...

Make a script that does what you wish. Ask for help after you've tried/made your script. Lots of people here can help you with that.
This is probably my best option, I'll go this way and start tuning it for my needs.
Thank you.
 
Old 01-19-2018, 05:49 AM   #14
Laurence_Burke
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by FlinchX View Post
This is probably my best option, I'll go this way and start tuning it for my needs.
Thank you.
I agree with your suggestion friend.
 
Old 01-19-2018, 11:25 AM   #15
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
You can make a little script to search UT for url's with bash and friends,
save results to .txt,

Code:
#! /usr/bin/env bash

#User agent
agent="Mozilla/5.0"

#url segments for search by date posted
url="https://www.youtube.com/results?search_query="
by_date="&search_sort=video_date_uploaded"

#Get user search word input
read -p "Enter ut search word/s | cars or big+red+cars: " s_word

#Get page, save as $var
ut_page=$(curl -A "$agent" "$url""$s_word""$by_date")

#Read the page, grep for string, make url, redirect to .txt
while read line; do
    if [ "$line" != "" ]; then
        echo "http://www.youtube.com"$line""
    fi
done < <(echo "$ut_page" | 
        grep -oP 'class="yt-lockup-title "><a href="\K[^"]+'
        ) | grep "http://www.youtube.com/watch?v=" > UTSearch.txt
Then parse UTSearch.txt however you wish.
 
1 members found this post helpful.
  


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
DVD Authoring Software Suggestion gaspower Linux - Software 5 12-17-2005 10:34 AM
Software suggestion cornish Linux - Software 1 07-04-2005 12:02 PM
document management software suggestion Niceman2005 Linux - General 1 04-29-2005 07:29 PM
Software-Suggestion: Feedback wanted! seneca Linux - General 10 09-02-2003 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:36 AM.

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