Skip to content

Configuration

chokerman edited this page Jun 7, 2023 · 7 revisions

Contents

  1. Lobster Editor
  2. Player
  3. Download Directory
  4. Provider
  5. History
  6. Subtitle Language
  7. History File
  8. Rofi
  9. Image Preview
  10. Debug
  11. Quiet
  12. Download Video
  13. Uberzug Settings

Introduction

Lobster is a posix shell script that scrapes flixhq and allows you to stream and download movies and tv shows, with various features such as history, image previews, and more.

I have a habit of implementing new features before documenting them properly, but I will try to keep this document up to date. If you have any questions, always feel free to open an issue, start a discussion, or contact me directly. I am always happy to help. :)

Lobster Editor

  • The lobster_editor is used to edit the lobster config file
  • By default, this value is set to the $VISUAL environment variable, or $EDITOR if $VISUAL is not set. If neither are set, it defaults to vim
  • You can change this value by setting the lobster_editor variable in your lobster config file (which is located at ~/.config/lobster/lobster_config.txt by default)
  • Both a terminal and graphical editor can be used

Example (using lite-xl):

lobster_editor=lite-xl

To then use this feature, you can run the following command:

lobster -e

or

lobster --edit
lobster_editor_demo.mp4

Player

  • The player variable is used to set the default player for lobster to use
  • By default, this value is set to mpv
  • You can change this value by setting the player variable in your lobster config file
  • Any player that can play an m3u8 stream can be used, the script will use the player variable and pass the video_link (stream url) to it
  • Here is a list of players that lobster has been tested with:

Example (using celluloid):

player=celluloid

Note: only mpv supports the history feature, other players can only be used to stream content

lobster_player_demo.mp4

Download Directory

  • The download_dir variable is used to set the default download directory for lobster to use
  • By default, this value is set to $PWD
  • You can change this value by setting the download_dir variable in your lobster config file
  • The download_dir variable can be set to any directory, but it is recommended to set it to a directory that is not temporary, as the script will not check if the directory exists before downloading the video

Example:

download_dir=~/Videos

To then use this feature, you can run the following command:

lobster -d

or

lobster --download
lobster_download_dir_demo.mp4

Provider

  • The provider variable is used to set the default provider for lobster to use
  • By default, this value is set to UpCloud
  • Here is a list of the currently supported providers:
    • UpCloud
    • Vidcloud

It is currently not my priority to implement more providers, but I will try to add more in the future. I am also open to pull requests if you would like to add more providers yourself.

Example (using Vidcloud):

provider=Vidcloud

History

  • The history variable is used to set the default history feature for lobster to use
  • By default, this value is set to 0
  • The history feature allows you to keep track of the movies and tv shows you have watched, while also allowing you to conveniently resume them from the exact second you left off (similar to YouTube or Netflix)
  • This feature requires you to use mpv as your player and have socat installed (to interact with mpv's socket)
  • Accepted values are 0 and 1

Example of how to enable the history feature:

history=1

To then use this feature, you can either look up a movie or tv show you have watched before and play it, or you can run the following command, in order to view your current history:

lobster -c

or

lobster --continue
lobster_history_demo.mp4

Subtitle Language

  • The subs_language variable is used to set the default subtitle language for lobster to use
  • By default, this value is set to english
  • This variable can be set to any language that is supported by the provider you are using
  • Both the english and English syntaxes are supported

Example (using spanish):

subs_language=spanish
lobster_subtitles_demo.mp4

History File

  • The histfile variable is used to set the default history file for lobster to use
  • By default, this value is set to $HOME/.local/share/lobster/lobster_history.txt

Example:

histfile=~/.config/lobster/foo.bar

Rofi

  • The use_external_menu variable is used to tell lobster whether to use rofi or fzf as the selection menu
  • By default, this value is set to 0 (meaning fzf will be used)
  • The purpose of this feature is to allow you to use rofi as the selection menu, which will allow you to use the script without having to launch a terminal windows
  • Make sure you have rofi installed
  • Accepted values are 0 and 1

Example:

use_external_menu=1
lobster_rofi_demo.mp4

Image Preview

  • The image_preview variable is used to set the default image preview feature for lobster to use

  • By default, this value is set to 0

  • The image preview feature allows you to preview the posters of movies and tv shows during the selection process

  • Accepted values are 0 and 1

  • To use this feature:

    • Using fzf:

    • Using rofi:

      • Make sure your rofi configuration has show-icons set to true, otherwise the feature will not work
      • You can specify a specific configuration file to use by setting the image_config_path variable in your lobster config
      • If you would like the menu to look like the one in the screenshot, please checkout the TODO section of the wiki

Example using fzf:

image_preview=1
lobster_image_preview_demo.mp4

Example using rofi (with a custom theme):

use_external_menu=1
image_preview=1
image_config_path=~/.config/rofi/styles/launcher.rasi
lobster_custom_image_preview_demo.mp4

Debug Mode

  • The debug variable is used to set the default debug mode for lobster to use
  • By default, this value is set to 0
  • Accepted values are 0 and 1
  • After running the script with the debug mode enabled, you can find the debug log in the /tmp/lobster.log file

Note: fzf prints the finder to stderr, so this will also be redirected to stdout, and by extension printed to the terminal and saved to the log file.

Quiet

  • The quiet_output variable is used to either print the output from mpv when playing a video, or not
  • By default, this value is set to 0 (meaning that mpv prints out all of the information to stdout as it normally does)
  • Accepted values are 0 and 1
  • Note that this only works for mpv

Download Video Function

  • The download_video function is used to download the video of the movie or tv show you are currently watching, and it can be overridden in your lobster config file
  • Inside of the download_video function, you can use the following variables, passed to the function by the script:
    • $1 is the video link
    • $2 the title
    • $3 the path
    • $4 the thumbnail (this is only passed to the function if the image_preview feature is enabled, and is currently untested)

Example of a custom download_video function using yt-dlp:

download_video() {
  yt-dlp "$1" --no-skip-unavailable-fragments --fragment-retries infinite -N 16 -o "$3/$2".mp4
}
lobster_download_video_function_demo.mp4

Ueberzug settings

Here are the settings you can modify for the ueberzug window, that is used in the fzf preview

preview_window_size=50%
ueberzug_x=$(($(tput cols) - 70))
ueberzug_y=$(($(tput lines) / 10))
ueberzug_max_width=100
ueberzug_max_height=100
ueberzug_output=sixel
Clone this wiki locally