• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions use another pc for trickplay

     
    • 0 Vote(s) - 0 Average

    use another pc for trickplay

    looking to run trickplay from another pc and move images to server
    urworstknight
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Oct
    Reputation: 0
    #1
    2025-10-20, 06:03 AM
    hello all! 
     
    i have two PC's both with win 10, PC A is my server, PC B is where my media is stored and everyday use PC... PC B is stronger then PC A. can i run a second server on PC B to create the trickplay images faster then move them over the PC A? if so is there a guide to set this up? i don't have the images saved next to the media either, but I'm ok with them being stored on the server PC. i know PC B would be better for the server but i doubt i could game and run the server on the same PC at the same time if transcoding is used. i found some trickplay folders with images in the c:\jellyfin\mediafolder\ area

    PC A:
     AMD 5700x CPU
    NVIDIA 1050ti GPU
    8 gig ram
    caddy reverse proxy

    PC B:
    AMD 5800xt CPU
    NVIDIA 3060 12 GB ram GPU
    32 GB ram
    Notek
    Offline

    Junior Member

    Posts: 3
    Threads: 0
    Joined: 2025 Oct
    Reputation: 0
    Country:United States
    #2
    2025-10-21, 09:13 PM
    I am trying to do the same thing with some success. If you check the box to save trickplay data in the media folder then you can pre-generate the trickplay files and copy them to <media-name-without-ext>.trickplay/320 10x10/0.jpg (assuming you are generating trickplay preview files of 10x10 grids at 320px wide.

    My setup also uses read-only directories for jellyfin and I have found that this trickplay setup does not work automatically all the time. I might be missing something but I have not found a way to tell jellyfin that the trickplay files exist, without having it try to generate trickplay files for all media that does not have the trickplay files.

    The only way I was able to get it to work was to manually modify the database for a specific media file to include the trickplay config settings, which is not ideal and probably the wrong way to do this.

    This is the bash script I have been using to generate the trickplay thumbnails.

    bash
    #!/bin/bash

    # USAGE: ./generate_trickplay.sh "Your Video File.mp4"

    set -e

    INPUT="$1"
    if [ -z "$INPUT" ]; then
      echo "Usage: $0 <video-file>"
      exit 1
    fi

    # ------------------- CONFIGURATION -------------------
    FPS="1/10"                # One thumbnail every 10 seconds
    WIDTH=320                  # Thumbnail width
    TILE_COLS=10              # Thumbnails per row in sprite
    MAX_THUMBS_PER_SPRITE=100  # Max thumbnails per JPEG sprite (adjust as needed)
    # ------------------------------------------------------

    BASENAME=$(basename "$INPUT")
    FILENAME="${BASENAME%.*}"
    OUTPUT_DIR=$(dirname "$INPUT")"/$FILENAME.trickplay"
    OUTPUT_DIR_FOR_STITCHFILES="${OUTPUT_DIR}/320 - 10x10"
    TMPDIR=$(mktemp -d)
    THUMBS_DIR="$TMPDIR/thumbs"

    mkdir -p "$THUMBS_DIR"
    mkdir -p "$OUTPUT_DIR"
    mkdir -p "$OUTPUT_DIR_FOR_STITCHFILES"

    echo "Extracting thumbnails every 10s..."
    echo "temporary dir: $THUMBS_DIR"
    # ffmpeg -i "$INPUT" -vf "fps=$FPS,scale=$WIDTH:$HEIGHT" "$THUMBS_DIR/thumb%05d.jpg" -hide_banner -loglevel error
    ffmpeg -threads 8 -noautorotate -i file:"$INPUT" -an -sn -vf "fps=$FPS,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,$WIDTH)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 8 -c:v mjpeg -qscale:v 4 -f image2 "$THUMBS_DIR/thumb%08d.jpg"

    THUMB_PATH="$THUMBS_DIR/thumb00000001.jpg"
    HEIGHT=$(identify -format "%h" "$THUMB_PATH")
    WIDTH=$(identify -format "%w" "$THUMB_PATH")

    TOTAL_THUMBS=$(ls "$THUMBS_DIR" | wc -l)
    TOTAL_SPRITES=$(( (TOTAL_THUMBS + MAX_THUMBS_PER_SPRITE - 1) / MAX_THUMBS_PER_SPRITE ))

    echo "Total thumbnails: $TOTAL_THUMBS"
    echo "Generating $TOTAL_SPRITES sprite images..."

    VTT_FILE="$OUTPUT_DIR/index.txt"
    > "$VTT_FILE"
    echo "WEBVTT" >> "$VTT_FILE"
    echo "" >> "$VTT_FILE"

    COUNTER=0
    SPRITE_INDEX=0

    convert -size ${WIDTH}x${HEIGHT} xc:black "$THUMBS_DIR/black.jpg"

    for ((i=0; i<TOTAL_THUMBS; i++)); do
      if (( i % MAX_THUMBS_PER_SPRITE == 0 )); then
        SPRITE_FILES=()
        for ((j=0; j<MAX_THUMBS_PER_SPRITE && i+j<TOTAL_THUMBS; j++)); do
          PADDED_NUM=$(printf "%08d" $((i + j + 1)))
          SPRITE_FILES+=("$THUMBS_DIR/thumb${PADDED_NUM}.jpg")
        done
        if (( j < MAX_THUMBS_PER_SPRITE )); then
          for ((;j<MAX_THUMBS_PER_SPRITE;j++)); do
            SPRITE_FILES+=("$THUMBS_DIR/black.jpg")
          done
        fi

        # Create sprite
        PADDED_NUM=$(printf "%08d" $((i/100 + 1)))
        SPRITE_NAME="$((i/100)).jpg"

        montage "${SPRITE_FILES[@]}" -tile ${TILE_COLS}x -geometry ${WIDTH}x${HEIGHT}+0+0 "$OUTPUT_DIR_FOR_STITCHFILES/$SPRITE_NAME"

        SPRITE_INDEX=$((SPRITE_INDEX + 1))
      fi
    done
    urworstknight
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Oct
    Reputation: 0
    #3
    Yesterday, 06:30 AM
    so i just install the server on my second pc as normal, nothing special like point the cache and other folders to PC A's originals?

    also does version number matter?
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode