audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

`ogg` support on Windows?

Open jtmcdole opened this issue 3 years ago • 4 comments

Checklist

  • [x] I made sure that the feature I am proposing doesn't already exist
    • in as much as I searched the code for ogg, opus, and vorbis and found no mention other than ogg working on Android
    • I know it works on Web as well.

Use case / Problem

  • Supporting the open source media format
  • Works on other platforms with audioplayers.
  • Windows outputs a largely unhelpful error message:

AudioPlayers: Error setting url to '/C:/Users/john/AppData/Local/Temp/music/cool-vibes.ogg'.

Proposal / Solution

  • Unsure. I'm assuming audioplayers just passes through to Windows.

Platforms

  • Windows doesn't work. Android, and Web do. I don't have a mac or iPhone.

jtmcdole avatar Aug 27 '22 23:08 jtmcdole

Confirmed, we are happy for any Merge Requests. I don't know exactly how to solve this, maybe it is sufficient just to install some codecs. @azchohfi do you know how to approach different codecs?

Some refs: https://docs.microsoft.com/en-us/windows/win32/api/mfmediaengine/ https://github.com/bluefireteam/audioplayers/blob/6fad1cc4443e623e5c94519f130b4004b2dc3857/packages/audioplayers_windows/windows/MediaEngineWrapper.cpp#L318

Gustl22 avatar Aug 30 '22 13:08 Gustl22

Does this project require (or have a stance) on pre-Windows 10 support?

Opus in windows 10

GUID Description Format Tag (FOURCC)
MFAudioFormat_Opus OpusSupported in Windows 10 and later. WAVE_FORMAT_OPUS (0x704F)

And a random note somewhere about WMDM_FORMATCODE_OGG.

Assuming pre-windows 10 support; my second guess would be opusfile / opus tools? https://www.opus-codec.org/release/dev/2020/06/27/opusfile_0_12.html

jtmcdole avatar Aug 31 '22 04:08 jtmcdole

I think minimum supported Windows version for Flutter is 7. But we only support Windows 8+, see #1140.

This also doesn't mean, we cannot add extra functionality which only works for Windows 10+ versions.

I never developed any windows applications, so I think I'm not a big help here ^^. If you have a solution, let us know :)

Gustl22 avatar Aug 31 '22 09:08 Gustl22

I'll chew on it! Right now the easy work around is "don't use ogg if you plan to target windows".

Along the lines of #1140, If I just wait early next year:

Windows 8.1 will reach the end of support on January 10, 2023

jtmcdole avatar Aug 31 '22 14:08 jtmcdole