You could also consider simple bash oneliner instead of python script -
for i in *.mp3; do ffmpeg -v quiet -i "picture.jpg" -i "$i" -shortest -acodec copy "`sed 's/mp3/mp4/g'<<<$i`"; done
This will convert all mp3 files in your current dir into mp4 videos with picture.jpg.
For converting flac to mp3 that would be
for i in *.flac; do ffmpeg -v quiet -i "$i" -ab 320k -ac 2 -ar 48000 "`sed 's/flac/mp3/g'<<<$i`"; done
Notice "-v quiet", which shuts ffmpeg's loud mouth and also double quotes around $i and
sed - this will ensure it won't fail with filenames containing spaces.
A tip: converting to video takes quite some time (at least for me). Try using -threads 4 (or any other value, of course. It won't make any sense on single-core cpu)
I've found out that "-loop 1" (suggested by others) creates loop (how surprising!) which is actually infinite. On my gentoo that means it will eat all your tasty bites. Without "-loop 1" it works just fine, so I suggest you to go with that.