SNAPSHOTS & Format Strings - Use filename instead of title?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
CheeseMoney
New Cone
New Cone
Posts: 2
Joined: 25 Jan 2013 22:06

SNAPSHOTS & Format Strings - Use filename instead of title?

Postby CheeseMoney » 26 Jan 2013 00:00

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).

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

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

Postby mederi » 26 Jan 2013 13:41

cannot

CheeseMoney
New Cone
New Cone
Posts: 2
Joined: 25 Jan 2013 22:06

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

Postby CheeseMoney » 31 Jan 2013 19:28

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:

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

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

Postby mederi » 01 Feb 2013 18:07

Thanks for sharing your solution.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 33 guests