Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] hashing audio streams beyond pcm_s16le
@ 2022-11-18 19:21 Peter B.
  0 siblings, 0 replies; only message in thread
From: Peter B. @ 2022-11-18 19:21 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Hello everyone :)

I was wondering about the behavior of FFmpeg's hashing muxer for audio 
streams:

For example:
With a 32bit float (f32le) source, FFmpeg seems to be able to generate a 
hash for the f32le source - but only if I explicitly know (and then 
tell) FFmpeg to do so.
By default, I get the hash of a pcm_s16le version (see examples below).

I remember it defaults to "pcm_s16le" (also mentioned in 
https://trac.ffmpeg.org/wiki/framemd5%20Intro%20and%20HowTo), but why is 
that so?

And would it be possible to generate the hash of the source audio, 
without having to know what raw/uncompressed type it is?
I would like to be able to use the hash to compare lossless conversion 
of the content between different audio formats (eg vs FLAC and PCM).



Thank you very much in advance :)
Peter B.


------------------------
Example:

# pcm_f32le defaults to pcm_s16le hash:
$ ffmpeg-git -loglevel quiet -i drums3.wav -f streamhash -hash md5 -
0,a,MD5=08170d6e02fbccc07b61fbf1d7476057

# ...as shown here:
$ ffmpeg-git -loglevel quiet -i drums3.wav -c:a pcm_s16le -f streamhash 
-hash md5 -
0,a,MD5=08170d6e02fbccc07b61fbf1d7476057

#
$ ffmpeg-git -loglevel quiet -i drums3.wav -c:a pcm_f32le -f streamhash 
-hash md5 -
0,a,MD5=1444cdc20cb8ea30874114cb53729797

$ ffmpeg-git -loglevel quiet -i drums3.wav -c:a copy -f streamhash -hash 
md5 -
0,a,MD5=1444cdc20cb8ea30874114cb53729797



$ ffmpeg-git -i drums3.wav -hash md5 -

ffmpeg version N-109029-g1800a0da09 Copyright (c) 2000-2022 the FFmpeg 
developers
   built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
   configuration: --prefix=/usr/local --enable-gpl --enable-nonfree 
--enable-version3 --enable-postproc --enable-ffplay --enable-swscale 
--enable-avfilter --enable-pthreads --enable-bzlib --enable-zlib 
--enable-decoder=png --enable-encoder=png --enable-openssl 
--samples=../fate-suite --enable-libfreetype --enable-libopenjpeg 
--disable-decoder=jpeg2000 --enable-libvpx --enable-libvorbis 
--enable-libx264 --enable-libx265
   libavutil      57. 42.100 / 57. 42.100
   libavcodec     59. 52.100 / 59. 52.100
   libavformat    59. 34.101 / 59. 34.101
   libavdevice    59.  8.101 / 59.  8.101
   libavfilter     8. 50.100 /  8. 50.100
   libswscale      6.  8.112 /  6.  8.112
   libswresample   4.  9.100 /  4.  9.100
   libpostproc    56.  7.100 / 56.  7.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'drums3.wav':
   Duration: 00:00:54.25, bitrate: 1536 kb/s
   Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 48000 Hz, 1 
channels, flt, 1536 kb/s




_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-18 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 19:21 [FFmpeg-devel] hashing audio streams beyond pcm_s16le Peter B.

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git