WordRider Home
Welcome! Log In Create A New Profile

Advanced

(Updated) About YouTube 1080p and 480p ...

Posted by affter333 
(Updated) About YouTube 1080p and 480p ...
October 30, 2013 08:36PM
Hi,

The youtube plugin works, but

It doesn't download YouTube 1080p or 480p since

Youtube seperates the mp4 stream into 2 parts (audio & video) for 1080p & 480p

The plugin now must download 2 parts and then do multiplexing

Any chance of doing this ?

It's a shame that freerapid don't download 1080p & 480p anymore..

PS: I now use Kotato youtube downloader which can get both format, so it's feasible...

=========================================================

Here's some new youtube parameters for developers...

(extracted from a javascript file for youtube downloading)

fmt_str[0] = '(FLV, 320 x 240, Mono 22KHz MP3)'; // delete ?
fmt_str[5] = '(FLV, 400 x 240, Mono 44KHz MP3)';
fmt_str[6] = '(FLV, 480 x 360, Mono 44KHz MP3)'; // delete ?
fmt_str[34] = '(FLV, 640 x 360, Stereo 44KHz AAC)';
fmt_str[35] = '(FLV, 854 x 480, Stereo 44KHz AAC)';

fmt_str[13] = '(3GP, 176 x 144, Stereo 8KHz)'; // delete ?
fmt_str[17] = '(3GP, 176 x 144, Stereo 44KHz AAC)';
fmt_str[36] = '(3GP, 320 x 240, Stereo 44KHz AAC)';

fmt_str[18] = '(MP4(H.264), 640 x 360, Stereo 44KHz AAC)';
fmt_str[22] = '(MP4(H.264), 1280 x 720, Stereo 44KHz AAC)';
fmt_str[37] = '(MP4(H.264), 1920 x 1080, Stereo 44KHz AAC)';
fmt_str[38] = '(MP4(H.264), 4096 x 3072, Stereo 44KHz AAC)';
fmt_str[83] = '(MP4(H.264), 854 x 240, Stereo 44KHz AAC)';
fmt_str[82] = '(MP4(H.264), 640 x 360, Stereo 44KHz AAC)';
fmt_str[85] = '(MP4(H.264), 1920 x 520, Stereo 44KHz AAC)';
fmt_str[84] = '(MP4(H.264), 1280 x 720, Stereo 44KHz AAC)';

fmt_str[43] = '(WebM(VP8), 640 x 360, Stereo 44KHz Vorbis)';
fmt_str[44] = '(WebM(VP8), 854 x 480, Stereo 44KHz Vorbis)';
fmt_str[45] = '(WebM(VP8), 1280 x 720, Stereo 44KHz Vorbis)';
fmt_str[100] = '(WebM(VP8), 640 x 360, Stereo 44KHz Vorbis)';
fmt_str[101] = '(WebM(VP8), 854 x 480, Stereo 44KHz Vorbis)';
fmt_str[46] = '(WebM(VP8), 1920 x 540, Stereo 44KHz Vorbis)';
fmt_str[102] = '(WebM(VP8), 1280 x 720, Stereo 44KHz Vorbis)';

fmt_str[133] = '(MP4(H.264), 426 x 240, no audio)';
fmt_str[134] = '(MP4(H.264), 640 x 360, no audio)';
fmt_str[135] = '(MP4(H.264), 854 x 480, no audio)';
fmt_str[136] = '(MP4(H.264), 1280 x 720, no audio)';
fmt_str[137] = '(MP4(H.264), 1920 x 1080, no audio)';
fmt_str[139] = '(M4A, 48 kbit/s audio only)';
fmt_str[140] = '(M4A, 128 kbit/s audio only)';
fmt_str[141] = '(M4A, 256 kbit/s audio only)';
fmt_str[160] = '(MP4(H.264), 256 x 144, no audio)';
fmt_str[264] = '(MP4(H.264), 1920 x 1080, no audio)';



=========================



Edited 7 time(s). Last edit at 10/31/2013 11:23AM by affter333.
Re: (Updated) About YouTube 1080p and 480p ...
November 03, 2013 03:30PM
Thanks for the detailed report smiling smiley

