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

Use the m4v extension for Dash video files #1808

Open
Cycor opened this issue Nov 22, 2013 · 11 comments
Open

Use the m4v extension for Dash video files #1808

Cycor opened this issue Nov 22, 2013 · 11 comments
Labels

Comments

@Cycor
Copy link

@Cycor Cycor commented Nov 22, 2013

When downloading files I usually add a bunch of types, so i'm sure i'm at least downloading something.

youtube-dl --no-overwrites --restrict-filenames --ignore-errors -o "./%(uploader_id)s/%(upload_date)s %(uploader)s - %(title)s.%(ext)s" -f 137/136/135/134/133/38/37/22/18/17
youtube-dl --no-overwrites --restrict-filenames --ignore-errors -o "./%(uploader_id)s/%(upload_date)s %(uploader)s - %(title)s.%(ext)s" -f 141/140/139

The problem i'm running into is that I have to join the mp4/m4a Dash files to get a complete video, now in most cases this will produce a video only mp4 and a audio m4a.

In some cases this produces a lower quality "normal" mp4 file ( when Dash isn't available ), now i have no easy way to recognize Dash files.

so a simple change would be to change the extension of the Dash video files to mp4v

ps. My original suggestion would be m4v since we already got m4a but it seems Apple uses this format.

@rbrito
Copy link
Contributor

@rbrito rbrito commented Nov 26, 2013

I think that, for the sake of consistency with my previous patch, your request makes a lot of sense...

That is, since we already gave in with the m4a thing, using m4v for the video only would be reasonable to avoid name conflicts and would be a clear indication that those contain only the video (that's a different convention from what apple uses, but it suits better this split-personality thing world).

@ghost
Copy link

@ghost ghost commented Jan 4, 2014

We should be using .mp4 for both the DASH video and audio files.

@rbrito
Copy link
Contributor

@rbrito rbrito commented Jan 5, 2014

@svnpenn, strictly speaking, you are correct that it is wrong to use extensions like .m4a and .m4v (and others, like .m4b for audiobooks, .m4p for DRM-encumbered content, etc.).

Unfortunately, given the real world usage, this is one method to disambiguate the downloads that we now have to perform in separate, so that we know if we have only audio, only video or if we have both already muxed.

I am going to copy this same answer, for the sake of documentation, to issue #1808.

@montanaflynn
Copy link

@montanaflynn montanaflynn commented Mar 22, 2017

We need some way to tell youtube-dl to not use dash videos, I don't know of anyway currently but having the ext selector would do the job.

$ youtube-dl -f '18/best[ext=mp4]'

@montanaflynn montanaflynn mentioned this issue Mar 22, 2017
4 of 8 tasks complete
@Saklad5
Copy link

@Saklad5 Saklad5 commented May 15, 2017

macOS treats m4v files differently than mp4 files for some reason. It will parse more metadata, such as the artist field, if the extension is .m4v. This is extremely important when searching for files, so I’ve changed my personal script to rename mp4 files to m4v after downloading them with youtube-dl.

For obvious reasons, I think it would be better to have the option in youtube-dl to use m4v from the start. Since the extension is identical to mp4, it should be trivial to change.

I’ve tried changing it myself, but I’m clearly missing something about the way the post-processing is coded. It should be easy for anyone that understands that though, from what I can tell.

@Saklad5
Copy link

@Saklad5 Saklad5 commented May 15, 2017

I’ve tried. Oddly enough, that ends up producing a file ending with .m4v.mp4. Not exactly what I’m looking for.

@Saklad5
Copy link

@Saklad5 Saklad5 commented May 15, 2017

@svnpenn Yeah, that clearly isn’t intended behavior. If it was, we wouldn’t have the %(ext)s. placeholder. Again, I suspect the post-processing code is to blame.

@ghost
Copy link

@ghost ghost commented May 15, 2017

@Saklad5 you might want to check your version. I just tested this and it is not working as you say:

$ youtube-dl -f 140 --output example.m4v JkpT-xiSTBE
[download] Destination: example.m4v
[ffmpeg] Correcting container in "example.m4v"
$ youtube-dl -f 140 --output '%(title)s.m4v' JkpT-xiSTBE
[download] Destination: For Marmish.m4v
[ffmpeg] Correcting container in "For Marmish.m4v"
@Saklad5
Copy link

@Saklad5 Saklad5 commented May 15, 2017

Sorry, I may have forgotten to mention that I’m using the --recode-video mp4 argument. That’s the post-processing I’m talking about.

@ghost
Copy link

@ghost ghost commented May 15, 2017

@Saklad5 sorry, I am done here. I dont deal with moving goalpost. You on your own.

@Saklad5
Copy link

@Saklad5 Saklad5 commented May 15, 2017

@svnpenn Fair enough. Sorry for the confusion.

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.