View previous topic :: View next topic |
Author |
Message |
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
VHockey86 Advanced Member

Joined: 12 Dec 2025 Posts: 988 Location: Rochester
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
unreal.geek Member

Joined: 21 Sep 2025 Posts: 202 Location: /dev/random
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
lberg Sr. Member

Joined: 28 Jul 2025 Posts: 1289
|
|
Back to top |
|
crudball Advanced Member

Joined: 01 Sep 2025 Posts: 892 Location: Stratford - U.K
|
Posted: Sun Jul 16, 2025 8:59 am Post subject: |
|
|
Great work crouse - althought it is much easier to understand if it isn't condensed to 4 lines.
Code: |
#!bin/bash
bu="http://youtube.com/get_video.html?"
mkdir -p ~/YouTube
cd ~/YouTube
read -p "YouTube url? " ur
read -p "Name? " nv
wget ${ur} -O /tmp/y1
uf=${bu}`grep player2.swf /tmp/y1 | cut -d? -f2 | cut -d\" -f1`
wget "${uf}" -O /tmp/y.flv
ffmpeg -i /tmp/y.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${nv}.mpg
rm /tmp/y.flv
rm /tmp/y1
rm gmon.out
exit
|
Also that helps people are learning bash. Can you please annotate this script so I can see what each bit does?_________________ I'm back  |
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
Posted: Mon Jul 17, 2025 1:03 am Post subject: |
|
|
The script is expanded on bashscripts.org ...... the final version was the condensed one. You can however see what I did revision-wise on bashscripts.
_________________ Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
|
|
Back to top |
|
VHockey86 Advanced Member

Joined: 12 Dec 2025 Posts: 988 Location: Rochester
|
|
Back to top |
|
shebang Sr. Member

Joined: 08 Jan 2025 Posts: 1104 Location: Chicago
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11833 Location: Iowa
|
|
Back to top |
|
jada Linux Guru

Joined: 13 May 2025 Posts: 3064 Location: Sun City, CA 92585
|
Posted: Mon Aug 21, 2025 5:52 am Post subject: |
|
|
But is it not easier when your kids using Firefox and the extension "Flash Dowloader"
I know you like script's  |
|
Back to top |
|
HaniMan New Member
Joined: 01 Oct 2025 Posts: 1
|
|
Back to top |
|
inactive Sr. Member
Joined: 29 Aug 2025 Posts: 1207
|
Posted: Wed Aug 26, 2025 6:42 am Post subject: |
|
|
Quick question (I hope), anyone have any clue howcome with the youtube download script I get this every single time for the last couple of weeks, both in Cooker, and in MDV 2025.1?:
Code: | $ sh youtube2.sh
What is the youtube.com url you want to rip ? http://www.youtube.com/watch?v=oW0vhNRMFVQ&feature=related
What would you like to name the video (no spaces in the name) ? news_reporter_slip-up
--2009-08-26 00:35:29-- http://www.youtube.com/watch?v=oW0vhNRMFVQ&feature=related
Resolving www.youtube.com... 74.125.53.102, 74.125.53.113, 74.125.53.139, ...
Connecting to www.youtube.com|74.125.53.102|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `urlsource.txt'
[ <=> ] 112,014 235K/s in 0.5s
2009-08-26 00:35:35 (235 KB/s) - `urlsource.txt' saved [112014]
http://youtube.com/get_video.html?
--2009-08-26 00:35:35-- http://youtube.com/get_video.html?
Resolving youtube.com... 208.117.236.69, 64.15.120.233
Connecting to youtube.com|208.117.236.69|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.youtube.com/get_video.html? [following]
--2009-08-26 00:35:40-- http://www.youtube.com/get_video.html?
Resolving www.youtube.com... 74.125.53.102, 74.125.53.113, 74.125.53.139, ...
Connecting to www.youtube.com|74.125.53.102|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-08-26 00:35:46 ERROR 404: Not Found.
mv: cannot stat `*': No such file or directory
Now converting the file to mpeg ... this can take awhile, please be patient
--------------------------------
tovid
DVD and (S)VCD video conversion script
Version 0.31
http://www.tovid.org
--------------------------------
Using config file /home/myuser/.tovid/tovid.config, containing the following options:
(none)
tovid command-line used:
-in *.flv -out news_reporter_slip-up -half-dvd -ntsc -ffmpeg -keepfiles
Could not find input file /home/myuser/YouTube/tmp/*.flv. Exiting.
mv: cannot stat `*.mpg': No such file or directory |
I have everything needed installed:
Code: | $ rpm -qa | grep ffmpeg
gstreamer0.10-ffmpeg-0.10.8-1mdv2010.0
qmmp-ffmpeg-0.3.0-1mdv2010.0
ffmpeg-0.5-1plf2009.1
libffmpeg52-0.5-1plf2009.1
libffmpegthumbnailer3-1.5.4-1mdv2010.0
ffmpegthumbnailer-1.5.4-1mdv2010.0
$ rpm -qa | grep tovid
tovid-0.31-5mdv2009.1 |
Here's the script, and it's always worked til recently:
Code: | $ cat youtube2.sh
#!/bin/bash
# by Crouse
# Program name ytr = YouTube.com Ripper
baseurl="http://youtube.com/get_video.html?"
mkdir -p ~/YouTube ;
mkdir -p ~/YouTube/tmp ;
cd ~/YouTube/tmp ;
read -p "What is the youtube.com url you want to rip ? " urltorip ;
read -p "What would you like to name the video (no spaces in the name) ? " nameofvideo ;
wget ${urltorip} -O urlsource.txt ;
grep "watch_fullscreen" urlsource.txt > url.info;
videourl=`sed "s;.*\(video_id.\+\)&title.*;\1;" url.info`;
fullurl=${baseurl}${videourl};
echo ${fullurl};
rm *;
wget ${fullurl};
mv * *.flv;
echo "Now converting the file to mpeg ... this can take awhile, please be patient" ;
tovid -in *.flv -out ${nameofvideo} -half-dvd -ntsc -ffmpeg -keepfiles;
mv *.mpg ../;
rm -Rf ~/YouTube/tmp;
exit |
Right now, this isn't even working for me:
HaniMan wrote: | i use youtube ripper to download them - find it more easy to do it that way  |
When I put the url in, and click "Download the video", it just goes to a blank page.
_________________ Mandriva 2025.1 PWP
Mandriva Cooker
ArtistX live
|
|
Back to top |
|
inactive Sr. Member
Joined: 29 Aug 2025 Posts: 1207
|
Posted: Sat Aug 29, 2025 9:45 pm Post subject: |
|
|
Bump...
_________________ Mandriva 2025.1 PWP
Mandriva Cooker
ArtistX live
|
|
Back to top |
|
|