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

[Bug] Expected opus output with --itag 251 (opus codec), has m4a video container/extension. #4

Open
Disonantemus opened this issue Apr 19, 2024 · 3 comments

Comments

@Disonantemus
Copy link

From documentation, to download opus format, I have to use flag --itag 251, like this:

$ shiradl --overwrite --itag 251 aN9_RkCGzGM
$ ls YouTube\ Music/TPぼん』予告編/
Netflix.m4a

But resulting file has an m4a extension. I was expecting opus extension (or maybe webm/mkv/ogg, in that order), maybe m4a as a container can have opus inside, but it's the 1st time that I see that.

If I check the filetype, says video/mp4:

$ xdg-mime query filetype YouTube\ Music/TPぼん』予告編/Netflix.m4a
video/mp4

Resulting file is a video mime type, then, is a video mp4 container. Using defaults (without --itag 251) you get an audio mime type: audio/x-m4a, that is expected for AAC codec.


Checking streams:

$ ffprobe YouTube\ Music/TPぼん』予告編/Netflix.m4a 2>&1 | grep Stream
  Stream #0:0[0x1](eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp, 115 kb/s (default)
  Stream #0:1[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1280x1280 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)

Resulting file is indeed an opus stream.

If I do extract stream to have an opus extension/container:

$ ffmpeg -v -y -i Netflix.m4a -c copy output.opus
$ xdg-mime query filetype kk.opus
audio/ogg

Now resulting file is indeed and audio mime type and container, but the expected thumbnail (image) is gone.

Maybe I can export the image and then use something like opustags to include in the opus file, but the idea of shira is to do all this friction less ("with little effort"), and now for opus output, is not doing that.

@KraXen72
Copy link
Owner

I'll investigate and fix this. Thanks for reporting.

@KraXen72
Copy link
Owner

@Disonantemus can you please provide the youtube link you've used? I had some problems with some links not having opus, and it seems your link has it.

@Disonantemus
Copy link
Author

@Disonantemus can you please provide the youtube link you've used? I had some problems with some links not having opus, and it seems your link has it.

Is there in the topic: aN9_RkCGzGM

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

No branches or pull requests

2 participants