Can MP use ffmpeg for thumbnails

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Can MP use ffmpeg for thumbnails

Post by gouache » Sat Apr 11, 2015 10:26 am

MP is not getting thumbnails for TV recordings (.ts) as well as some flv files I am getting thumbs for in XNView, is it possible to use ffmpeg?

User avatar
xnview
Author of XnView
Posts: 31737
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Can MP use ffmpeg for thumbnails

Post by xnview » Mon Apr 13, 2015 9:02 am

i'll add it
Pierre.

gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Re: Can MP use ffmpeg for thumbnails

Post by gouache » Mon Apr 13, 2015 8:44 pm

xnview wrote:i'll add it
Hey great, thanks :) . The contents of .ts are just MPEG2 and AVC/H.264 so hopefully there will be no problem (there is a problem in xnview with previously made .ts thumbnails preventing double click opening in preferred program).

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Can MP use ffmpeg for thumbnails

Post by danjcla » Fri Oct 30, 2015 8:35 pm

xnview wrote:i'll add it
Is there a way to get it to work on Mac? I tried these paths/file names but none seemed to work:

/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg/ffmpeg
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg.exe
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg/ffmpeg.exe

with:

XnViewMP
Version 0.76.1 x64 (Oct 26 2015)

Libformat version 6.80

I'm using this ffmpeg:

ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-gpl --enable-version3 --enable-pthreads --disable-ffplay --disable-ffserver --disable-shared --enable-static --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-avfilter --enable-fontconfig --enable-libfreetype --enable-libass --enable-libutvideo --enable-libvidstab --enable-filters --enable-postproc --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Hyper fast Audio and Video encoder

gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Re: Can MP use ffmpeg for thumbnails

Post by gouache » Sun Nov 01, 2015 7:38 pm

This was working for me today, and just stopped working after file rearranging :? .

gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Re: Can MP use ffmpeg for thumbnails

Post by gouache » Sun Nov 01, 2015 7:50 pm

gouache wrote:This was working for me today, and just stopped working after file rearranging :? .
Strange bug, thumbnailing .mp4 still works, but thumbnailing TV recording .ts does not.

gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Re: Can MP use ffmpeg for thumbnails

Post by gouache » Sun Nov 01, 2015 8:09 pm

gouache wrote:
gouache wrote:This was working for me today, and just stopped working after file rearranging :? .
Strange bug, thumbnailing .mp4 still works, but thumbnailing TV recording .ts does not.
OK I forgot I updated from 0.75 to 0.76 today :| , so this is a new bug.

gouache
Posts: 38
Joined: Sat Jun 09, 2012 6:23 pm

Re: Can MP use ffmpeg for thumbnails

Post by gouache » Sun Nov 01, 2015 9:07 pm

OK, I restored old 0.75 version but it still will not make thumbnails for .ts TV recordings - suggestions???

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Can MP use ffmpeg for thumbnails

Post by danjcla » Wed Nov 04, 2015 6:33 pm

Regarding Mac OS X - Could someone who has this working (on Windows) paste the output of running just "ffmpeg.exe" from the command line here? I'd like to rule out the possibility I'm just using a version that's too old, too new, or not compiled with the right features.

Regarding .ts files - I'd try manipulating them with the ffmpeg.exe command (line) .exe itself. It is possible that support for .ts files isn't compiled into your ffmpeg.exe executable, in which case XnViewMP isn't going to work with them either. In which case you can compile or find a version of ffmpeg.exe that does include support.

danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Can MP use ffmpeg for thumbnails

Post by danjcla » Wed Nov 04, 2015 11:59 pm

Reading around a lot it looks like, if Mac has Addon support, no one has ever written about using it.

So I'm doing a workaround, may be useful to you if all else fails. First I'm going to have a scheduled overnight job that scans for movies and creates new contact sheets if needed. Importantly, it will set the preview icon of the contact sheet to a single image, instead of the actual contact sheet image, so it'll actually be useful.

Next I'm going to write a little shim that handles .jpg files, which just passes them through to another program (Xee in my case) unless they are named like one of the contact sheets, in which case it will open the video in a video player (VLC) instead.

Below is the proof of concept code for the contact sheet / preview icon generation. It's likely not whitespace / punctuation safe.

On Mac OS X, you can get ffmpegthumbnailer, imagemagick (which includes montage), and exiftool via Homebrew.

Code: Select all

# Get 12 screen captures
for ((i=4; i<=96; i+=8)); do ffmpegthumbnailer -i "${MOVIE}" -o "${MOVIE}____thumb${i}.jpg" -s 384 -t ${i}; done

# Make contact sheet / storyboard / thumbsheet in a 3x4 grid
montage -geometry +4+4 -tile 3x4 "${MOVIE}____thumb*.jpg" "${MOVIE}____thumbsheet.jpg"

# Make it have a useful preview icon (NOTE: exiv2 doesn't work.)
echo "-ThumbnailImage<=${MOVIE}____thumb4.jpg" > argfile.exiftool
echo "${MOVIE}____thumbsheet.jpg" >> argfile.exiftool
exiftool -@ argfile.exiftool

# Clean up intermediate files
rm "${MOVIE}"____thumb[0-9]*.jpg "${MOVIE}____thumbsheet-thumb.jpg" argfile.exiftool "${MOVIE}____thumbsheet.jpg_original"
Then install Magic Launch, add file type jpg, default action shell command

Code: Select all

echo "##" && sleep 15
just for debugging (default should never be called unless something is wrong).

First rule named "Thumbsheets to VLC" open with shell command

Code: Select all

FILENAME="##" && open -a /Applications/VLC.app "${FILENAME/____thumbsheet.jpg/}"
in faceless mode if all are true: name contains ____thumbsheet.jpg

Second rule named "Fallback" open with your favorite viewer app if none are true: contains ____thumbsheet.jpg

Should have something to do this in bulk done in the next day or two.

User avatar
xnview
Author of XnView
Posts: 31737
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Can MP use ffmpeg for thumbnails

Post by xnview » Thu Nov 05, 2015 10:37 am

danjcla wrote:
xnview wrote:i'll add it
Is there a way to get it to work on Mac? I tried these paths/file names but none seemed to work:

/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg/ffmpeg
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg.exe
/Applications/XnViewMP.app/Contents/Resources/AddOn/ffmpeg/ffmpeg.exe

with:

XnViewMP
Version 0.76.1 x64 (Oct 26 2015)

Libformat version 6.80

I'm using this ffmpeg:

ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-gpl --enable-version3 --enable-pthreads --disable-ffplay --disable-ffserver --disable-shared --enable-static --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-avfilter --enable-fontconfig --enable-libfreetype --enable-libass --enable-libutvideo --enable-libvidstab --enable-filters --enable-postproc --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Hyper fast Audio and Video encoder
will be fixed in next version for MacOSX & Linux
Pierre.

Post Reply