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

bestvideo+bestaudio formats says "requested format not available" #7910

Closed
forthrin opened this issue Dec 19, 2015 · 13 comments
Closed

bestvideo+bestaudio formats says "requested format not available" #7910

forthrin opened this issue Dec 19, 2015 · 13 comments

Comments

@forthrin
Copy link

@forthrin forthrin commented Dec 19, 2015

Posting a couple of related issues that should be fixed.

Issue 1: When not specifying any format options, Flash Video is downloaded from this site, though MPEG-4 is available. MPEG-4 is clearly superior and should be default.

youtube-dl https://tv.nrk.no/serie/historia-om-walt-disney/KOID24008615/sesong-1/episode-1

Issue 2: When trying to select best video/audio to get the best quality (MPEG-4 with highest bitrate), an error occurs. This seems like a bug that should be fixed.

youtube-dl -f bestaudio+bestvideo https://tv.nrk.no/serie/historia-om-walt-disney/KOID24008615/sesong-1/episode-1
ERROR: requested format not available

Formats on this site are named according to bitrate (eg. hls-2389 for 2389k). Bitrate varies per video. Since bestvideo doesn't work, the best quality must be manually found with -F per video. Annoying.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

bestvideo and bestaudio are video-only and audio-only formats correspondingly. NRK serves no such formats therefore you get requested format not available.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

As for issue 1, preferring hls over hds is questionable and they are both of the same quality.

@dstftw dstftw closed this Dec 19, 2015
@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

I thought the .flv file was some sort of Flash video codec, men I realise now that the .flv file contains h264 video. However, how do I get the file with a .mp4 wrapper/extension rather than .flv?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

Use --recode-video mp4.

@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

The above does a full re-encoding of the video, which eats 100% CPU and takes forever. How can I do the equivalent of the following (which takes but a second) from youtube-dl itself.

ffmpeg -i video.flv -codec copy video.mp4
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

You can't do it with option but can run arbitrary command on final file using --exec 'ffmpeg -i {} -c copy video.mp4'.

@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

Flash being a dying and much-loathed technology, I propose .mp4 to be a better default container and file extension. Can't see why anyone would prefer .flv.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

There is no such thing as a default container. youtube-dl downloads files as is. User decides what to do next.

@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

By specifying mp4 from available formats, it downloads mp4 directly without flv as an intermediate format. However, it isn't possible without specifying the format manually like mentioned earlier:

$ youtube-dl -F https://tv.nrk.no/serie/oeyeblikket/DMPV73050115/sesong-1/episode-1
hls-2229     mp4        1280x720   2229k , avc1,  mp4a
$ youtube-dl -f hls-2229 https://tv.nrk.no/serie/oeyeblikket/DMPV73050115/sesong-1/episode-1
[download] Destination: Oppvasken-DMPV73050115.mp4

I still think there should be some intelligent way to get the mp4 format. I can come up with some suggestions, but I guess the developers who know the product by heart would be better at this.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

There is an intelligent way. -f best[ext=mp4] or even shorter -f mp4.

@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

Previous responses seemed to hint that this was impossible. Thanks for letting me know a shorthand way of getting the preferred format. PS! I still think mp4 would be a considered as a better default than flv.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 19, 2015

You asked how to extract mp4 from flv - you've got responses on that. With format selection you simply download mp4 (delivered via hls) instead of flv (delivered via hds). mp4 should not be default until native hls downloader is well enough to handle all kind of m3u8 streams.

@forthrin
Copy link
Author

@forthrin forthrin commented Dec 19, 2015

Sounds like it will be fixed in the future then. Evidently a bit of knowledge on formats and how the software is implemented is required to get the full picture of things :) Thanks!

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
2 participants
You can’t perform that action at this time.