Saved preferences override command line options
Encountered when trying to set MP3 export bitrate using "-b" on command line. I tried "-b 64", "-b 64000", "-b 64k", "-b 64kbps" etc. See https://musescore.org/en/comment/834019#comment-834019 .
lasconic commented on May 4, 2018 - 08:47,
"The preferences are initialiized with saved values AFTER the parsing of command line options... It doesn't work. Can someone file a bug ?"
Comments
Affected by the -b option are MuseScore version 2.1 -2.2.1 (the option didn't exist before 2.1, got added with #50926: Allow setting preferences for the quality and bitrate of mp3 produced by MuseScore)
Other options needs to get checked whether they also are affected.
-b takes a number and interprets this as kbps, I don't think the conversion works if using any postfix like k or kbps, and 64000 won't work either, such high bitrates are not supported.
Code in master is different, as far as I read it there a temp override is used instead of modifying the preferences (which is what should happen in 2.x too). Needs more checking though
Similar issue with PNG resolution, resolved differently, not to overwrite from (and to) preferences. But no real input check there.
And in master both are set only in memory and as such not saved in the preferences. Whether this really works or also gets overwritten by existing preferences remains to be checked.
See https://github.com/musescore/MuseScore/pull/3654
Not sure whether we should also deal with midiImportOperations, in terms of being just a temporary override?
Or whether to store mp3BitRate (and/or userDPI) in preferences when not in converter mode?
Counterpart for master:
https://github.com/musescore/MuseScore/pull/3655
Fixed in branch master, commit 7879427c77
Fix #272042: saved preferences override command line options
For master, here at least do the input check and update the usage
message.
Fixed in branch master, commit d8797b930d
Merge pull request #3655 from Jojo-Schmitz/bitrate-master
Fix #272042: saved preferences override command line options
Fixed in branch 2.3, commit 7e46673045
Fix #272042: saved preferences override command line options
Fixed in branch 2.3, commit 057b21a031
Merge pull request #3654 from Jojo-Schmitz/mp3rate
Fix #272042: saved preferences override command line options
Automatically closed -- issue fixed for 2 weeks with no activity.