Search code examples
vlclibvlc

Store names of files opening up in vlc


I want to store the names of the audio/video files that I open up in vlc in a log file. I intend on making automated playlists using the log file.

How should I do it??. Should I be making an extension for vlc which will do the same ?


Solution

  • So many options. The simplest might be to use --file-logging and --verbose options in vlc, and then post-process the log file.

    Other options may include:

    • write a wrapper program which logs the file you want and then calls vlc to play it,
    • patch the vlc source to write the log when playback begins, and rebuild vlc,
    • on Linux, write a program in C or Python that monitors a group of files using inotify, with the event type IN_OPEN, IN_ACCESS, and IN_CLOSE_NOWRITE, record the events to a log file,
    • on Linux, write an LD_PRELOAD, intercept open, recognise the file type, write name to the log.