FWIW, I like the cleanness of your code, but I like mine for ease of understanding.... if the url stuff changes at a later date, I feel mine would be easier (for me at least) to understand..... but since I have this archived here forever.... I will use your code as it makes the program even smaller and cleaner looking

Very interesting..... (well.....not the perl to me anyway), but the first script was. As for using read, I use it all the time actually, as it allows me to write bash scripts for the bash-challanged IE: my son ....so he can save the video's he wanted

Without read, you have to cycle through more of checking `if/else' or `case' routines to bring $* parameters to the appropriate number of two.
Plus "youtube.sh {YouTube URL} {filename}" help line would be desired here as well.
So in the end it's going to get more that 2 lines =)

Perl rocks. Convert. That script works so damn beautifully, and I assure you there is very little in Perl that cannot be achieved in one line. With the addition of CPAN and one of the greatest communities I've ever seen, Perl is definitely worth a deeper look.

crouse wrote:

but the first script was. As for using read, I use it all the time actually, as it allows me to write bash scripts for the bash-challanged IE: my son ....so he can save the video's he wanted

That's cool, let's call this a power user script.

And as for the next post, why do you need instructions? Real geeks look at the code. And, technically it's one line without the #!/bin/bash, which should be default anyhow.

Hey crouse great script! However it doesn't work ...[mpeg1video @ 0x8336308]MPEG1/2 does not support 15/1 fpsError while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or heightrm: cannot remove `gmon.out': No such file or directory

I was planning on making a nice little front end with zenity, but I thought I would get the bugs out first. Any idea how to detect what type of video before encoding?

Hey crouse great script! However it doesn't work ...[mpeg1video @ 0x8336308]MPEG1/2 does not support 15/1 fpsError while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or heightrm: cannot remove `gmon.out': No such file or directory

I was planning on making a nice little front end with zenity, but I thought I would get the bugs out first. Any idea how to detect what type of video before encoding?

it worked for me with curl and ffmpeg installed. the video output of a resized video looked horrible though from the example i gave. i believe that might have to do with the quality of the source. i am not 100% sure though that is my guess.

Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum