← 返回命令列表

Linux command

youtube-viewer 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Search videos

youtube-viewer [search query]

Play video URL

youtube-viewer [https://youtube.com/watch?v=...]

Audio only

youtube-viewer -n [query]

Download video

youtube-viewer -d [query]

Play with specific player

youtube-viewer --player=[vlc] [query]

Search for channels

youtube-viewer -sc [channel_name]

Show trending

youtube-viewer --trending

List uploads

youtube-viewer -u [channel_name]

Search playlists

youtube-viewer -sp [query]

说明

youtube-viewer is a command-line client for searching, streaming, and downloading YouTube videos directly from the terminal. It queries the YouTube API, presents numbered search results, and launches your chosen media player for playback. Multiple video players are supported including mpv, VLC, and MPlayer, configurable with the --player option. Audio-only mode (-n / --novideo) streams just the audio track, reducing bandwidth usage. The -d flag downloads videos locally instead of streaming them. Channel browsing (-u) lists uploads from specific creators, -sc searches for channels, and --trending shows currently trending videos. Resolution can be controlled with -r and fullscreen playback enabled with -f. Playlist support is available with -sp for searching and --pid for playing by playlist ID.

参数

-n, --novideo
Audio-only playback (no video).
-d, --download
Download video instead of streaming.
--player _PLAYER_
Specify video player (e.g., mpv, vlc, mplayer).
-sv, --search-videos
Search for YouTube videos (default mode).
-sc, --search-channels
Search for YouTube channels.
-sp, --search-playlists
Search for playlists.
-u, --uploads _NAME_
List videos uploaded by a channel/user.
--trending
Show trending videos.
-r, --resolution _RES_
Set video resolution (e.g., best, 1080p, 720p).
-f, --fullscreen
Enable fullscreen playback.
-i, --info
Display video information.
-S, --subscriptions
Show subscribed channels.

FAQ

What is the youtube-viewer command used for?

youtube-viewer is a command-line client for searching, streaming, and downloading YouTube videos directly from the terminal. It queries the YouTube API, presents numbered search results, and launches your chosen media player for playback. Multiple video players are supported including mpv, VLC, and MPlayer, configurable with the --player option. Audio-only mode (-n / --novideo) streams just the audio track, reducing bandwidth usage. The -d flag downloads videos locally instead of streaming them. Channel browsing (-u) lists uploads from specific creators, -sc searches for channels, and --trending shows currently trending videos. Resolution can be controlled with -r and fullscreen playback enabled with -f. Playlist support is available with -sp for searching and --pid for playing by playlist ID.

How do I run a basic youtube-viewer example?

Run `youtube-viewer [search query]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --novideo do in youtube-viewer?

Audio-only playback (no video).