🐛 Bug Report: Downloaded videos have no audio track
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
調査の方向性
Start in src/utils.rs at Media::parse and in templates/utils.html at the download link, then trace how the DASH or HLS media URLs are exposed. The issue describes separate video and audio representations and notes that audio filenames vary by post, so read the manifest or playlist rather than guessing a filename. Done means the downloaded video includes audio and plays like the post; consider the reported remuxing approach and its ffmpeg dependency.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Using the download link on a v.redd.it video post saves a file that has no sound. The video plays with sound in the browser on the same instance, so the audio stream is reachable - it is just not part of the downloaded file.
As far as I can tell from the source, this is because Reddit stores a video post as separate DASH representations - a video-only track and one or more audio-only tracks - and the download link points at the video-only one:
Media::parseinsrc/utils.rsassignsmedia.urlfrom the API'sfallback_url(the video-onlyDASH_<height>.mp4) andmedia.alt_urlfromhls_url.- The download link in
templates/utils.htmlis<a href="{{ post.media.url }}" download="{{ post.media.download_name }}">, so it servesfallback_urlverbatim. - In-browser playback with HLS enabled uses
alt_url, where the player combines the video and audio streams. That is why the page has sound and the saved file does not.
This also explains why the symptom is easy to miss: with Use HLS off, playback is silent too, so the download at least matches what you heard. With Use HLS on - the default on the instance I used - the page has audio and the download silently does not.
Steps to reproduce the bug
-
Ensure
Use HLSisonin settings (default on the instance below). -
Open any
v.redd.itpost that has audio (not a GIF-type post). -
Play it in the browser and confirm that it has sound.
-
Click
download(dlon mobile). -
Open the saved file in any player - it is silent.
-
ffprobeon the file reports a single stream, with noAudioentry:<paste ffprobe output here>
What's the expected behavior?
The downloaded file should contain the audio track as well, so that it plays back the same way it does on the post page.
Additional context / screenshot
Environment:
- Instance: https://redlib.catsarch.com
- Version: v0.36.0
- Git commit:
0ec5147860f66f7ded5f5d88beaf2bf655dedd85(deployed 2026-10-17) - Browser:
Note on that commit, so it is not a distraction: this instance runs a fork that has seven unmerged PRs applied on top of upstream. Per git compare it is 52 commits ahead of a4d36e9 and 0 behind, so it includes all of current main. I checked the fork's diff against the relevant code and none of its patches touch this path - the only media change is the added rich:video branch from #549 (for external transcoded media, which does not apply to a native v.redd.it post), and the download link in templates/utils.html is unmodified. So I believe this is upstream behavior rather than a fork artifact, but I am happy to re-verify on a vanilla instance if that is preferred.
Related, but I believe distinct:
- #105 asks for the ability to download HLS videos with sound. It was filed before the download button existed (added in #173), so it reads as a feature request for a missing capability rather than a report that the shipped button produces a file missing a stream. Happy for this to be folded into #105 if you prefer.
- #504 is about downloaded files being corrupt (
moov atom not found), which is a different failure mode - here the file is valid and plays, it just has no audio.
On the cost concern raised in #105 about pushing encoding onto the server: combining the two DASH tracks does not require transcoding, only remuxing into an MP4 container (ffmpeg -i <video> -i <audio> -c copy -movflags +faststart out.mp4). That is I/O-bound rather than CPU-bound, so it is considerably cheaper than re-encoding - though it does still mean buffering the streams and an ffmpeg dependency.
If a muxing step is not wanted at all, even exposing the audio representation (so the audio track can be fetched and combined client-side, or at least downloaded separately) would be better than handing out a video-only file with no indication that a stream is missing. Note that the audio filename is not stable across posts - older posts use DASH_audio.mp4, newer ones DASH_AUDIO_128.mp4 or DASH_AUDIO_64.mp4 - so it should be read from the DASH manifest or the HLS playlist rather than guessed.
- I checked that the instance that this was reported on is running the latest git commit, or I can reproduce it locally on the latest git commit
- 主要言語
- Rust
- スター
- 3.9k
- フォーク
- 293
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redlib-org/redlib のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
redlib-org/redlib#611 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
redlib-org/redlib#604 · コメント 6 件 · リアクション 11 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
redlib-org/redlib#571 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
redlib-org/redlib#557 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
redlib-org/redlib#609 · コメント 5 件 · リアクション 15 件 ·
メンテナーはふだん 1 日以内に返信
redlib-org/redlib の issue をすべて見る
似ている issue
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Waschndolos/open-clubmanager#185 ·
メンテナーはふだん 1 日以内に返信
-
r-bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
servo/rust-smallvec#844 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
farion1231/cc-switch#9122 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
lbjlaq/Antigravity-Manager#3801 ·
メンテナーはふだん 1 日以内に返信
-
LIMIT inputs are named MIN/MAX instead of the standard MN/MX, so LIMIT(MN := ...) does not resolveオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信