Nemo Action - Any media file info Context menu

Post tutorials, HOWTO's and other useful resources here.
Testuser
Samurai
Samurai
Posts: 170
Joined: 26 May 2021, 15:11
Distribution: Porteux-v2.6-LXDE

Nemo Action - Any media file info Context menu

Post#1 by Testuser » 31 Aug 2026, 18:37

For Nemo users can view video info any video, audio or media files using right click of the file by creating action in nemo action script.

Create file - ffprobe_info.nemo_action in folder /home/guest/.local/share/nemo/actions with below contents.|

[Nemo Action]
Active=true
Name=View Media Info (YAD)
Comment=Show technical stream info in a GUI window
Exec=<action_scripts/nemo-ffprobe.sh %F>
Selection=notnone
Extensions=3g2;3gp;3gpp;aac;ac3;adp;adpcm;adts;aif;aiff;amr;ape;asf;asx;au;avi;divx;dts;dv;eac3;flac;flc;fli;flv;gsm;it;m4a;m4v;mjs;mkv;mlp;mod;mov;mp1;mp2;mp3;mp4;mpc;mpeg;mpg;mxf;nsv;ogg;ogm;ogv;opus;ra;ram;rm;s3m;sdp;swf;theora;tta;vob;wav;wavpack;wax;webm;wma;wmv;wmx;wpl;wvx;xm;xspf;
Icon-Name=video-player

The in this folder create a script with this content - /home/guest/.local/share/nemo/actions/action_scripts

Code: Select all

#!/bin/bash
# Using --list because your YAD version doesn't support markup in --text-info
ffprobe -hide_banner "$1" 2>&1 | \
sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' | \
sed 's/Duration/<b><span foreground="cyan">Duration<\/span><\/b>/g' | \
sed 's/bitrate/<b><span foreground="orange">bitrate<\/span><\/b>/g' | \
sed 's/Stream/<b><span foreground="red">Stream<\/span><\/b>/g' | \
yad --list --column="Technical Details" \
    --width=800 --height=600 \
    --title="Media Info: $(basename "$1")" \
    --image="video-player" \
    --window-icon="video-player" \
    --fontname="Monospace 10" \
    --button="Close:0" \
    --markup --no-headers