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

Recording flv into mp4, but not recoding mkv #6185

Open
keybounce opened this issue Jul 9, 2015 · 3 comments
Open

Recording flv into mp4, but not recoding mkv #6185

keybounce opened this issue Jul 9, 2015 · 3 comments
Labels

Comments

@keybounce
Copy link

@keybounce keybounce commented Jul 9, 2015

I want to be able to record flv files into mp4.

So far, I have used this script:

#!/bin/bash
# Usage: youtube-480 url
youtube-dl -f "bestvideo[height<=480][ext=mp4]+bestaudio/[height <=? 480]" --write-sub --recode-video mp4 "$@"

But I discovered recently that if it is fetching a .mkv file (I think it was from vimeo), then it spends forever in ffmpeg trying to convert it.

I'd like to say "Convert a .flv file to .mp4".
I have no problem working with a .mkv instead.

How would I do that?

@jaimeMF jaimeMF added the request label Jul 9, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 9, 2015

mkv is most likely from youtube, and you are getting it due to bestvideo happens to be mp4 and bestaudio - webm. Those can't be merged into mp4 therefore merged into mkv. You may want to force bestaudio to m4a to avoid webm at all: -f bestvideo[height<=480][ext=mp4]+bestaudio[ext=m4a]/[height<=?480].

@keybounce
Copy link
Author

@keybounce keybounce commented Jul 9, 2015

That will work, thank you.

I thought webm was a browser-based video playback alternative to flash? Did I mis-understand what it is?

@nwgat
Copy link

@nwgat nwgat commented Nov 15, 2015

i noticed youtube can be a little nuts these days, some videos are vp9, vp8 or h264 and they might have opus, vorbis, mp3 or aac (m4a/mp4a) audio so the best container to save youtube is to use mkv, webm is only vp8/vp9 and vorbis/opus, mp4 is only h264 and aac (m4a/mp4a)

the best codecs on youtube these days are

  1. VP9
  2. AVC aka H.264
  3. VP8

1 Vorbis (audio)
2. Opus (audio)

so if the source is only in webm (vp9 and opus audio) it wont mux into mp4
you can force youtube-dl to download another profile that works for mp4 container, perhaps youtube just reencoded the audio from opus to aac

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.