| Crates.io | steamclipconverter |
| lib.rs | steamclipconverter |
| version | 0.1.1 |
| created_at | 2025-09-05 17:16:35.395787+00 |
| updated_at | 2025-09-05 17:16:35.395787+00 |
| description | Convert Steam 'fg_*' DASH clips (session.mpd) into clean MP4 via ffmpeg (stream copy). |
| homepage | https://github.com/qiaoruntao/steamclipconverter |
| repository | https://github.com/qiaoruntao/steamclipconverter |
| max_upload_size | |
| id | 1825829 |
| size | 38,155 |
Convert Steam’s raw DASH clips (folders like fg_294100_20250828_124021 containing a session.mpd) into MP4 files using ffmpeg. Result files will be like
RimWorld-20250828-124021.mp4
fg_<appid>_<YYYYMMDD>_<HHMMSS>ffmpeg -i session.mpd -map 0:v:0 -map 0:a:0? -c copy -movflags +faststartGameName-YYYYMMDD-HHMMSS.mp4 (game name from appmanifest_<appid>.acf, fallback to AppID)--gameId 294100 (repeatable) to convert selected games only--delete-after removes the fg_* directory and the corresponding the clip_* directory. Note: please restart Steam after delete clip, otherwise Steam will try to load these deleted clips.--input)PATH.Quick installs:
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y ffmpeg
# Windows (PowerShell)
winget install Gyan.FFmpeg
cargo install steamclipconverter --locked
git clone https://github.com/qiaoruntao/steamclipconverter
cd steamclipconverter;
cargo build --release
./target/release/steamclipconverter --help
These files are not signed and cannot run on openbox.
# Simplest: use default options and converted mp4 occurred in current directory
steamclipconverter
# Or pass flags explicitly
steamclipconverter --input "/path/to/Steam/userdata" --output "/path/to/out"
If you provide no arguments, the tool will warn and default to scanning your OS-specific Steam userdata:
~/Library/Application Support/Steam/userdata~/.local/share/Steam/userdataC:\Program Files (x86)\Steam\userdataOverride anytime with --input.
| Flag | Type | Default | Description |
|---|---|---|---|
| (positional) | path | — | If you pass exactly one non-flag argument, it’s treated as --input. |
--input |
path | (OS default userdata if omitted, with warning) | Root directory to scan recursively for fg_* clip folders. |
--output |
path | current working directory | Where to write .mp4 files. |
--gameId |
u32 (repeatable) | (all) | Convert clips only for these AppIDs. Example: --gameId 294100 --gameId 570. |
--delete-after |
flag | off | After a successful convert, delete the fg_* folder; if it was the only folder under video/, also delete the clip_* grandparent. |
fg_<appid>_<YYYYMMDD>_<HHMMSS>.session.mpd exists inside each fg_* directory.steamapps/appmanifest_<appid>.acf from discovered Steam libraries (libraryfolders.vdf on all OSes). If missing, use the AppID.ffmpeg on the local session.mpd and stream copy the first video + optional audio to MP4. No re-encode.fg_<...>_YYYYMMDD_HHMMSS).--delete-after, remove the converted fg_* folder; if it was the only subdir in its parent video/, remove the clip_* grandparent too.About this common FFmpeg message
[dash] Error when loading first fragment of playlist
Steam’s MPDs sometimes list extra Representations whose first fragment isn’t present (mismatched numbering, missing audio, etc.). FFmpeg drops the bad one and continues with a valid stream. The output is fine; you can safely ignore this warning.
Convert everything under your Steam userdata, write to Desktop:
steamclipconverter --input "$HOME/Library/Application Support/Steam/userdata" \
--output "$HOME/Desktop/SteamClips"
Only convert RimWorld (294100) and Dota 2 (570):
steamclipconverter --input "$HOME/.local/share/Steam/userdata" \
--gameId 294100 --gameId 570
Convert then delete the source clip folders:
steamclipconverter --input "/path/to/Steam/userdata" --delete-after
.../clip_294100_20250828_124021/
└─ video/
└─ fg_294100_20250828_124021/
├─ session.mpd
├─ init-stream0.m4s
├─ chunk-stream0-00001.m4s
├─ ...
├─ init-stream1.m4s # (optional)
└─ chunk-stream1-00001.m4s # (optional)
Only folders starting with
fg_are processed. If audio is missing, the MP4 will be video‑only.
Python original that inspired this approach (stitch + remux):
https://github.com/Nastas95/SteamClip/blob/main/steamclip.py
Handy explanation of Steam’s clip structure & extracting:
https://gist.github.com/safijari/afa41cb017eb2d0cadb20bf9fcfecc93
Community deep-dive on Steam Deck recordings:
https://www.reddit.com/r/SteamDeckTricks/comments/1dpj1zv/game_recording_how_it_works_and_how_you_can_get/
MIT or Apache-2.0 (your call). Not affiliated with Valve/Steam.