Jump to content

Animated Hover Thumbnail


Recommended Posts

Neminem
Posted

That look like a great plugin 😁

  • 2 months later...
themandalorian
Posted

Is it possible to adjust the length? and turn on the sound ?

thanks

Posted
On 3/12/2019 at 1:13 PM, ebr said:

Related: Trailer on hover

For the longest time I thought that was what this was for but I don't know what it's for.

 

Untitled.jpg

Posted
2 minutes ago, Santiag0 said:

For the longest time I thought that was what this was for but I don't know what it's for.

 

Untitled.jpg

Theme Songs & Videos

Posted (edited)

https://i.imgur.com/oTcpP6c.gif

It doesn't do anything on any clients on android tv or roku for me, is it suppose to do this play trailer in the background?

Edited by Santiag0
Posted
4 minutes ago, Santiag0 said:

https://i.imgur.com/oTcpP6c.gif

It doesn't do anything on any clients on android tv or roku for me, is it suppose to do this play trailer in the background?

What version number of the Emby Android app?

Posted
4 minutes ago, Luke said:

What version number of the Emby Android app?

Most recent one, for android tv I have both the new one and the one with no left side bar.

Posted

OK did you check out the guide I linked to? It plays the videos that you've designated as video backdrops.

Posted
1 hour ago, Luke said:

OK did you check out the guide I linked to? It plays the videos that you've designated as video backdrops.

Yes I tried it years ago and it never worked on any clients, can you show a video of what it looks like does it do this

https://i.imgur.com/oTcpP6c.gif

I would like to see a video of what it looks like please, thank you.

Posted
4 minutes ago, Santiag0 said:

Yes I tried it years ago and it never worked on any clients, can you show a video of what it looks like does it do this

https://i.imgur.com/oTcpP6c.gif

I would like to see a video of what it looks like please, thank you.

What exactly did you do?

Posted
15 minutes ago, Luke said:

What exactly did you do?

That was three years ago I don't remember exactly, I will try it again tomorrow it was more than likely user error on my part maybe I used the app that never supported it. I will try on android tv and fire tv stick tomorrow if I get it going I might end up buying the plugin to download the trailers and music themes instead of downloading trailers myself would be time consuming. Thank you for all the info today Luke you really have a great community here.

Oh one more question, does it play trailer backgrounds on the home screen when browsing the (Latest Movies & Latest TV show).

Posted
1 hour ago, Santiag0 said:

That was three years ago I don't remember exactly, I will try it again tomorrow it was more than likely user error on my part maybe I used the app that never supported it. I will try on android tv and fire tv stick tomorrow if I get it going I might end up buying the plugin to download the trailers and music themes instead of downloading trailers myself would be time consuming. Thank you for all the info today Luke you really have a great community here.

Oh one more question, does it play trailer backgrounds on the home screen when browsing the (Latest Movies & Latest TV show).

It’s when clicking onto a movie or series screen.

Posted
1 hour ago, Luke said:

It’s when clicking onto a movie or series screen.

Couldn't sleep so I decided to try it and it works 😃 Works on smart tv and fire tv stick this really is very cool man. Luke man you absolutely must get this running on the home page to play the background trailer in the upper right corner this would just be crazy cool man. I know there are other background videos for movies and stuff that also plays music I can't remember what they are called or where to download them right off hand but tomorrow I will find out. Great job on this man!

  • Thanks 1
  • 1 month later...
  • 1 month later...
Posted

I'm joining in the anticipation for this feature!

Posted
7 hours ago, JCarlosL7 said:

I'm joining in the anticipation for this feature!

Hi, what are you anticipating?

Posted
On 23/10/2025 at 17:45, Smitty018210 said:

This looks amazing! Forgive how are you doing this? 

Looks like this guy just replaced the path of the image thumbnail with a gif. See how when the hover leaves, the gif still plays? 

It's more of a demo than anything else I expect.

Regardless, generating random gifs from existing episodes might cause spoilers to be shown when someone hovers over the item. That in turn would mean someone would have to painstakingly creating thumbs by hand, ensuring no spoilers or weird cuts are shown. 

This is something you'd rather not want to automate. I tried this with generating "random" trailers for movies and the result is usually just a disjointed mess.

11 hours ago, JCarlosL7 said:

I'm joining in the anticipation for this feature!

