Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
2724 views
How to queue up videos or media using mpv?
In particular I'd like a command for mpv that will automatically play youtube links I add in order. For example, at a party I might want to queue up songs as we think of them, and have them automatically play.
In particular I'd like a command for mpv that will automatically play youtube links I add in order. For example, at a party I might want to queue up songs as we think of them, and have them automatically play.
dessalines (161 rep)
Jun 18, 2018, 10:58 PM • Last activity: May 18, 2025, 05:08 AM
2 votes
1 answers
1548 views
mpv fails to play youtube videos
I've been using mpv for a while, but now whenever I try to play a youtube video the following output shows up: [ffmpeg] https: HTTP error 403 Forbidden Failed to open https://rr5. . . EDL: Could not open source file: 'https://rr5. . .' No video or audio streams selected. Oddly, I can play videos on...
I've been using mpv for a while, but now whenever I try to play a youtube video the following output shows up: [ffmpeg] https: HTTP error 403 Forbidden Failed to open https://rr5 . . . EDL: Could not open source file: 'https://rr5 . . .' No video or audio streams selected. Oddly, I can play videos on other platforms, such as Odysee and Rumble. I've looked for answers in this substack and elsewhere and haven't found a solution for this specifically.
Ash (185 rep)
Jan 14, 2024, 06:26 PM • Last activity: Feb 10, 2025, 06:30 AM
163 votes
6 answers
296345 views
Download only format mp4 on youtube-dl
How can I use the download-dl to download video through url playlist only format mp4 instead format `.mkv` or `.webm`? I use this command to download videos: `youtube-dl -itcv --yes-playlist https://www.youtube.com/playlist?list=....` The result this command are video with extension `.mp4`, `.mkv` o...
How can I use the download-dl to download video through url playlist only format mp4 instead format .mkv or .webm? I use this command to download videos: youtube-dl -itcv --yes-playlist https://www.youtube.com/playlist?list= .... The result this command are video with extension .mp4, .mkv or .webm
Edgar Oliveira (2031 rep)
Mar 29, 2016, 01:59 PM • Last activity: Jan 21, 2025, 06:55 PM
243 votes
22 answers
295791 views
How to download portion of video with youtube-dl command?
I am using Ubuntu, and the `youtube-dl` command is working absolutely fine. However, now I want to download only a portion a video that is too long. So I want to download only a few minutes of that video, e.g. from minute 13 to minute 17. Is there any way to do that?
I am using Ubuntu, and the youtube-dl command is working absolutely fine. However, now I want to download only a portion a video that is too long. So I want to download only a few minutes of that video, e.g. from minute 13 to minute 17. Is there any way to do that?
user3181614 (2531 rep)
Sep 18, 2015, 06:40 AM • Last activity: Oct 19, 2024, 08:07 PM
10 votes
3 answers
8946 views
How to list chapter titles from a YouTube video using youtube-dl / yt-dlp
Some YouTube content creators split their videos into chapters. A subset of them kindly offer the list of chapters titles on description video, with their starting timestamp. Sometimes they decide not to show them. How can I get the list of chapters titles?
Some YouTube content creators split their videos into chapters. A subset of them kindly offer the list of chapters titles on description video, with their starting timestamp. Sometimes they decide not to show them. How can I get the list of chapters titles?
Pablo A (3196 rep)
Jan 12, 2022, 04:10 AM • Last activity: Aug 27, 2024, 07:10 AM
0 votes
1 answers
389 views
youtube-dl keep size under xx MB
Is it possible to automatically limit the size of videos downloaded by youtube-dl? Whether by downloading it partially or automatically adjusting the resolution/framerate? Preferably I'd be able to give a size limit and the youtube link, then the commands take care of the rest. Is this doable or do...
Is it possible to automatically limit the size of videos downloaded by youtube-dl? Whether by downloading it partially or automatically adjusting the resolution/framerate? Preferably I'd be able to give a size limit and the youtube link, then the commands take care of the rest. Is this doable or do I need to think of making a python script or something?
Zyzyx (103 rep)
Aug 4, 2024, 04:25 PM • Last activity: Aug 4, 2024, 10:25 PM
3 votes
1 answers
2636 views
jq skip iteration over null
I am using jq 1.7 # Data I am operating on info.json downloaded by yt-dlp ```bash yt-dlp --write-info-json --skip-download https://www.youtube.com/watch?v=vlIO-7Rpi7c ``` # JQ - Task - Now I want to remove all array inside subtitles whose name is not `de`, `en-US` and inside `de`, `en-US` select all...
I am using jq 1.7 # Data I am operating on info.json downloaded by yt-dlp
yt-dlp --write-info-json --skip-download https://www.youtube.com/watch?v=vlIO-7Rpi7c 
# JQ - Task - Now I want to remove all array inside subtitles whose name is not de, en-US and inside de, en-US select all objects with element ext == vtt. **This successfully works as follows**:
jq
jq 'pick(.subtitles | .de[],."en-US"[] | select (.ext == "vtt")) | del(..|nulls)' *.json
output
{
  "subtitles": {
    "de": [
      {
        "ext": "vtt",
        "url": "https://www.youtube.com/api/timedtext?v=vlIO-7Rpi7c&ei=JS05ZoT2Ftf0i9oP8dy4mAo&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1715048341&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cei%2Ccaps%2Copi%2Cxoaf&signature=AB2ECEEABF48D1A16ADC7ACCB8A072D63EE12DCC.5F56904251766FB68624A68FF2BBB57B9CCFFD2F&key=yt8&lang=de&fmt=vtt ",
        "name": "German"
      }
    ],
    "en-US": [
      {
        "ext": "vtt",
        "url": "https://www.youtube.com/api/timedtext?v=vlIO-7Rpi7c&ei=JS05ZoT2Ftf0i9oP8dy4mAo&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1715048341&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cei%2Ccaps%2Copi%2Cxoaf&signature=AB2ECEEABF48D1A16ADC7ACCB8A072D63EE12DCC.5F56904251766FB68624A68FF2BBB57B9CCFFD2F&key=yt8&lang=en-US&fmt=vtt ",
        "name": "English (United States)"
      }
    ]
  }
}
# Issue For some Youtube video, json file does not contain "en-US" but contain "en", while some contain all three of de, en, en-US. So I wrote the following
jq
jq 'pick(.subtitles | .de[],.en[],."en-US"[] | select (.ext == "vtt")) | del(..|nulls)' *.json
### Error jq: error (at :69): Cannot iterate over null (null) # Help required How to select only .ext == "vtt" for only language en,en-US,de if not all of these languages are present in the json file?
Porcupine (2156 rep)
May 6, 2024, 08:27 PM • Last activity: May 7, 2024, 12:39 PM
1 votes
2 answers
1585 views
Download playlist with youtube-dl. Saving all data including the archive file into the uploader's folder for each video
This can't be done just with arguments as it says here: [Set download-archive path with args](https://reddit.com/r/youtubedl/comments/muysm1/set_downloadarchive_path_with_args/) I want to make two similar scripts. One that downloads the videos and archive file in the uploader's folder for each video...
This can't be done just with arguments as it says here: [Set download-archive path with args](https://reddit.com/r/youtubedl/comments/muysm1/set_downloadarchive_path_with_args/) I want to make two similar scripts. One that downloads the videos and archive file in the uploader's folder for each video. And another script that also downloads the metadata. I want to check the archive before downloading. I want to be able to use the function multiple times in parallel putting them on the background. The only way I can think of getting the uploader is to download the metadata with the output %(uploader)s. Then create a folder with the uploader's name, remove the file, and download again the files with the correct name from the created folder. I have a few functions defined already that may help with this. This is what I've tried but it isn't working # Video Playlist saving archive file to uploader's folder ytp() { # Dl opts=( ${opts[@]} --skownload metadata --skip-download --write-info-json ) # Get ten random characters local rand=$( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1 ) LOG_NAME=$( get_log_name "$(${paste[@]})" ) $yt_dl ${opts[@]} --output "%(uploader|Anon-%(id)s)s.%(ext)s" "$(${paste[@]})" >> "/tmp/$LOG_NAME" 2>&1 for f in *.info.json; do local name="${f%.*}" if [[ $name == Anon* ]]; then name="Anon" fi mkdir -p "$name" rm "$f" cd "$name" || exit # Download media ytv cd .. || exit done }
user513177
Nov 5, 2022, 12:25 PM • Last activity: Apr 1, 2024, 06:46 PM
0 votes
1 answers
120 views
Dolphin service menu to run konsole command with copied data in working directory
I would like to combine these two elements that I already use: - Konsole terminal running a `yt-dlp` command in order to download from a copied link (like `konsole -e yt-dlp 8 %u`) - A Dolphin service menu to open Konsole at a specific location (`konsole --workdir %f`) I would like a Dolphin service...
I would like to combine these two elements that I already use: - Konsole terminal running a yt-dlp command in order to download from a copied link (like konsole -e yt-dlp 8 %u) - A Dolphin service menu to open Konsole at a specific location (konsole --workdir %f) I would like a Dolphin service menu to open Konsole at a specific location AND run the yt-dlp command. enter image description here I need that when I quickly want to run that command on a USB-stick or other removable device, without the need to manually copy its location or of copying the file there after download, etc. How to combine the %f and/or %u parameters here? After --workdir they are referring to the directory that is open in Dolphin, and after yt-dlp they are referring to the copied download link, so that a line like Exec=konsole --workdir -e yt-dlp 8 %u doesn't work.
cipricus (1779 rep)
Nov 27, 2023, 10:09 AM • Last activity: Nov 27, 2023, 10:22 AM
3 votes
2 answers
1144 views
How to watch video while still downloading including audio?
If I download a video using [youtube-downloader](https://github.com/yt-dlp/yt-dlp) I can watch the part file while downloading (in my case using [mpv](https://mpv.io/)). Suppose I cannot or don't want to select a format containing both video and audio then the audio in the part file is missing becau...
If I download a video using [youtube-downloader](https://github.com/yt-dlp/yt-dlp) I can watch the part file while downloading (in my case using [mpv](https://mpv.io/)) . Suppose I cannot or don't want to select a format containing both video and audio then the audio in the part file is missing because it is downloaded and merged after the video download is complete. Is there any fast way to get audio and video merged during the download, such that I can watch the part file including audio. I already asked a similar question on [github](https://github.com/yt-dlp/yt-dlp/issues/7767) and learned that I could use the --downloader ffmpeg option. This works, but is very slow, so I am looking for a faster way to do it. The problem occurs if I download very large video (for example 10 hours long) in a high quality. However downloading audio is much much faster. So suppose I have the audio file already and I am downloading the video file. Is there an indirect way (workaround) using for example ffmpeg to merge the audio continuously into the video while the file is downloading.
student (18865 rep)
Aug 4, 2023, 02:30 PM • Last activity: Aug 4, 2023, 10:25 PM
0 votes
0 answers
86 views
Not a directory but have contents
So I use Compute Engine VM in Google Cloud to download youtube videos. I use Youtube-dl to download it. I follow the documentation in here: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl After I install youtube-dl and try to run it, I found an error: ``` File...
So I use Compute Engine VM in Google Cloud to download youtube videos. I use Youtube-dl to download it. I follow the documentation in here: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl After I install youtube-dl and try to run it, I found an error:
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1794, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
A simple error, and I know how to fix this. I just need to head into
/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py
and look at line 1794 The thing is, when I try to nano the address, it's not a directory. enter image description here It makes me confuse. It literally said that I have error in that directory but now that's not a directory. I use this to install youtube-dl:
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
I try to add write acc with
chmod +w /usr/local/bin/youtube-dl
but I still can't edit it. Can anyone explain why it's not a directory when it said that it's in the error message? And how to access it? Edit: I try
-lad youtube-dl
and get:
-rwxrwxrwx 1 root root 1837828 Jul 13 07:58 youtube-dl
Also
youtube-dl
and get:
youtube-dl: a /usr/bin/env python script executable (binary data)
Flitzcore (101 rep)
Jul 13, 2023, 08:13 AM • Last activity: Jul 13, 2023, 02:00 PM
2 votes
1 answers
4671 views
Mpv not running youtube urls because youtube-dl is out of date
I'm using Linux Mint 21.1 and I recently installed mpv. When I run `mpv` followed by a youtube url I get the following lines: [ytdl_hook] ERROR: Unable to extract updater id: please report this issue on https://yt-dl.org/bug. Make sure you are using the latest version... [ytdl_hook] youtube-dl faile...
I'm using Linux Mint 21.1 and I recently installed mpv. When I run mpv followed by a youtube url I get the following lines: [ytdl_hook] ERROR: Unable to extract updater id: please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version... [ytdl_hook] youtube-dl failed: unexpected error occurred [ytdl_hook] It appears that your youtube-dl version is severely out of date Failed to recognize title format It seems that the problem is that my youtube-dl is out of date, but when I command youtube-dl --update I get that youtube-dl is up-to-date (2021.12.17). What am I failing to see?
Ash (185 rep)
Feb 22, 2023, 09:28 AM • Last activity: Feb 22, 2023, 09:33 AM
1 votes
1 answers
325 views
How to write a function that takes an argument string that does not need to be quoted?
I'm writing a function, adding it to ~/.zshrc on my Mac. It's in order to more quickly handle commands to `youtube-dl`. I have this: ``` function dlv() { cd /Users/admin/Downloads youtube-dl -f 'best' "$1" } ``` But when I make a request I have to input the youtube link with quote marks. `dlv "https...
I'm writing a function, adding it to ~/.zshrc on my Mac. It's in order to more quickly handle commands to youtube-dl. I have this:
function dlv()
{
        cd /Users/admin/Downloads
        youtube-dl -f 'best' "$1"
}
But when I make a request I have to input the youtube link with quote marks. dlv "https://www.youtube.com/watch?v=dQw4w9WgXcQ " instead of dlv https://www.youtube.com/watch?v=dQw4w9WgXcQ How can I achieve this?
Alfie Stoppani (35 rep)
Jan 15, 2023, 02:29 PM • Last activity: Jan 16, 2023, 07:17 PM
6 votes
3 answers
868 views
If no input URL is supplied use list from text file
I am trying to create a shell script for yt-dlp that takes an URL as input from the command line or if no input is given use an internal list. The script works when given input, but crashes when no input is given and thus using the internal list. #!/usr/bin/env bash URLfromTerminal="$1" PathToList="...
I am trying to create a shell script for yt-dlp that takes an URL as input from the command line or if no input is given use an internal list. The script works when given input, but crashes when no input is given and thus using the internal list. #!/usr/bin/env bash URLfromTerminal="$1" PathToList="--batch-file '${HOME}/bin/ytdlp/Lists/Test.txt'" [[ -z "$URLfromTerminal" ]] && Download="$PathToList" || Download="$URLfromTerminal" yt-dlp -ciw \ -S "res:1920" \ --ffmpeg-location "$HOME"/bin/ffmpeg/ffmpeg \ "$Download" Error message when no input is given and using the internal list: yt-dlp: error: no such option: --batch-file '/Users/UserName/bin/ytdlp/Lists/Test.txt' Why is the path to the text file treated as an option by yt-dlp when expanded from a variable? I am new to shell scripting and don't know what's best practice, so any general improvement is also welcome.
Kasam (97 rep)
Dec 16, 2022, 12:13 PM • Last activity: Dec 16, 2022, 03:53 PM
-1 votes
2 answers
1182 views
"Unsupported URL: https://www.youtube.com/"
How to grab a youtube video if youtube-dl reports "ERROR: Unsupported URL: https://www.youtube.com/"? Complete error: [generic] watch?app=desktop: Requesting header [redirect] Following redirect to https://www.youtube.com/ [generic] www.youtube: Requesting header WARNING: Falling back on generic inf...
How to grab a youtube video if youtube-dl reports "ERROR: Unsupported URL: https://www.youtube.com/ "? Complete error: [generic] watch?app=desktop: Requesting header [redirect] Following redirect to https://www.youtube.com/ [generic] www.youtube: Requesting header WARNING: Falling back on generic information extractor. [generic] www.youtube: Downloading webpage [generic] www.youtube: Extracting information ERROR: Unsupported URL: https://www.youtube.com/
user199589 (1 rep)
Feb 22, 2022, 05:32 PM • Last activity: Nov 12, 2022, 05:58 AM
1 votes
1 answers
776 views
command not found: xsel -ob
I'm using Manjaro Linux. [I've changed my yt-dlp's zsh configuration][1] and now I get ❯ ytvp deal_with_long_filename:1: command not found: xsel -ob deal_with_long_filename:2: command not found: xsel -ob The log shows Usage: yt-dlp [OPTIONS] URL [URL...] yt-dlp: error: no such option: --continue --n...
I'm using Manjaro Linux. I've changed my yt-dlp's zsh configuration and now I get ❯ ytvp deal_with_long_filename:1: command not found: xsel -ob deal_with_long_filename:2: command not found: xsel -ob The log shows Usage: yt-dlp [OPTIONS] URL [URL...] yt-dlp: error: no such option: --continue --no-overwrites --no-post-overwrites --verbose --restrict-filenames --retry-sleep fragment:exp Usage: yt-dlp [OPTIONS] URL [URL...] yt-dlp: error: no such option: --continue --no-overwrites --no-post-overwrites --verbose --restrict-filenames --retry-sleep fragment:exp Why is it treating all options as a single one? I've tried running the xsel -ob command on its own and it works fine. How do I fix this? I would like to keep the send to background & option that I was using. Would it give problems with the definition of the function deal_with_long_filename? This is my configuration now opts="--continue --no-overwrites --no-post-overwrites --verbose --restrict-filenames --retry-sleep fragment:exp=2:64 --print-to-file" if [ -f /usr/local/bin/youtube-dl ]; then yt_dlp="/usr/local/bin/yt-dlp" else yt_dlp="$(which yt-dlp)" fi # If using Mac if [[ "$(uname -a | awk '{print $1}')" == "Darwin" ]]; then paste="pbpaste" opts="${opts} --ffmpeg-location /usr/local/bin/ffmpeg" else # If using Linux paste="xsel -ob" fi sanitize_linux_filename() { echo "$1" | sed -e 's/[^a-zA-Z0-9._-]/_/g' } get_log_name() { TIMESTAMP=$( date +%y%m%d%H%M%S ) NAME=$( sanitize_linux_filename "$1" ) echo "yt-dlp_${TIMESTAMP}_${NAME}.log" } deal_with_long_filename() { if ! $yt_dlp $opts --output "%(upload_date>%Y-%m-%d|)s%(upload_date& |)s%(title)s-%(id)s.%(ext)s" "$($paste)" >> "/tmp/$LOG_NAME" 2>&1; then $yt_dlp $opts --output "%(upload_date>%Y-%m-%d|)s%(upload_date& |)%(webpage_url_domain)s-%(id)s.%(ext)s" "$($paste)" >> "/tmp/$LOG_NAME" 2>&1 fi } # Video Playlist ytvp() { LOG_NAME=$( get_log_name "$1" ) opts="${opts} --format '(bv+(wa[abr>=64]/ba))/b' --format-sort res:720,tbr~2000 --no-playlist --download-archive 'downloaded.txt'" deal_with_long_filename "$1" "$LOG_NAME" }
user513177
Oct 21, 2022, 09:12 AM • Last activity: Oct 21, 2022, 10:19 AM
1 votes
1 answers
2994 views
Download error with youtube-dl and axel
I am trying to download following video: https://www.youtube.com/watch?v=pQWj2Fgxdrc by combining 'youtube-dl' and 'axel'. I am trying to download this video in such a way that I want these two softwares (youtube-dl and axel) to not only save this video as "interview.mp4" but also limit download spe...
I am trying to download following video: https://www.youtube.com/watch?v=pQWj2Fgxdrc by combining 'youtube-dl' and 'axel'. I am trying to download this video in such a way that I want these two softwares (youtube-dl and axel) to not only save this video as "interview.mp4" but also limit download speed to 200KB. For this purpose, I used following command: youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -o 'interview.mp4' -s 200000 https://www.youtube.com/watch?v=pQWj2Fgxdrc Here I am using following options: > -f 22 for video format > > -c for resume download > > -i for ignore errors > > -o for output file name > > -s 200000 for limit download speed to 200KB However, instead of downloading the video at 200KB and saving it as "interview.mp4", it is giving following error: ERROR: fixed output name but more than one file to download I have also tried following variation of command: youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -s 200000 -o 'interview.mp4' https://www.youtube.com/watch?v=pQWj2Fgxdrc and youtube-dl -f 22 -c -i --external-downloader /usr/bin/axel -o 'interview.mp4' https://www.youtube.com/watch?v=pQWj2Fgxdrc -s 200000 and youtube-dl -f 22 -c -i -o 'interview.mp4' --external-downloader /usr/bin/axel -s 200000 https://www.youtube.com/watch?v=pQWj2Fgxdrc But still same error is appearing. However, if I remove the option (-s 200000), the error disappear and the video starts to download. But I want to use (-s 200000) option so that it should not eat all the bandwidth. What mistake I am doing here?
Zetro Track (21 rep)
Feb 18, 2019, 02:10 PM • Last activity: Jul 15, 2022, 07:04 PM
-2 votes
1 answers
1104 views
Youtube-dl fails on youtube and works on other sites
I started having this issue a few days ago: `youtube-dl` no longer works for links to YouTube, but works fine for other sites such as Instagram: $ youtube-dl https://www.instagram.com/p/B47c667AKPo/ [Instagram] B47c667AKPo: Downloading webpage [download] Destination: Video by marieforleo-B47c667AKPo...
I started having this issue a few days ago: youtube-dl no longer works for links to YouTube, but works fine for other sites such as Instagram:
$ youtube-dl https://www.instagram.com/p/B47c667AKPo/ 
[Instagram] B47c667AKPo: Downloading webpage
[download] Destination: Video by marieforleo-B47c667AKPo.mp4
[download]   2.5% of 40.44MiB at  1.45MiB/s ETA 00:27^C
...

$ youtube-dl https://www.youtube.com/watch?v=blHgexdxfVU 
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

Ignoring HTTPS certificates with an HTTP address or [a --no-check-certificate](https://apple.stackexchange.com/questions/337958/error-downloading-youtube-video-using-youtube-dl) also fails. The same YouTube link and syntax worked a few weeks ago. I upgraded to the latest version, 2020.03.01, and still have the same issue. Is anything the matter between YouTube and youtube-dl?
ginjaemocoes (165 rep)
Mar 2, 2020, 11:36 AM • Last activity: Apr 22, 2022, 07:52 AM
5 votes
4 answers
8563 views
CLI utility to search and view/download YouTube videos
Is there a utility that can search YouTube from the command line, and then either **view** or **download** the search results according to user input? $ youtube-search madonna 1 Madonna - Hung Up (Official Music Video) madonna ♩ 180M views 9 years ago https://www.youtube.com/watch?v=EDwb9jOVRtU "Hun...
Is there a utility that can search YouTube from the command line, and then either **view** or **download** the search results according to user input? $ youtube-search madonna 1 Madonna - Hung Up (Official Music Video) madonna ♩ 180M views 9 years ago https://www.youtube.com/watch?v=EDwb9jOVRtU "Hung Up" by Madonna from Confessions On A Dance Floor, available now. 2 Madonna - Like A Prayer (Official Music Video) madonna ♩ 69M views 9 years ago https://www.youtube.com/watch?v=79fzeNUqQbQ 2006 WMG Like A Prayer. etc. And then you can enter: - "v1" to view video 1 (with VLC, etc.) - "d1-3" to download videos 1-3 (with youtube-dl, etc.) - "n" to view next page of search results What I tried so far: googler works partially with YouTube, but for some reason only shows two search results when searching for "Madonna". Also there is not the choice between view and download. youtube-dl has a search function, but doesn't seem to print the search results nor accept user input. youtube-dl -j ytsearch:madonna lists metadata about search results, but doesn't seem to contain the video link, title and description that would be desired.
forthrin (2469 rep)
Jan 22, 2019, 03:34 PM • Last activity: Apr 19, 2022, 09:01 AM
1 votes
1 answers
94 views
what starts youtube-dl automatically in linux?
In the last two days, I've noticed that something starts youtube-dl when I start my system (Debian 11); it seems to be as soon as I login. The reason I noticed is that it steals all resources and I have to go to a console with Ctl-Alt-F2 and log in as root. Killing the process doesn't help - it seem...
In the last two days, I've noticed that something starts youtube-dl when I start my system (Debian 11); it seems to be as soon as I login. The reason I noticed is that it steals all resources and I have to go to a console with Ctl-Alt-F2 and log in as root. Killing the process doesn't help - it seems to be part of a job stream, so the only way is to temporarily rename the python executable, which makes them fail quickly. I suspect it is related to the fact that I have been downloading a large number of small videos for a course, but where does it actually start from? ***Edit*** I think I may have found what the problem was - I will see when I get a chance to reboot (or just log out/in). It was quite subtle; I couldn't find any reference to youtube-dl in any file that has anything to do with sddm (since I use KDE), except for my .local/share/sddm/xorg-session.log, where it says:
/etc/sddm/Xsession: 70: /etc/profile: function: not found
Error: /undefinedfilename in (/usr/bin/startplasma-x11.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:733/1123(ro)(G)--   --dict:0/20(G)--   --dict:75/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
rm: cannot remove '/usr/bin/startplasma-x11.ps': No such file or directory
/etc/sddm/Xsession: 78: /etc/profile: function: not found
ERROR: [something very long ...]\ufffd\x03\x12\x08' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:^?ELF^B^A^A^C^C>^A0M@��@8^K@^^^]^F^D@@@h^Bh^B^H^C^D�^B�^B�^B^\^\^A^A^D�=�=^P^A^E@@@^]O^]O^P^A^D����#�#^P^A^Fh�h�hǨ^H�^H^P^B^Fp�p�pȀ^B�^B^H^D^D�^B�^B�^BDD^DP�td^Dh�h�h��^A�^A^DQ�td^F^PR�td^Dh�h�hǘ^H�^H^A/lib64/ld-linux-x86-64.so.2^D^T^CGNU���eBFD�ӝ^C�^KC�u�U�^D^P^AGNU^C^B^C�^A^F�@�^A^H����|�e�mCE���qX^\�^R^Rj^G^R^_^L^RB^P^R^H^B^R�^S^R^_^U^R�^C^R^H" ) to search YouTube
Looking at the first line of /etc/sddm/Xsession
#! /bin/sh
# Xsession - run as user

session=$1
I suddenly realised that the old Bourne shell doesn't understand the newer shell function syntax function xyz, but requires xyz() instead - hence the error message in .local/share/sddm/xorg-session.log. I had just defined a function that calls youtube-dl when the problem started; the Xsession script sources /etc/profile, can't handle function and then runs what is inside the function definition, ie youtube-dl, with whatever parameter happen to be defined in Xsession.
j4nd3r53n (779 rep)
Mar 13, 2022, 08:52 AM • Last activity: Mar 15, 2022, 04:04 PM
Showing page 1 of 20 total questions