FreeTubeApp / FreeTubeApp/FreeTube
[Bug]: Video playback defaults to avc1/mp4a codecs on ALL videos despite VP9/AV1 and Opus availability
- Dominant language
- Vue
- Stars
- 21.9k
- Forks
- 1.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 71
Description
### Guidelines
- [x] I have encountered this bug in the [latest release of FreeTube](https://github.com/FreeTubeApp/FreeTube/releases).
- [x] I have encountered this bug in the [official downloads of FreeTube](https://github.com/FreeTubeApp/FreeTube#official-downloads). **The only official downloads are from the [https://freetubeapp.io](https://freetubeapp.io/#download) website, the [FreeTubeApp/FreeTube GitHub repository](https://github.com/FreeTubeApp/FreeTube/releases) and the [io.freetubeapp.FreeTube flatpak](https://flathub.org/en/apps/io.freetubeapp.FreeTube) from Flathub.**
- [x] I have [searched the issue tracker for **open and closed** issues](https://github.com/FreeTubeApp/FreeTube/issues?q=is%3Aissue+sort%3Arelevance-desc) that are similar to the bug report I want to file, without success.
- [x] I have searched the [documentation](https://docs.freetubeapp.io/) for information that matches the description of the bug I want to file, without success.
- [x] This issue contains only one bug.
- [x] I have read and agree to follow the [rules](https://docs.freetubeapp.io/community/rules/).
### Describe the bug
FreeTube consistently selects avc1 (H.264) and mp4a (AAC) codecs for video streams, even when codecs like vp9 or av1 (and opus for audio) are available for the video.
Because it defaults to these codecs, video stream quality is visibly degraded (more compression artifacts) while simultaneously consuming significantly higher internet bandwidth!
### Expected Behavior
FreeTube should automatically prioritize and stream the most efficient codecs available (VP9/AV1 for video, Opus for audio) to optimize both visual clarity and data usage, rather than defaulting to h264 and aac.
Or atleast allow to select in the settings.
### Issue Labels
usability issue, API issue, inconsistent behavior
### FreeTube Version
v0.25.0 beta
### Operating System Version
Windows 10
### Installation Method
.exe
### Primary API used
Local API
### Last Known Working FreeTube Version (If Any)
_No response_
### Upload screenshots or videos
[image.png](https://github.com/user-attachments/assets/53c54541-7f9d-4da3-bd6e-3411cfb5a979)
Tested across a variety of videos to show how it's consistently always defaulting to the `avc1` codec, rather than using vp9 or av1.
https://github.com/user-attachments/assets/ef0b3bc9-4550-4bfe-b5a9-e9881f4ecbb5
### Additional Information
I didn't encounter this issue two weeks prior, but I feel this is inconsistent behaviour rather than something breaking. Although I'm not entirely sure about that. I tried on a clean version, but its still going for AVC1/mp4a for some reason.
Also, I'm not sure if this issue is related to API or not. So I've selected those tags as well, just in case.
### Nightly Build
- [ ] I have encountered this bug in the latest **official** [nightly build](https://docs.freetubeapp.io/development/nightly-builds), do not check this box if you are using an unofficial or custom build.
Contributor guide
Research direction
Reproduce the issue on FreeTube v0.25.0 beta on Windows 10 using the .exe and Local API, checking the selected codecs across several videos. Trace the video and audio stream selection from the playback path and compare available VP9, AV1, and Opus streams with the chosen avc1/mp4a streams. Done means efficient available codecs are prioritized consistently, or codec selection is exposed in settings.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100