With a bit hack I think it's possible to download 2 separate youtube streams (audio and video). The problem is to multiplex the streams, we'll have to use external program : ffmpeg, avconv or others, which currently is not supported. There is discussion to bundle ffmpeg : [wordrider.net] , maybe we (devs) should rethink about this ?
Re: (Updated) About YouTube 1080p and 480p ...
April 27, 2014 11:01PM
To devs:
I've just made a branch on youtube plugin with initial DASH support.

I managed to multiplex the streams using avconv with this command :
avconv -i file.m4v -i file.m4a -c copy file.mp4
I haven't tested with ffmpeg yet.
Re: (Updated) About YouTube 1080p and 480p ...
April 28, 2014 10:13PM
I decided to make a proper commit into the trunk. And released plugin v2.3.0 with DASH streams support. DASH streams are disabled by default, you can enable it through plugin option.



How to multiplex DASH video and audio streams :
1. Install the latest ffmpeg. You can get it here for Windows, for other OSes look at here.
2. The easier way is adding your ffmpeg installation path to your OS' environment variable, that way you don't have to type the full ffmpeg installation path in the later command.
3. Open terminal/console from the directory where you store the downloaded DASH files.
4. Type this command in the terminal/console:
ffmpeg -i "fileA.m4v" -i "fileA.m4a" -acodec copy -vcodec copy "fileA.mp4"

or if you haven't set the ffmpeg installation path to you OS' environment variable :
[YOUR_FFMPEG_INSTALLATION_PATH]\ffmpeg.exe -i "fileA.m4v" -i "fileA.m4a" -acodec copy -vcodec copy "fileA.mp4"

for example :
C:\ffmpeg\ffmpeg.exe -i "fileA.m4v" -i "fileA.m4a" -acodec copy -vcodec copy "fileA.mp4"

fileA is just an example.

Note that I only tested with avconv/libav, I haven't tested with ffmpeg, but I think it's the same way.

Let us know how it goes. As usual questions, suggestions, bug reports, feature requests, etc are welcome.

Cheers.



Edited 1 time(s). Last edit at 04/28/2014 10:18PM by tong2shot.
Re: (Updated) About YouTube 1080p and 480p ...
April 29, 2014 07:14AM
thumbs upthumbs up

-------------------------------------

Re: (Updated) About YouTube 1080p and 480p ...
April 30, 2014 10:52PM
Fantasic !! Thanks !!

Now what we need is a small app that search directory and create a batch file
for merging (*.m4v + *.m4a), automatically.

It's too tiresome if you have 50 videos to type :)



Edited 2 time(s). Last edit at 04/30/2014 11:01PM by affter333.
Re: (Updated) About YouTube 1080p and 480p ...
May 01, 2014 09:36AM
I wonder how difficult it is to multiplex the video and audio together. The MPEG4 format is pretty simple (see e.g. video2audio or adobehds plugin), but the timestamps could be tricky to get right.
Re: (Updated) About YouTube 1080p and 480p ...
May 02, 2014 07:12PM
shouldn't be difficult if you have the right documentation..

or go ask some video gurus/geeks at http:// forum.doom9.org/



Edited 1 time(s). Last edit at 05/02/2014 07:14PM by affter333.
Re: (Updated) About YouTube 1080p and 480p ...
May 24, 2014 02:04AM
I've just committed YouTube plugin that supports native DASH streams multiplexer, along with mp4parser and updated video2audio and saavn.

I haven't upload the plugins (binary) to plugin repository.

mp4parser plugin uses aspectj, therefore it needs to be compiled using aspectj compiler. Documentation on how to make mp4parser distribution can be found in 'Build readme' file in mp4parser directory.

mp4parser is not trimmed yet, so it is huge one eye popping smiley

Binary release of plugins :

Updated



Edited 1 time(s). Last edit at 05/26/2014 10:44AM by tong2shot.
Re: (Updated) About YouTube 1080p and 480p ...
May 24, 2014 08:48PM
Got a fatal error when m4a (first) m4v(later) downloads are finished
the mp4 is 0 size, meaning something crashed when start doing mergin..

the sencond try, m4a is downloaded after m4v is finished,
but m4a never finishes download it keep showing error at 100% and restart download.
Sorry, only registered users may post in this forum.

Click here to login