Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg sometimes get called unnecessarily #4846

Closed
msliczniak opened this issue Feb 2, 2015 · 14 comments
Closed

ffmpeg sometimes get called unnecessarily #4846

msliczniak opened this issue Feb 2, 2015 · 14 comments

Comments

@msliczniak
Copy link

@msliczniak msliczniak commented Feb 2, 2015

Essentially I use -f 141 in a script but now youtube-dl does this:

[download] 100% of 24.61MiB in 00:00
[ffmpeg] Correcting container in

It's a waste of time cause my script then calls ffmpeg two more times piping the output into sox before then calling ffmpeg a final time where I fix it anyway.

There should be an option so youtube-dl never calls anything like ffmpeg or AtomicParsley. Maybe there already is? The first one in my PATH is not always the right one anyway. For example I had a version of ffmpeg recently that would crash unless I passed the fix_iods option as well.

@msliczniak
Copy link
Author

@msliczniak msliczniak commented Feb 2, 2015

I just tested, this solves it, will update my script, still think there should be an option to prevent youtube-dl being too smart for it's own good:

PATH='' ~/bin/youtube-dl -f 141 ...

It gives a warning though then:

... writing DASH m4a. Only some players support this container. Install ffmpeg or avconv to fix this automatically.

@msliczniak
Copy link
Author

@msliczniak msliczniak commented Feb 2, 2015

Oh you might want the version: 2015.02.02

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Feb 2, 2015

You can add --fixup never to the command line (or to your configuration file). It could be the default, but there are popular players that don't support the original file.

@jaimeMF jaimeMF closed this Feb 2, 2015
@msliczniak
Copy link
Author

@msliczniak msliczniak commented Feb 2, 2015

Thank you Jaime, I did not know the option and really appreciate it.

@msliczniak
Copy link
Author

@msliczniak msliczniak commented Jun 1, 2015

It started doing it again even though I use --fixup never for example in this case 2015.05.20:

youtube-dl -F 'https://www.youtube.com/watch?v=Q-6_DrPT9OU'
[youtube] Q-6_DrPT9OU: Downloading webpage
[youtube] Q-6_DrPT9OU: Extracting video information
[youtube] Q-6_DrPT9OU: Downloading DASH manifest
[info] Available formats for Q-6_DrPT9OU:
format code extension resolution note
249 webm audio only DASH audio , opus @ 50k
250 webm audio only DASH audio , opus @ 70k
251 webm audio only DASH audio , opus @160k
140 m4a audio only DASH audio 129k , m4a_dash container, aac @128k (44100Hz), 6.56MiB
171 webm audio only DASH audio 162k , audio@128k (44100Hz), 6.29MiB
141 m4a audio only DASH audio 255k , m4a_dash container, aac @256k (44100Hz), 13.02MiB
278 webm 256x144 DASH video 100k , webm container, VP9, 12fps, video only, 3.56MiB
160 mp4 256x144 DASH video 112k , 12fps, video only, 5.48MiB
133 mp4 426x240 DASH video 248k , 24fps, video only, 12.29MiB
242 webm 426x240 DASH video 253k , 24fps, video only, 6.77MiB
243 webm 640x360 DASH video 449k , 24fps, video only, 12.71MiB
134 mp4 640x360 DASH video 604k , 24fps, video only, 18.16MiB
244 webm 854x480 DASH video 772k , 24fps, video only, 21.59MiB
135 mp4 854x480 DASH video 1111k , 24fps, video only, 37.84MiB
247 webm 1280x720 DASH video 1554k , 24fps, video only, 44.54MiB
136 mp4 1280x720 DASH video 2219k , 24fps, video only, 75.92MiB
248 webm 1920x1080 DASH video 2849k , 24fps, video only, 85.72MiB
137 mp4 1920x1080 DASH video 4261k , 24fps, video only, 162.86MiB
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360
22 mp4 1280x720 (best)

-f 22 is marked best, I expect that one to get pulled down. Instead -f 137 and -f 141 get downloaded in that order and then merged with ffmpeg.

Is there some option or configuration I am missing to prevent commands outside of youtube-dl from being called? --fixup never had restored the behavior I liked for some time now.

Thanks

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 1, 2015

Read the last two paragraphs in the FORMATS SELECTION section

@msliczniak
Copy link
Author

@msliczniak msliczniak commented Jun 1, 2015