If there were a website/platform that'd deliver information (gifs/trailers) for episodes that'd be nice but I'm not expecting there to be, at least not consistent.

  • 8 months later...
CuervoBernardi
Posted
On 6/4/2025 at 4:17 PM, dalo1987 said:

For this result above an All in one Skript:

 

#!/usr/bin/env bash
set -euo pipefail

# Usage: ./preview.sh <input-video> [output-directory] [max-total-length]
#   $1 = input video path (required)
#   $2 = output directory   (optional; default = current directory)
#   $3 = max total preview length in seconds (optional; default = 6)

if [ $# -lt 1 ]; then
  echo "Usage: $0 <input-video> [output-directory] [max-total-length]"
  exit 1
fi

INPUT="$1"
OUTDIR="${2:-.}"
MAX_TOTAL="${3:-6}"     # default max total length = 6 seconds

# Verify input file exists
if [ ! -f "$INPUT" ]; then
  echo "Error: Input file '$INPUT' not found."
  exit 1
fi

# Create output directory if needed
mkdir -p "$OUTDIR"

# Extract filename components
FILENAME="$(basename -- "$INPUT")"   # e.g. video.mp4
NAME="${FILENAME%.*}"                # e.g. video
EXT="${FILENAME##*.}"                # e.g. mp4

# Compute per-clip length = MAX_TOTAL / 3, rounded to 3 decimals
CLIP_LEN=$(printf "%.3f" "$(echo "$MAX_TOTAL / 3" | bc -l)")

# 1) Query total duration (in seconds) via ffprobe
duration=$(ffprobe -v error \
  -show_entries format=duration \
  -of default=noprint_wrappers=1:nokey=1 \
  "$INPUT")

# 2) Calculate 20%, 50%, and 80% start times (rounded to 3 decimals)
start1=$(printf "%.3f" "$(echo "$duration * 0.2" | bc -l)")
start2=$(printf "%.3f" "$(echo "$duration * 0.5" | bc -l)")
start3=$(printf "%.3f" "$(echo "$duration * 0.8" | bc -l)")

echo "Source duration:       $duration seconds"
echo "Max total preview len: $MAX_TOTAL seconds"
echo "Each clip length:      $CLIP_LEN seconds"
echo "Start times → 20%: $start1 s, 50%: $start2 s, 80%: $start3 s"
echo

# 3) Extract three sub-clips (video-only, no audio)
CLIP1="$OUTDIR/${NAME}_clip1.mp4"
CLIP2="$OUTDIR/${NAME}_clip2.mp4"
CLIP3="$OUTDIR/${NAME}_clip3.mp4"

ffmpeg -y -ss "$start1" -i "$INPUT" -t "$CLIP_LEN" -c:v libx264 -an "$CLIP1"
ffmpeg -y -ss "$start2" -i "$INPUT" -t "$CLIP_LEN" -c:v libx264 -an "$CLIP2"
ffmpeg -y -ss "$start3" -i "$INPUT" -t "$CLIP_LEN" -c:v libx264 -an "$CLIP3"

# 4) Build concat list
CONCAT_LIST="$OUTDIR/${NAME}_concat.txt"
cat > "$CONCAT_LIST" <<EOF
file '$CLIP1'
file '$CLIP2'
file '$CLIP3'
EOF

# 5) Concatenate into an intermediate preview (video-only)
PREVIEW_RAW="$OUTDIR/${NAME}_preview_raw_${MAX_TOTAL}s.mp4"
ffmpeg -y -f concat -safe 0 -i "$CONCAT_LIST" -c copy "$PREVIEW_RAW"

# 6) Scale the concatenated preview to 396×704 px
#    (re-encode video using libx264, drop audio if any)
PREVIEW_SCALED="$OUTDIR/${NAME}_preview_${MAX_TOTAL}s_396x704.mp4"
ffmpeg -y -i "$PREVIEW_RAW" -vf "scale=396:704" -c:v libx264 -an "$PREVIEW_SCALED"

# 7) Compute thumbnail timestamp: midpoint of the combined preview
#    Combined preview duration = MAX_TOTAL → midpoint = MAX_TOTAL / 2
MIDPOINT=$(printf "%.3f" "$(echo "$MAX_TOTAL / 2" | bc -l)")

THUMB="$OUTDIR/${NAME}_thumb_396x704.jpg"
ffmpeg -y -ss "$MIDPOINT" -i "$PREVIEW_SCALED" -vframes 1 -q:v 2 "$THUMB"

echo "Done:"
echo "  • Extracted clips (video-only):               "
echo "      $CLIP1"
echo "      $CLIP2"
echo "      $CLIP3"
echo "  • Concatenated (raw) preview:                  $PREVIEW_RAW"
echo "  • Final 396×704 px video preview (video-only): $PREVIEW_SCALED"
echo "  • Thumbnail at ${MIDPOINT}s (396×704 px):      $THUMB"

Finally you can run:

./preview.sh "/path/to/video.mp4" "/path/to/output-folder" 6

Clips become 2 s each (6 s total), concatenated, scaled to 396×704 → preview_9s_396x704.mp4, thumbnail at 4.5 s.

Hello I edited the script in lines ~ 42 to 45
 

# 2) Calculate 20%, 50%, and 80% start times (rounded to 3 decimals)
start1=$(printf "%.3f" "$(echo "$duration * 0.2" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')
start2=$(printf "%.3f" "$(echo "$duration * 0.5" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')
start3=$(printf "%.3f" "$(echo "$duration * 0.8" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')

to compesate for regional errors in my zone (decimal places are ','

and I ended the script as follows:

# 6) Scale the concatenated preview to 396×704 px
#    (re-encode video using libx264, drop audio if any)
PREVIEW_SCALED="$OUTDIR/${NAME}_preview_${MAX_TOTAL}s_396x704.gif"
ffmpeg -y -i "$PREVIEW_RAW" -vf "fps, scale=704:396" -loop 0 "$PREVIEW_SCALED"

echo "Done:"
echo "  • Extracted clips (video-only):               "
echo "      $CLIP1"
echo "      $CLIP2"
echo "      $CLIP3"
echo "  • Concatenated (raw) preview:                  $PREVIEW_RAW"
echo "  • Final 396×704 px video preview (video-only): $PREVIEW_SCALED"

rm -v "${CLIP1}" "${CLIP2}" "${CLIP3}" "${CONCAT_LIST}" "${PREVIEW_RAW}"

to remove all the auxiliar files created and produce a gif instead of an mp4

I place the gif in the movie folder as :
movie_name-default.gif or movie_name-thumb.gif.

But I do not get the animated thumbnail to work. Only the first frame for the gif.

I do not understand from this thread if the video shown of the animated thumbnail working is a suggestion of how it would eventually work or if someone has made it happen.


My emby is in a nas Server that I acces from the web on chrome
 

Posted
3 hours ago, CuervoBernardi said:

Hello I edited the script in lines ~ 42 to 45
 

# 2) Calculate 20%, 50%, and 80% start times (rounded to 3 decimals)
start1=$(printf "%.3f" "$(echo "$duration * 0.2" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')
start2=$(printf "%.3f" "$(echo "$duration * 0.5" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')
start3=$(printf "%.3f" "$(echo "$duration * 0.8" | bc -l| sed -E 's/\./\,/')" | sed -E 's/\,/\./')

to compesate for regional errors in my zone (decimal places are ','

and I ended the script as follows:

# 6) Scale the concatenated preview to 396×704 px
#    (re-encode video using libx264, drop audio if any)
PREVIEW_SCALED="$OUTDIR/${NAME}_preview_${MAX_TOTAL}s_396x704.gif"
ffmpeg -y -i "$PREVIEW_RAW" -vf "fps, scale=704:396" -loop 0 "$PREVIEW_SCALED"

echo "Done:"
echo "  • Extracted clips (video-only):               "
echo "      $CLIP1"
echo "      $CLIP2"
echo "      $CLIP3"
echo "  • Concatenated (raw) preview:                  $PREVIEW_RAW"
echo "  • Final 396×704 px video preview (video-only): $PREVIEW_SCALED"

rm -v "${CLIP1}" "${CLIP2}" "${CLIP3}" "${CONCAT_LIST}" "${PREVIEW_RAW}"

to remove all the auxiliar files created and produce a gif instead of an mp4

I place the gif in the movie folder as :
movie_name-default.gif or movie_name-thumb.gif.

But I do not get the animated thumbnail to work. Only the first frame for the gif.

I do not understand from this thread if the video shown of the animated thumbnail working is a suggestion of how it would eventually work or if someone has made it happen.


My emby is in a nas Server that I acces from the web on chrome
 

HI, it doesn't animate where exactly?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...