I recently had to create a montage of short video clips and jpeg files and needed to display the names of the subjects which were recorded as the filenames so I edited each jpeg separately and added a text box to display the name and then saved as a new file - it was very tedious. It occurs to me now that some video players have an option to display the filename but it would include the file extension which I do not want. I can strip out the file extensions using the Windows rename command in a batch file but then the video editors I have tried look for a file association with the extension which, of course is missing.
Does anyone know of a method or of a program that can do what I want?
Thanks
+ Reply to Thread
Results 1 to 6 of 6
-
-
A batch file could easily add/change the metadata to the base filename. Some players can display the name in the metadata rather than the name of the file. For example, this batch file will show the full path, full name, and base name only:
Code:echo off for %%F in (*.avi) do ( echo full path and name: "%%~dpnxF" echo full name and extension: "%%~nxF" echo drive only: "%%~dF" echo path only: "%%~pF" echo name only: "%%~nF" echo extension only: "%%~xF" ) pause
https://wiki.multimedia.cx/index.php?title=FFmpeg_Metadata
This will add title metadata to each mp4 file in a folder:
Code:for %%F in (*.mp4) do ( ffmpeg -i "%%~nxF" -map 0 -metadata title="%%~nF" -c copy "New\%%~nF.mp4" ) pause
Last edited by jagabo; 19th Jun 2020 at 13:30.
-
jagabo thanks but since I shan't know which video player the viewers will use I need to be able to create a video that saves the filenames, without extensions, so that they will appear on any player. Hope that makes sense.
-
as you found out, without the extension there is no way to associate that file with any player. so no one will be able to just click on the file and play it, they will have to choose what to open the file with first.
--
"a lot of people are better dead" - prisoner KSC2-303 -
Yes, Windows uses the extension to know what type of file it is and to associate it with a program. Without the extension Windows won't know it's an A/V file and won't use a media player to play it automatically when you double click on it.
You could burn the name of the file into the video but then it couldn't be turned on/off on demand. You could also include the name as a subtitle stream. But it would only show up if subtitles are supported and enabled in the player. -
You can associate certain extensions to portable mpv player.
Then create portable_config directory, in the same directory as mpv.exe is, and then create mpv.conf in that directory. Usen notepad to write lines below, then save it:
Code:keep-open title=${filename/no-ext} osd-duration=4000 # show message in ms osd-playing-msg=${filename/no-ext}
mpv is highly customizable:
https://mpv.io/manual/stable/Last edited by _Al_; 19th Jun 2020 at 17:09.
Similar Threads
-
LG TV WebOS - can it display video filename?
By nick1977 in forum Media Center PC / MediaCentersReplies: 6Last Post: 4th Dec 2019, 07:32 -
batch: how to get the extension of filename without the (.)?
By marcorocchini in forum Newbie / General discussionsReplies: 10Last Post: 8th Oct 2017, 15:22 -
batch that compare filename in 2 folder
By marcorocchini in forum Newbie / General discussionsReplies: 2Last Post: 3rd Oct 2017, 04:58 -
MP4Tools specify output filename?
By themelz in forum MacReplies: 1Last Post: 27th Apr 2016, 06:56 -
how do i take out the filename in a mkv file?
By RBCC in forum EditingReplies: 3Last Post: 17th Mar 2016, 19:56