osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Enable other WMV decoders in ffmpeg

Open longnguyen2004 opened this issue 4 months ago • 7 comments

There's a ranked map that uses a WMV3 video, and WMV3 isn't enabled in the custom ffmpeg build, so currently the video doesn't play in osu!lazer

2025-08-19 13:47:41 [verbose]: VideoDecoder faulted: System.InvalidOperationException: No usable decoder found for codec ID AV_CODEC_ID_WMV3
2025-08-19 13:47:41 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.recreateCodecContext()
2025-08-19 13:47:41 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.StartDecoding()

wmv3 would need to be enabled, and maybe wmv1 as well for good measure, in case other videos exist that use that codec.

longnguyen2004 avatar Aug 19 '25 13:08 longnguyen2004

Previously: https://github.com/ppy/osu/discussions/27998

Joehuu avatar Aug 20 '25 00:08 Joehuu

If it's just one ranked beatmap then converting the video may be in our best interest rather than supporting edge-case codecs.

peppy avatar Aug 20 '25 05:08 peppy

Joehuu mentioned a discussion post, which contains another map in wmv format https://osu.ppy.sh/b/1476582

Daisuke, possibly is strangest case, for me, since it uses .avi format with wmv3 codec (possibly, because BMS/LR2 still uses wmv to show video) here's it's mediainfo: https://gist.github.com/tadatomix/7587e49d0a8cba9ecffb4b4667c62fbc

tadatomix avatar Aug 20 '25 07:08 tadatomix

edge-case codecs.

I wouldn't say the WMV family is an edge case codec. It was one of the main video codecs around the time when osu! was first released, and Windows Movie Maker wouldn't export H.264 by default until 2012. So there might be an unknown number of WMV videos out there.

longnguyen2004 avatar Aug 20 '25 08:08 longnguyen2004

I want to agree with you, yet so majority of ranked maps at that time preferred xvid/divx codec, actually. Iirc lazer has no issues with it

Example: First ranked map with a video Ken Hirai - Pop Star has a Divx 5 encoded video (See: https://gist.github.com/tadatomix/f822a92e847230171a4984a5fcb9a46b)

tadatomix avatar Aug 20 '25 08:08 tadatomix

Yes, all flavors of MPEG-4 are enabled, not sure why only wmv2 is enabled and not 1 and 3.

longnguyen2004 avatar Aug 20 '25 09:08 longnguyen2004

This one https://osu.ppy.sh/b/428 seems to be broken both in stable and lazer due to using mpeg1, yet so I don't know if this should be added to framework as well.

Mediainfo: https://gist.github.com/tadatomix/80dd83941c58d97859ea15eeeb57df6e

tadatomix avatar Aug 30 '25 03:08 tadatomix