topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 12:09 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: NANY 2021: yaydl  (Read 43319 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
NANY 2021: yaydl
« on: November 08, 2020, 03:01 PM »
NANY 2021 Entry Information

Application Name yet another youtube down loader
Version 0.3.0 changes regularly
Short Description does what it says
Supported OSes developed on macOS, compiled for Windows 10 11, but in theory, yaydl should run where Rust is available
Web Page https://code.rosaelefanten.org/yaydl
Downloadvia cargo: cargo install yaydl
System Requirements
  • ffmpeg. unless you can live with the default video formats and don’t ever use the audio-only option.
Author that would be me


Description
You know what was missing? A tool to download YouTube video files! Here’s mine.

Features

  • Can download videos.
  • Can optionally keep only the audio part of them.
  • Could convert the resulting file to something else (requires ffmpeg).
  • Comes as a single binary (once compiled) - take it everywhere on your thumbdrive, no Python cruft required.

Non-features

The list of features is deliberately kept short:

  • No output quality choice. yaydl assumes that your internet connection is good enough, or else you would stream, not download.
  • No complex filters. This is a downloading tool.
  • No image file support. Videos only.

Missing features (patches are welcome)

  • yaydl currently ignores video meta data (except the title) unless they are a part of the video file.
  • Playlists are not fully supported yet.
  • More supported sites: Possible, but not implemented yet. Check the README!

Usage

USAGE:
    yaydl [FLAGS] [OPTIONS] <URL>

ARGS:
    <URL>    Sets the input URL to use

FLAGS:
    -h, --help          Prints help information
    -x, --only-audio    Only keeps the audio stream
    -v, --verbose       Talks more while the URL is processed
    -V, --version       Prints version information

OPTIONS:
    -f, --audio-format <AUDIO>    Sets the target audio format (only if --only-audio is used).
                                  Specify the file extension here (defaults to "mp3").
    -o, --output <OUTPUTFILE>     Sets the output file name
« Last Edit: May 05, 2023, 07:27 PM by Tuxman »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #1 on: November 13, 2020, 05:09 PM »
Updated to 0.2.2.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #2 on: November 15, 2020, 05:28 AM »
Seems very interesting.
 ;D

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #3 on: November 15, 2020, 05:33 AM »
It’s even on Cargo now:
cargo install yaydl

https://crates.io/crates/yaydl

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #4 on: November 15, 2020, 08:37 AM »
yaydl.exe "https://www.youtube..../watch?v=Z-b13Df2QT0"

That results in an error: "Relative URL without a base"
Did not find any info about that error at the provided links.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #5 on: November 15, 2020, 01:26 PM »
Naturally, this specific video has a very different get_video_info file.  >:(
I’ll investigate... not today, I’m afraid. Maybe tomorrow.

Sorry.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #6 on: November 16, 2020, 07:55 PM »
Whenever you have the time, the resources and the desire to do anything about the previous problem, that is no problem. Better yet, I should say thanks for the effort you have already put into the current version. Nice, simple and (almost  :-[ ) doing everything it is supposed to.


At the risk of you hating me even more:
yaydl.exe "https://www.youtube..../watch?v=PNrVNbLGcY8"

That link gives the following error:
Error: The filename, directory name, or volume label syntax is incorrect. (os error 123)

Which is normally reserved for folders/files that have characters in their name that NTFS trips over.  Yet I could manage to download others in that series, which also had the | character in their name (I assume that is the character giving problems). Hence why this one goes wrong and others ok?

For matters like this the output parameter should be used, I'm aware. Just letting you know about my experiences with your software.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #7 on: November 16, 2020, 08:22 PM »
Another post another error  :-[
But accompanied with a backtrace log, so hopefully helps you out.

yaydl.exe "https://www.youtube..../watch?v=uofTiq2e4ys"
Fetching from YouTube.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\handlers\youtube.rs:140:58
stack backtrace:
   0:           0x956d8b - backtrace::backtrace::dbghelp::trace::ha09940ef4b8fd9a2 at C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace/dbghelp.rs:88
   1:           0x956d8b - backtrace::backtrace::trace_unsynchronized::h19d7d1b30f96fe6c at C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace/mod.rs:66
   2:           0x956d8b - std::sys_common::backtrace::_print_fmt::hf038dfff95c497df at src\libstd\sys_common/backtrace.rs:78
   3:           0x956d8b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he2295693089d2e8c at src\libstd\sys_common/backtrace.rs:59
   4:           0x98272c - core::fmt::write::h2e7468e40976ea37 at src\libcore\fmt/mod.rs:1076
   5:           0x948429 - std::io::Write::write_fmt::hef3158223e737cb6 at src\libstd\io/mod.rs:1537
   6:           0x95b5c0 - std::sys_common::backtrace::_print::he4a39cb956ba394d at src\libstd\sys_common/backtrace.rs:62
   7:           0x95b5c0 - std::sys_common::backtrace::print::h38d45a7d7a4d1f02 at src\libstd\sys_common/backtrace.rs:49
   8:           0x95b5c0 - std::panicking::default_hook::{{closure}}::hfcc0d2f90e4d71be at src\libstd/panicking.rs:198
   9:           0x95b249 - std::panicking::default_hook::h7e61c8ee936a661d at src\libstd/panicking.rs:217
  10:           0x95bcfd - std::panicking::rust_panic_with_hook::h8b0608bd552a3d13 at src\libstd/panicking.rs:526
  11:           0x95b914 - rust_begin_unwind at src\libstd/panicking.rs:437
  12:           0x97f070 - core::panicking::panic_fmt::h858651244c7bf662 at src\libcore/panicking.rs:85
  13:           0x97efbc - core::panicking::panic::h3d3bbc55f27215e0 at src\libcore/panicking.rs:50
  14:           0x4213aa - <yaydl::handlers::youtube::YouTubeHandler as yaydl::definitions::SiteDefinition>::find_video_direct_url::h7dcd5e8b5dd3862e
  15:           0x41760d - yaydl::main::hec0b5474d3d8845d
  16:           0x404db7 - std::rt::lang_start::{{closure}}::h6bd369ed7d7ed635
  17:           0x95bfbc - std::rt::lang_start_internal::{{closure}}::hcfe58f53feea7233 at src\libstd/rt.rs:52
  18:           0x95bfbc - std::panicking::try::do_call::hc4163588b8559d85 at src\libstd/panicking.rs:348
  19:           0x95bfbc - std::panicking::try::h310a3be58418d841 at src\libstd/panicking.rs:325
  20:           0x95bfbc - std::panic::catch_unwind::h52728a6ebc96df5e at src\libstd/panic.rs:394
  21:           0x95bfbc - std::rt::lang_start_internal::ha1701ac7d300255b at src\libstd/rt.rs:51
  22:           0x419168 - main
  23:           0x4013c7 - _tmainCRTStartup
  24:           0x4014fb - mainCRTStartup
  25:     0x7ff9bb741fe4 - _report_error
  26:     0x7ff9bbd7cb31 - _report_error

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #8 on: November 17, 2020, 01:16 AM »
Yes, it does.
I hope that I find some time this week... thank you.

I’m afraid that the problem with some videos having a bad “base URL” will require some refactoring. I’m not even sure how to fix that.  :huh: But the other two problems look easy to fix...

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #9 on: November 17, 2020, 03:12 AM »
They are not. At least the latter is not.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #10 on: November 17, 2020, 07:41 PM »
Don't forget to sleep and eat well.
 :tellme:

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #11 on: November 17, 2020, 07:54 PM »
I CAN'T! THIS IS IMPORTANT!

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #12 on: November 17, 2020, 08:08 PM »
I CAN'T! THIS IS IMPORTANT!
:tellme: :tellme: ;D ;D ;D ;D ;D

take it easy !!!!!

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #13 on: January 06, 2021, 01:06 PM »
OK, I officially fail to work on this. But VOE.sx is supported now! Version 0.3.0 attached above. :)

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #14 on: January 06, 2021, 02:55 PM »
You slept as ordered.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #15 on: January 06, 2021, 03:18 PM »
BUT I HAVE NOT EATEN!

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #16 on: January 08, 2021, 06:01 AM »
Good rest
Good food
Good love

Three things are importangt in life :
rest = health
food = money
Love is love
 :-* :P

Happy New Year Tuxman
Best Regards


wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #17 on: January 08, 2021, 07:28 AM »
Another one for you -

> yaydl "https://www.youtube..../watch?v=bS4Q-WWyl3Q" --only-audio
Fetching from YouTube.
thread 'main' panicked at 'Could not find ffmpeg - no processing is done.: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\ffmpeg.rs:34:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


Checking the source I see that you're just using the system's ffmpeg - should probably be listed as a requirement above.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #18 on: January 08, 2021, 07:40 AM »
Also found some more relative url without a base, but you know that already :(

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #19 on: January 08, 2021, 09:42 AM »
Stop it!   >:(

Well, yes, it should... but at least it tells you what’s wrong!
I modified the system requirements above. I’m not quite sure about a better method yet. Ideas?
« Last Edit: January 08, 2021, 05:10 PM by Tuxman »

IQLover

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 48
  • created in PS 4
    • View Profile
    • Lbry
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #20 on: January 11, 2021, 07:18 AM »
Won't run @ 32bit Win7  >:(

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #21 on: January 11, 2021, 07:18 AM »
Why not?

IQLover

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 48
  • created in PS 4
    • View Profile
    • Lbry
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #22 on: January 11, 2021, 07:26 AM »
It say something like it is NOT designed for 32bit system
https://i.imgur.com/GQw17fF.jpg

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,508
    • View Profile
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #23 on: January 11, 2021, 08:53 AM »
Ah, the precompiled binary. Yes, might well be. Have you tried installing it from Cargo?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2021: yaydl
« Reply #24 on: March 02, 2021, 11:10 PM »
Wanted to say thanks for this.. My first installed Rust app, was pretty painless and it worked great!