Thank you again Jaime, I had noticed that but the problem is that I have scripts that use an unwieldy -f ../../../.. parameter, but some don't. If I add now -f best or -f ../../../best to all of them, what happens if I pass another -f on the commandline to my script? That's a lot of smarts to add to bourne shell :( Maybe multiple -f options are honored in order?

I really do think there should simply be an option to never under any circumstance call an external program such as ffmpeg or AtomicParsley like I requested originally in this issue.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 1, 2015

The last -f in the command line is picked, the previous are ignored.

I really do think there should simply be an option to never under any circumstance call an external program such as ffmpeg or AtomicParsley like I requested originally in this issue.

If -f best is not enough, feel free to open a new issue.

@msliczniak
Copy link
Author

@msliczniak msliczniak commented Jun 1, 2015

I just tried this and it works:

PATH='' ~/bin/youtube-dl 'https://www.youtube.com/watch?v=Q-6_DrPT9OU'

I'll adjust my scripts to unset PATH. It seems in this way it'll work long term.

Thank you again for your time and quick reply.

@marcusmuller
Copy link

@marcusmuller marcusmuller commented Apr 18, 2018

Hi. How do I choose a resolution or the best of all with the -F command? Only resolutions are listed for me, but I do not know how to choose.

c:>youtube-dl.exe -F -u user@gmail.com -p password -o "C:\Users\Adm\Videos%(playlist_index)s - %(title)s.%(ext)s" --fixup never --all-subs --external-downloader aria2c.exe https://globoplay.globo.com/v/6670684/programa/
[Globo] 6670684: Downloading JSON metadata
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_90_720_m3u8
[Globo] 5ad6986b636d61e45f000000_90_720_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_90_720_l_m3u8
[Globo] 5ad6986b636d61e45f000000_90_720_l_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_l_m3u8
[Globo] 5ad6986b636d61e45f000000_360_1080_l_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_m3u8
[Globo] 5ad6986b636d61e45f000000_360_1080_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_mpd
[info] Available formats for 6670684:
format code extension resolution note
http-5ad6986b636d61e45f000000_360_1080_mpd mpd unknown
hls-65 mp4 160x90 65k , avc1.64001E@ 45k, mp4a.40.2@ 16k
hls-116 mp4 160x90 116k , avc1.64001E@ 45k, mp4a.40.2@ 64k
hls-247 mp4 426x240 247k , avc1.64001E@ 201k, mp4a.40.2@ 32k
hls-281 mp4 426x240 281k , avc1.64001E@ 201k, mp4a.40.2@ 64k
hls-495-0 mp4 640x360 495k , avc1.64001E@ 402k, mp4a.40.2@ 64k
hls-495-1 mp4 640x360 495k , avc1.64001E@ 402k, mp4a.40.2@ 64k
hls-700 mp4 640x360 700k , avc1.64001E@ 644k, mp4a.40.2@ 16k
hls-751-0 mp4 640x360 751k , avc1.64001E@ 644k, mp4a.40.2@ 64k
hls-751-1 mp4 640x360 751k , avc1.64001E@ 644k, mp4a.40.2@ 64k
hls-751-2 mp4 640x360 751k , avc1.64001E@ 644k, mp4a.40.2@ 64k
hls-1103 mp4 854x480 1103k , avc1.64001F@1008k, mp4a.40.2@ 32k
hls-1137-0 mp4 854x480 1137k , avc1.64001F@1008k, mp4a.40.2@ 64k
hls-1137-1 mp4 854x480 1137k , avc1.64001F@1008k, mp4a.40.2@ 64k
hls-1137-2 mp4 854x480 1137k , avc1.64001F@1008k, mp4a.40.2@ 64k
hls-2165-0 mp4 1280x720 2165k , avc1.64001F@1978k, mp4a.40.2@ 64k
hls-2165-1 mp4 1280x720 2165k , avc1.64001F@1978k, mp4a.40.2@ 64k
hls-2165-2 mp4 1280x720 2165k , avc1.64001F@1978k, mp4a.40.2@ 64k
hls-2165-3 mp4 1280x720 2165k , avc1.64001F@1978k, mp4a.40.2@ 64k (best)

@Hrxn
Copy link

@Hrxn Hrxn commented Apr 19, 2018

With -f and the format code, i.e. -f hls-2165-3

@marcusmuller
Copy link

@marcusmuller marcusmuller commented Apr 19, 2018

Don't work

@Hrxn
Copy link

@Hrxn Hrxn commented Apr 19, 2018

With a small "F".... -f

And mind your account credentials please..

@marcusmuller
Copy link

@marcusmuller marcusmuller commented Apr 19, 2018

THANKS! Work now! :D

c:>youtube-dl.exe -f hls-2165-3 -u user@gmail.com -p password -o "C:\Users\Adm\Videos%(playlist_index)s - %(title)s.%(ext)s" --fixup never --all-subs --external-downloader aria2c.exe https://globoplay.globo.com/v/6670684/programa/
[Globo] 6670684: Downloading JSON metadata
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_90_720_m3u8
[Globo] 5ad6986b636d61e45f000000_90_720_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_90_720_l_m3u8
[Globo] 5ad6986b636d61e45f000000_90_720_l_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_l_m3u8
[Globo] 5ad6986b636d61e45f000000_360_1080_l_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_m3u8
[Globo] 5ad6986b636d61e45f000000_360_1080_m3u8: Downloading m3u8 information
[Globo] 6670684: Downloading security hash for 5ad6986b636d61e45f000000_360_1080_mpd
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 12
[download] Destination: C:\Users\Adm\Videos\NA - Juvenal e Desirée planejam o casamento.mp4
[download] 100% of 29.69MiB in 00:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.