Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow merging extracted tracks #11347
Comments
|
Hi, if you use m4a, it will automatically select best audio, bestvideo will d the same, what ever the format. so for you: this should select 299 for video and 140 if you want the audio of 22, i am afraid, you will have to download: i don't think you can do it it one command, but there is also an opition to extract audio: |
|
then ask ffmpeg to extract audio from 22, then ask ffmpeg to merge extracted audio into 299 |
|
well according to ffmpeg user guide, something like that: |
|
And if you ask then how to merge the extracted audio and 299 video then do:
You will get a 1080p60fps with mp4a.40.2@192k with any quality lose because we only copy or extract file into/from container |
|
iMrQuake - Many thanks for such wonderful help!:) I'm taking 1st file with 137+140 flags (fullhd with 128kbps m4a audio , as it seems), right after that I'm taking 2nd file with 22 flag, and when I am trying to rip audio from that video.22.mp4 - I see THIS: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from somevideo.mp4': And I wonder. Y-DL clearly shows me that "22" is 192kbps audio, now ffmpeg telling me that m4a track inside that "22" .mp4 is not 192kbps, but 128kbps ...yet VLC is showing that audio in this .mp4 is 128kbps... what's the catch ? |
|
to be sure, you can ask ffprobe thats why now, i just download format individualy, and i merge them later with ffmpeg or mkvtoolnix |
|
if you want, what you can do is:
|
|
Let's do it in you video use case ( i know your lusic stle now ;)))) ) Then ask format, you can cancel the download from ffmpeg (yes, it can download) & add the double quote for the url: Will give you:
So you can see all the details of the "true" file format hosted do the same with format 140 Now you have all the tool to do your stuff |
|
22 : Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default) |
|
maybe we don't have same version of tools, but you have all you need to build your files now. u r right i got this (maybe was one of my video ;) ): but same principal, you do have the real spec of the file to be downloaded:
you can use it will not download |
|
So, the main "concept" is to run ffmpeg -i url every time with hope that there will be pure pcm stream/192kbps m4a, right?;) Anyway, I've never seen pcm 1411 in -f 22 until this time, you said, and - can you, please, provide real URL with this one? |
|
forget about pcm for you video, it was a error from me, but as explain, if you read all post, you have all you need to do your stuff ! if the format is good for you than download the file if the format in video is better than dash audio, then download video and extract audio withh ffmpeg, or use extract-audio from youtube-dl. |
|
iMrQuake, thanks! But still I wonder - if there any real 192kbps m4a audio in format 22, or it is always 128kbps with wrong 192kbps label... |
|
i cannot tell, we anyway, we dont know the original format of the source, maybe the file is just upscaled by youtube.com, for me it is just a "target format", no sure if it is the real format. Only youtube can tell you, but this would means also, that all people are uplaoding this source format, and it is not the case, so your file is for sur a result of automatic conversion from youtube, and conversion means no lossless here |
As @iMrQuake said, currently you need to do that manually with ffmpeg. I guess it would be great to have an option in youtube-dl for this, so I mark this issue as a request.
For format 22 and other formats with both video and autio tracks, the bitrate value is not reliable. YouTube does not provide bitrate information for such formats, and the number is a guessed value from previous downloaded samples. You can find more guessed values in this table |
Hello dear authors, gurus. I have small Q:
What we have here -
format code extension resolution note
249 webm audio only DASH audio 53k , opus @ 50k (48000Hz), 4.51MiB
250 webm audio only DASH audio 75k , opus @ 70k (48000Hz), 5.20MiB
171 webm audio only DASH audio 118k , vorbis@128k (44100Hz), 8.02MiB
140 m4a audio only DASH audio 128k , m4a_dash container, mp4a.40.2@128k (44100
Hz), 11.56MiB
251 webm audio only DASH audio 146k , opus @160k (48000Hz), 9.51MiB
160 mp4 256x144 DASH video 114k , avc1.4d400c, 30fps, video only, 10.11MiB
278 webm 256x144 DASH video 117k , webm container, vp9, 30fps, video only, 8
.69MiB
242 webm 426x240 DASH video 248k , vp9, 30fps, video only, 19.69MiB
133 mp4 426x240 DASH video 253k , avc1.4d4015, 30fps, video only, 22.33MiB
243 webm 640x360 DASH video 452k , vp9, 30fps, video only, 36.37MiB
134 mp4 640x360 DASH video 638k , avc1.4d401e, 30fps, video only, 53.72MiB
244 webm 854x480 DASH video 836k , vp9, 30fps, video only, 67.12MiB
135 mp4 854x480 DASH video 1165k , avc1.4d401f, 30fps, video only, 102.34MiB
247 webm 1280x720 720p 1717k , vp9, 30fps, video only, 134.38MiB
136 mp4 1280x720 720p 2344k , avc1.4d401f, 30fps, video only, 203.90MiB
302 webm 1280x720 DASH video 2915k , vp9, 60fps, video only, 232.22MiB
248 webm 1920x1080 1080p 3139k , vp9, 30fps, video only, 238.95MiB
298 mp4 1280x720 DASH video 3493k , avc1.4d4020, 60fps, video only, 289.88MiB
137 mp4 1920x1080 1080p 4623k , avc1.640028, 30fps, video only, 384.84MiB
303 webm 1920x1080 DASH video 5095k , vp9, 60fps, video only, 394.73MiB
299 mp4 1920x1080 DASH video 6001k , avc1.64002a, 60fps, video only, 510.46MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)
-- 299 is the best video-only track, yet 140 is audio-only track 128kbps, AND - 22 is the video+audio, with audio 192kbps. Please tell me, how to "rip" audio from 22 and combine it with 299 (as usual -f n+n) into one .mp4 ?
Thanks in advance !