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

audio/webmvideo/webmの区別ができていない #13565

Closed
1 task
kakkokari-gtyih opened this issue Mar 12, 2024 · 7 comments · Fixed by #13568
Closed
1 task

audio/webmvideo/webmの区別ができていない #13565

kakkokari-gtyih opened this issue Mar 12, 2024 · 7 comments · Fixed by #13568
Labels
⚠️bug? This might be a bug

Comments

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Mar 12, 2024

💡 Summary

両方video/webm扱いになる

🥰 Expected Behavior

音声トラックしかない場合はaudio/webmになる

🤬 Actual Behavior

両方video/webm扱いになる

📝 Steps to Reproduce

  1. 音声トラックだけのwebmファイルをアップロードする
  2. APIからmimeタイプを確認する

💻 Frontend Environment

N/A

🛰 Backend Environment (for server admin)

N/A

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@kakkokari-gtyih kakkokari-gtyih added the ⚠️bug? This might be a bug label Mar 12, 2024
@mei23
Copy link
Contributor

mei23 commented Mar 12, 2024

https://www.webmproject.org/docs/container/

Audio-only files SHOULD have a mime of "audio/webm"

まずaudio/webm など対応してない模様
https://github.com/sindresorhus/file-type/blob/37233b1c9c5c55aab4308f5c1991569dd4e414cc/supported.js

@kakkokari-gtyih
Copy link
Contributor Author

kakkokari-gtyih commented Mar 12, 2024

一応対応してるっぽい記述は見かけた(けどうまく認識できてない

sindresorhus/file-type#488
sindresorhus/file-type#485

@mei23
Copy link
Contributor

mei23 commented Mar 12, 2024

まずソースコードにaudio/webmの記述が存在しないわね

@kakkokari-gtyih
Copy link
Contributor Author

Misskey側で判定を追加するしかないか…

@mei23
Copy link
Contributor

mei23 commented Mar 12, 2024

そもそもコンテナが違うパターン もあるから、audio/videoで適切なプレイヤーを出したいときには、中のストリーム見て判定しないといけないわね。

@kakkokari-gtyih
Copy link
Contributor Author

@mei23
Copy link
Contributor

mei23 commented Mar 12, 2024

すでにサムネ作成にFFmpeg使ってるからffprobeでおk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
Status: Done
2 participants