Feature: Add Terminal Video Playback Option (--vo=tct) #20
+783
−318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature: Add Terminal Video Playback Option (--vo=tct)
Closes: #19
🚀 Summary of Changes
I noticed the discussion in Issue #19 and have implemented an option for terminal-based video playback.
This integration gives the user a choice after selecting a video:
Terminal Playback: Uses mpv --vo=tct to play the video directly in the terminal window.
External MPV Playback: Launches the video in the standard external MPV player.
💡 Notes on Quality
The visual quality of the terminal playback using the tct driver is significantly lower than the actual video quality rendered by the external MPV player.
However, this feature provides a lightweight alternative for users who need to:
Avoid launching a full graphical window.
Stay entirely within the terminal interface.
The feature adds a basic level of terminal video functionality which I believe is still a valuable option for GopherTube users.
⚙️ Implementation
Added a prompt to choose between [t]erminal and [m]pv.
Uses mpv --vo=tct --really-quiet for cleaner terminal output.
Corrected the argument handling to pass options to mpv individually (fixing the initial parsing error).
Please see the demonstration below showing the new [t]erminal playback prompt