vidfind is a command line tool for Windows 11 that allows to find and play online movies via their IMDb-ID.
It is based on Microsoft Edge WebView2 and the vidsrc API and written in Python.
For Linux and macOS there is an alternative version based on PyQt6 and QtWebEngine with basically the same interface, but without the --play argument, because QtWebEngine (unless self compiled) doesn't support .mp4 video with proprietary codecs like H.264.
Usage:
vidfind imdb-id [--play]
vidfind "some movie title" [--play]
vidfind --query "some movie title"
By default the tool just prints the HLS master URL of the movie with the specified IMDb-ID to STDOUT and exits with exit code 0. If something went wrong - e.g. the IMDb-ID doesn't exist or there is no video available for it - an error is printed to STDERR and the exit code is > 0.
If you append the optional argument --play, vidfind instead plays the found video in a window.
If the first argument does not start with "tt", it's instead interpreted as movie title/search string, and the first matching result in the IMDb database, if any, is used. Since movie titles are usually not unique, it's preferrable to specify an IMDb-ID. However, you can increase the chance that the first result is the correct one by appending the movie's year of release to the search string.
If you don't know the IMDb-ID of a movie yet, you can use --query "..." to search for movies at IMDb by title. vidfind will print a list of the found results and exit.
vidfind "blade runner 1982" --play
vidfind tt0083658
vidfind "blade runner 1982"
Find a movie and play it directly with VLC media player:
vidfind tt0083658 | "C:\Program Files\VideoLAN\VLC\vlc.exe" -
Find a movie and play it directly with mpv:
vidfind tt0083658 | D:\_portable\mpv\mpv.exe --playlist=-
Find a movie and play it directly with MPC-HC:
for /f %u in ('vidfind tt0083658') do @set "U=%u" && call "C:\Program Files\MPC-HC\mpc-hc64.exe" "%U%"
This method also works for other media players that don't accept filenames/URLs passed directly from STDIN
Find a movie and play it directly with FFplay:
for /f %u in ('vidfind tt0083658') do @set "U=%u" && call ffplay -allowed_extensions ALL -extension_picky disabled "%U%" -vst v:2
Find a movie and play it directly with SMP:
vidfind tt0083658 | "%LOCALAPPDATA%\Programs\SMP\SMP.exe" -
SMP is my own little multi-engine media player written in Python. (Adaptive) HLS streams are supported by engines directshow, mpv, vlc and webview.
Save found URL in a temporary .m3u playlist file, then open this file with the default player for .m3u files:
vidfind tt0083658 > "%TMP%\tmp.m3u" && explorer "%TMP%\tmp.m3u"
As far as I can tell this the only way to automatically play the found streaming URL in Windows Media Player (UWP), but this will only work if you previously associated .m3u files with it in the system settings.
Find a movie, use yt-dlp to extract the program stream with best quality and print its streaming URL:
vidfind tt0083658 | yt-dlp -f best --get-url -a - 2>nul
I think most media players do, but for a player that doesn't automatically pick the best quality from a master.m3u8, you could pipe the output of yt-dlp to the player e.g. by appending | "path\to\player.exe" -.
Find a movie and download it with yt-dlp as .mp4 file:
vidfind tt0083658 | yt-dlp -o tt0083658.mp4 -a -
Find a movie and download it with JDownloader:
for /f %u in ('vidfind tt0083658') do @set "U=%u" && call "%LOCALAPPDATA%\JDownloader 2\JDownloader2.exe" "%U%"
vidfind --query "blade runner"
tt0083658 "Blade Runner" 1982
tt1856101 "Blade Runner 2049" 2017
- Finding a movie and extracting its streaming URL usually takes a couple of seconds. When vidfind is started for the very first time, it will take some extra seconds because a new local WebView2 profile has to be created as folder
profilenext tovidfind.exe. You can delete thisprofilefolder any time.
