balintlaczko / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
1 stars 0 forks source link

Hard ffmpeg compression #30

Closed alexarje closed 4 years ago

alexarje commented 4 years ago

Looks like the current settings for the ffmpeg compression of .MP4 files is a bit "hard". You can also see it in that the converted .AVI file is very small. I often use this setting in shell scripts:

ffmpeg -i "$i" -c:v mjpeg -q:v 3 "$name_conv.avi";

We may also export the audio at this step:

ffmpeg -i "$i" -acodec pcm_s16le "$name_conv.wav";

so that it is possible to do audio analysis on the files as well.

balintlaczko commented 4 years ago

For some reason your example (first code line in your comment) is still to hard, although -q:v is supposed to do the trick... Will investigate this closer.

balintlaczko commented 4 years ago

Works now, must have forgot to reset the kernel yesterday.

balintlaczko commented 4 years ago

Your first example is now adopted in convert_to_avi(filename) and the second one in extract_wav(filename) in _utils.py