I am using the following MovieStim call:
mov = visual.MovieStim(
win=win, name='mov',
filename=recording_path,
ori=0, opacity=1,
depth=0.0,
volume=0.00001,
units="norm",
size=2,
)
and the audio playback is very loud and very noisy. I need to set the volume to 0.00001 for it to be bearable at all, but then only the noise is noticeable.
This is all happening with a .mkv video I compressed. I tried loading the .MOV file (before re-encoding) and the sound is less loud and less noisy, but still unacceptable. This is all of course baffling, since I re encoded the files with the following parameters passed to ffmpeg:
-crf 16 -c:a copy
Which should copy the audio stream without re-encoding. Here is the ffmpeg -i
output for my files:
Input #0, matroska,webm, from 'nd750_a0037.mkv':
Metadata:
COMPATIBLE_BRANDS: qt niko
MAJOR_BRAND : qt
MINOR_VERSION : 537331968
ENCODER : Lavf56.40.101
Duration: 00:08:00.28, start: 0.000000, bitrate: 8003 kb/s
Stream #0:0(eng): Video: h264 (High), yuvj420p(pc), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Metadata:
CREATION_TIME : 2016-05-27 16:52:02
LANGUAGE : eng
ENCODER : Lavc56.60.100 libx264
DURATION : 00:08:00.279000000
Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
CREATION_TIME : 2016-05-27 16:52:02
LANGUAGE : eng
DURATION : 00:08:00.280000000
and
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.MOV/nd750_a0037.MOV':
Metadata:
major_brand : qt
minor_version : 537331968
compatible_brands: qt niko
creation_time : 2016-05-27 16:52:02
Duration: 00:08:00.28, start: 0.000000, bitrate: 11619 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 10079 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2016-05-27 16:52:02
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2016-05-27 16:52:02
If I try to play the video with mpv
they both sound ok and afaict the same.
Any idea what’s wrong?