for %%i in (%*) do echo %%i | tee -a 0hashmedialist && ffmpeg -v 4 -i %%i -map 0 -c copy -f streamhash -hash md5 - | tee -a 0hashmedialist
So I'm wanting to take, generally 2 - could be more, files & throw them to ffmepg,
and get results to the screen & tee'd to a file.
If I drag & drop the files onto hashmedia.BAT, I seem to be OK (mainly, at least).
But if I
hashmedia.BAT file1.mp4 file2.mp4
(ffmpeg)
-v 4
I might not necessarily need
| tee -a
>> 0hashmedialist
My issue, I believe is again "quotes".
Ideas?
Code: Select all
:: hashmediastream.BAT
:: SjB 02-25-2023
:: drag&drop of *.mp4 works correctly, but hashvideo.bat *.mp4 doesn't - outputting all echo's, but only 1 hash - why?
@echo off
:: for %%i in (%*) do echo "%%i"
:: for %%i in (%*) do echo %%i
:: pause
:: exit
:: for %%i in (%*) do echo %%i >>0hashlist && ffmpeg -v 4 -i %%i -map 0 -c copy -f streamhash -hash md5 - >>0hashlist
:: for %%i in (%*) do echo %%i | tee -a 0hashlist && ffmpeg -v 4 -i %%i -map 0 -c copy -f streamhash -hash md5 - >>0hashlist
for %%i in (%*) do echo %%i | tee -a 0hashmedialist && ffmpeg -v 4 -i %%i -map 0 -c copy -f streamhash -hash md5 - | tee -a 0hashmedialist
pause
goto end:
exit
This just gets the MD5 using stream copy mode. There is no decoding.
ffmpeg -i input.mp4 -map 0:v -c copy -f md5 -
Show video and audio checksums separately
Using the streamhash muxer:
ffmpeg -i input.mp4 -map 0 -c copy -f streamhash -hash md5 -
Per frame
Using the framehash muxer:
ffmpeg -i input.mp4 -map 0 -f framehash -
:end