Can MP use ffmpeg for thumbnails
Moderators: helmut, XnTriq, xnview
Can MP use ffmpeg for thumbnails
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?
Re: Can MP use ffmpeg for thumbnails
Hey great, thanksxnview wrote:i'll add it

Re: Can MP use ffmpeg for thumbnails
Is there a way to get it to work on Mac? I tried these paths/file names but none seemed to work:xnview wrote:i'll add it
/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

Re: Can MP use ffmpeg for thumbnails
This was working for me today, and just stopped working after file rearranging
.

Re: Can MP use ffmpeg for thumbnails
Strange bug, thumbnailing .mp4 still works, but thumbnailing TV recording .ts does not.gouache wrote:This was working for me today, and just stopped working after file rearranging.
Re: Can MP use ffmpeg for thumbnails
OK I forgot I updated from 0.75 to 0.76 todaygouache wrote:Strange bug, thumbnailing .mp4 still works, but thumbnailing TV recording .ts does not.gouache wrote:This was working for me today, and just stopped working after file rearranging.

Re: Can MP use ffmpeg for thumbnails
OK, I restored old 0.75 version but it still will not make thumbnails for .ts TV recordings - suggestions???
Re: Can MP use ffmpeg for thumbnails
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.
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.

Re: Can MP use ffmpeg for thumbnails
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.
Then install Magic Launch, add file type jpg, default action shell command just for debugging (default should never be called unless something is wrong).
First rule named "Thumbsheets to VLC" open with shell command 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.
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"
Code: Select all
echo "##" && sleep 15
First rule named "Thumbsheets to VLC" open with shell command
Code: Select all
FILENAME="##" && open -a /Applications/VLC.app "${FILENAME/____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.

Re: Can MP use ffmpeg for thumbnails
will be fixed in next version for MacOSX & Linuxdanjcla wrote:Is there a way to get it to work on Mac? I tried these paths/file names but none seemed to work:xnview wrote:i'll add it
/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
Pierre.