Page 1 of 1

SNAPSHOTS & Format Strings - Use filename instead of title?

Posted: 26 Jan 2013 00:00
by CheeseMoney
I'm attempting to load a huge playlist and then save (via <SHIFT-S>) a snapshot (.jpg or .png) to create a single thumbnail for each clip in a folder (or group of folders). I'd like it so hitting the snapshot hotkey gets me....

Given C:\dir1\FILENAME.AVI
Produces C:\dir1\FILENAME.JPG

Given C:\dir2\FILENAME2.AVI
Produces C:\dir2\FILENAME2.JPG

Is this possible? As far as naming the prefix (with "." <without quotes> set as the current directory) $N seems to use the meta-data TITLE instead of filename so instead of "filename.jpg" I get something like:
animals are beautiful people00001.jpg

$F produces full name and path but in reality creates an ugly snapshot name like:
file____C__Users_username.DOMAINNAME_Videos_Jungle_alcohol.wmv00001.png

How do I get a snapshot to save in the same directory as the video being played with the same name as the video (just a different extension, i.e. .png or .jpg).

Re: SNAPSHOTS & Format Strings - Use filename instead of tit

Posted: 26 Jan 2013 13:41
by mederi
cannot

Re: SNAPSHOTS & Format Strings - Use filename instead of tit

Posted: 31 Jan 2013 19:28
by CheeseMoney
Here was my workaround using a MS Dos Batch File, just in case anyone else has a similar need. It doesn't load a playlist--it merely loops recursively through all subfolders and launches the video files. User can take a screenshot ("Shift" + "S" in Windows) and it will save the thumbnail in the same folder with the same file name and a ".tbn" extension. Close the video after you take the screenshot and it will launch the next video. Change to .jpg if you need.

PLEASE NOTE: that this saves jpgs as .tbn (thumbnail) for use with XBMC.
vlc-screenshots.bat

Code: Select all

setlocal enableextensions enabledelayedexpansion @rem SET PATH ACCORDINGLY @rem CHANGE all instance of tbn to jpg if you would like the file saved with a jpg extension @rem (XBMC uses a tbn extension for thumbnails) SET VLCPATH=%PATH%;C:\Program Files (x86)\VideoLAN\VLC @SET PATH=%PATH%;%VLCPATH% @for /r %%f in ("*.flv", "*.mpg", "*.avi", "*.wmv", "*.mp4", "*.m4v") do @call :DONTOVERWRITE "%%f" endlocal goto :END :DONTOVERWRITE @set _FILENAME=%~1 @set _JPGFILENAME="%_FILENAME:~0,-4%.tbn" if not exist %_JPGFILENAME% vlc --snapshot-format=jpg --snapshot-path=%_JPGFILENAME% "%_FILENAME%" :END:

Re: SNAPSHOTS & Format Strings - Use filename instead of tit

Posted: 01 Feb 2013 18:07
by mederi
Thanks for sharing your solution.