Skip to content

Conversation

@sassman
Copy link
Owner

@sassman sassman commented Nov 30, 2025

Summary

After finishing a recording, t-rec now prompts users to generate an MP4 video in addition to the GIF. This provides a convenient way to get both formats without needing to re-record or remember to pass --video upfront.

The prompt runs in a background thread, so users can answer while the GIF is being generated - no wasted waiting time.

User Experience

After the GIF generation message appears, users see:

🎉 🚀 Generating t-rec.gif

🎬 Also generate MP4 video? (y/n) ›
(auto-skip in 15s)
  • Press y to generate MP4 (no Enter required)
  • Press n to skip (no Enter required)
  • Wait 15 seconds to auto-skip

When the prompt is skipped

  • Quiet mode (-q): No prompt, respects automation needs
  • Non-interactive (piped input, CI): Returns "no" automatically
  • Already requested video: If --video or --video-only was used, video generates without prompting

Implementation

  • Uses dialoguer crate for cross-platform terminal input handling
  • Prompt runs in background thread while GIF generates
  • 15-second countdown displayed below the prompt

Closes #219

Test plan

  • Run t-rec, wait for prompt, press y → video generated
  • Run t-rec, wait for prompt, press n → no video
  • Run t-rec, wait 15 seconds → timeout, no video
  • Run t-rec --video → no prompt, video generated
  • Run t-rec --video-only → no prompt, only video
  • Run t-rec -q → no prompt (quiet mode)
  • Run echo "" | t-rec → no prompt (non-interactive)

@sassman sassman force-pushed the feat/interactive-video-prompt branch 9 times, most recently from e9d4537 to adb749f Compare November 30, 2025 21:29
After finishing a recording, t-rec now asks if you also want to generate
an MP4 video with a 10-second countdown timer. This makes it easy to get
both GIF and MP4 formats without having to re-record.

The prompt runs in a background thread, so users can answer while the
GIF is being generated - no wasted waiting time.

Behavior:
- Shows "🎬 Also generate MP4 video? [y/N] (auto-skip in 10s):"
- Press 'y' to generate MP4, 'n' or Enter to skip
- Auto-skips after 10 seconds of no input
- Skipped in quiet mode (-q) or non-interactive environments
- Not shown if --video or --video-only was already specified

Closes #219
@sassman sassman force-pushed the feat/interactive-video-prompt branch from adb749f to d2c2c39 Compare November 30, 2025 21:32
Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
@sassman sassman marked this pull request as ready for review November 30, 2025 21:33
@sassman sassman merged commit 776d67c into main Nov 30, 2025
12 checks passed
@sassman sassman deleted the feat/interactive-video-prompt branch November 30, 2025 21:39
@5422m4n-bot 5422m4n-bot bot mentioned this pull request Nov 30, 2025
sassman added a commit that referenced this pull request Nov 30, 2025
## 🤖 New release

* `t-rec`: 0.7.11 -> 0.8.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.7.12](v0.7.11...v0.7.12)
- 2025-11-30

### Added

- add interactive prompt for video generation
([#298](#298))
- configurable framerate for smoother animations
([#296](#296))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Signed-off-by: Sven Kanoldt <sven@d34dl0ck.me>
Co-authored-by: 5422m4n-bot[bot] <203366424+5422m4n-bot[bot]@users.noreply.github.com>
Co-authored-by: Sven Kanoldt <sven@d34dl0ck.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ask user for video generation at the end

2 participants