VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. 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
    Quote Quote  
  2. 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
    Instead of displaying those elements with echo you would call a muxer to add the name as metadata. See for example:

    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
    The new files will be in a subfolder called New.
    Last edited by jagabo; 19th Jun 2020 at 13:30.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    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
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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}
    that will show filename without extension as window title and also as a text into video, you can choose which you want
    mpv is highly customizable:
    https://mpv.io/manual/stable/
    Last edited by _Al_; 19th Jun 2020 at 17:09.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!