After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 576722 - Per device transcoding overwrite
Per device transcoding overwrite
Status: RESOLVED WONTFIX
Product: banshee
Classification: Other
Component: Device - MTP
git master
Other All
: Normal enhancement
: 1.x
Assigned To: Banshee Maintainers
Gabriel Burt
gnome[unmaintained]
: 638603 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-03-25 13:49 UTC by David Nielsen
Modified: 2020-03-17 08:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to check current format against the user-requested one (956 bytes, patch)
2010-08-05 21:11 UTC, Josh Holland
none Details | Review
Patch to transcode only lossless formats (1.91 KB, patch)
2010-08-05 22:42 UTC, Josh Holland
none Details | Review
Perhaps prettier? (2.77 KB, patch)
2010-08-06 18:23 UTC, David Nielsen
rejected Details | Review
Patch to add "Prefer quality" preference setting and obey it (5.17 KB, patch)
2010-08-06 23:22 UTC, Josh Holland
none Details | Review
Improve on the other patch by using a list initialiser instead of .Add emthods (4.97 KB, patch)
2010-08-06 23:53 UTC, Josh Holland
none Details | Review
Small cosmetic changes from the previous patch (4.51 KB, patch)
2010-08-06 23:58 UTC, Josh Holland
none Details | Review
Patch to do all required, including setting the sensitivity of the checkbox (6.68 KB, patch)
2010-08-07 11:44 UTC, Josh Holland
none Details | Review
Patch builds on the previous but defaults to "true" for convert_lossless (6.68 KB, patch)
2010-08-07 20:17 UTC, Josh Holland
needs-work Details | Review
My mockup for the device properties window (32.60 KB, image/png)
2010-09-29 19:21 UTC, Josh Holland
  Details
Re-done mockup (23.29 KB, image/png)
2010-09-29 20:11 UTC, Josh Holland
  Details

Description David Nielsen 2009-03-25 13:49:49 UTC
As it so often happens devices support multiple formats which is good. However if one was to examine a case like my Sansa Fuze which supports both Ogg Vorbis and FLAC every FLAC file would be directly copied onto the device. As FLAC files are much bigger than compressed formats this greatly limits the number of songs I can put on the device.

It would thus be nice to have an option to force transcoding for lossless formats when syncing and save space. I would suggest putting this in the properties tab along with the standard encoding setup as a check box with some simple text like "prefer audio quality over saving space" which defaults to off. This would retain sane default behavior and allow audiophiles to continue enjoying their lossless goodness.
Comment 1 Gabriel Burt 2009-10-27 20:17:16 UTC
Bulk changing the assignee to banshee-maint@gnome.bugs to make it easier for people to get updated on all banshee bugs by following that address.  It's usually quite apparent who is working on a given bug by the comments and/or patches attached.
Comment 2 David Nielsen 2010-01-02 19:22:23 UTC
Still applies to 1.5.2
Comment 3 Josh Holland 2010-08-05 14:42:02 UTC
I'm seeing this in the 1.6.1 version of Banshee that's in Ubuntu 10.04. This is pretty confusing, as the "Device properties" context menu item allows setting of the "Encode to" parameter. When I set this to Ogg, and all my music went onto my Rockbox-ified iPod, I was pretty confused. While I'm not really a C# developer, more a Python guy, I'm going to have a look at the source and see what I can do about it, as if it can be done for non-supported formats, it shouldn't be too hard to override the supported one.
Comment 4 Josh Holland 2010-08-05 21:10:48 UTC
OK, I think I have a patch. No doubt it will require improvement, but I'm happy to redo it based on feedback from people who know what they're doing.
Comment 5 Josh Holland 2010-08-05 21:11:35 UTC
Created attachment 167218 [details] [review]
Patch to check current format against the user-requested one

Checked briefly, seems to work.
Comment 6 Josh Holland 2010-08-05 22:42:32 UTC
Created attachment 167223 [details] [review]
Patch to transcode only lossless formats

As discussed on IRC, it may be better to transcode only lossless formats. This patch uses a List<string> to contain a list of known lossless codecs. I am not sure if this is the best way to do this.
Comment 7 David Nielsen 2010-08-06 18:23:36 UTC
Created attachment 167268 [details] [review]
Perhaps prettier?

I had a look at this as well, there has to be a prettier way to store a list of lossless formats.

Next step is to investigate how to add an overwrite for users who prefer to tradeoff capacity for audio quality and provide a tickbox.
Comment 8 David Nielsen 2010-08-06 18:35:12 UTC
Review of attachment 167268 [details] [review]:

my bad
Comment 9 Josh Holland 2010-08-06 23:22:07 UTC
Created attachment 167287 [details] [review]
Patch to add "Prefer quality" preference setting and obey it

This is hopefully the final patch in terms of functionality. It is entirely possible that it could do with a few cosmetic tweaks (for example, I've no idea whether the OnPreferQualityChanged callback method (?) is actually required), but it seems to DTRT.
Comment 10 Josh Holland 2010-08-06 23:53:40 UTC
Created attachment 167288 [details] [review]
Improve on the other patch by using a list initialiser instead of .Add emthods
Comment 11 Josh Holland 2010-08-06 23:58:44 UTC
Created attachment 167289 [details] [review]
Small cosmetic changes from the previous patch
Comment 12 David Nielsen 2010-08-07 00:45:50 UTC
+                Catalog.GetString ("Don't convert lossless formats"),
+                Catalog.GetString ("Leave lossless formats as they are, despite the extra file size.")

Has no affirmative, don't convert them or leave them alone. :)

Should be:

+                Catalog.GetString ("Preserve lossless files when synchronizing (uses more space on the device),
+                Catalog.GetString ("Convert lossless files when synchronizing (saves space on device)")

To make the default clear I think we should default to true, this would make the default behavior very clear. Banshee will optimize your enjoyment by giving you the most songs on the device it can.

[x] Convert lossless files when synchronizing (saves space on device)
Comment 13 David Nielsen 2010-08-07 00:51:24 UTC
wow.. I'm tired, ignore the no affirmative bit. The rest should still be valid.


+                Catalog.GetString ("Convert lossless files when synchronizing"),
+                Catalog.GetString ("Converting lossless files will increase the amount of data you can store on the device");
Comment 14 David Nielsen 2010-08-07 02:26:32 UTC
If the device doesn't support any lossless formats then the option should be greyed out like the auto sync setting when all sources are set to manual?
Comment 15 Josh Holland 2010-08-07 09:22:13 UTC
So you are suggesting to switch the sense of the option, and to grey out the box when no lossless formats are supported? I'll look into doing that.
Comment 16 Josh Holland 2010-08-07 11:44:51 UTC
Created attachment 167312 [details] [review]
Patch to do all required, including setting the sensitivity of the checkbox
Comment 17 Josh Holland 2010-08-07 20:17:03 UTC
Created attachment 167346 [details] [review]
Patch builds on the previous but defaults to "true" for convert_lossless
Comment 18 Gabriel Burt 2010-08-10 00:46:43 UTC
Review of attachment 167346 [details] [review]:

I think this preference should be located where the existing encoding prefs are -- in the DAP's properties (which you get to by right clicking on it in the source list).

There's another bug/enhancement request asking for the ability to re-encode high-bitrate MP3s to some low bitrate -- just something to keep in mind, in case there are overlaps.

::: src/Core/Banshee.Services/Banshee.MediaProfiles/MediaProfileManager.cs
@@ +305,3 @@
+        {
+            Initialize ();
+            mimetype = GetExtensionForMimeType(mimetype);

put a space between the method name and (arg list)
Comment 19 Josh Holland 2010-09-29 19:21:59 UTC
Created attachment 171356 [details]
My mockup for the device properties window

Please excuse my inferior GIMP skills, but hopefully this shows what I mean.
Comment 20 Josh Holland 2010-09-29 20:11:20 UTC
Created attachment 171359 [details]
Re-done mockup

Note that I couldn't populate the comboboxes from Glade: the first one would show whatever formats the DAP supports, the second would contain "All", "Incompatible and Lossless" and "Incompatible only" to specify which files should be transcoded.
Comment 21 David Nielsen 2010-12-30 17:49:56 UTC
Confirming, also this may be of interest?

https://bugzilla.gnome.org/show_bug.cgi?id=627476
https://bugzilla.gnome.org/show_bug.cgi?id=637735
Comment 22 David Nielsen 2011-01-03 20:21:29 UTC
*** Bug 638603 has been marked as a duplicate of this bug. ***
Comment 23 Age Bosma (IRC: Forage) 2011-01-04 18:52:27 UTC
As stated by David at "duplicate" bug 638603 it might be good to include a way to prevent conversion all together, including those format that are not supported by the device.

In the latest mock-up a "none" value in the "Files to Transcode" combobox would suffice. When selected, all non-supported files will be ignored, read not transferred, during sync as a consequence.

Changing the order of both comboboxes might be more logical for the user. I.e:

--------------------------------------
Transcode on Sync: [ .... \/]
Encode To: [ ............ \/] [Edit]
--------------------------------------

Where the "Transcode on Sync" combobox would contain the values: 'None', 'Unsupported only', 'Lossless only' and 'Unsupported and Lossless'.
'All' as an option does not quite make sense to me but correct me if I'm wrong. It would imply transcoding MP3 to MP3 again as well.
Comment 24 David Nielsen 2011-01-04 19:04:44 UTC
The All profile would indeed force all files to be transcoded, there are uses for this and believe it or not, users actually request it.

I think we need to consider:

Conversion policy [Skip unsupported files, Unsupported files only, Unsupported and Lossless (default), Force for all files]
Conversion to [...] [Edit]

Defaulting to Unsupported and Lossless seems sane.
Comment 25 Age Bosma (IRC: Forage) 2011-01-04 21:33:30 UTC
Fair enough on the convert all option.

What I'm missing is some hit or clarification about why and when transcoding is or has to be done in the first place. We know it is done on sync and because not all file types are supported by a device but it can not be determined by just looking the current dialog. To reduce confusion for new or inexperienced users I think to should be made clear somehow.
With the last proposal made by David I think we would be diving strait in the conversion aspect while it's about transfer of files to the device in the first place.
I'm all for keeping the dialog as minimalistic and simple as possible, thus preventing a long explanation text as well, but I'm afraid we need at least something more.

What about:
----------------------------------------------------------------------------
File Transfer Policy
   Files to convert: [None, Unsupported and Lossless, Unsupported only, Lossless only, All files]
   Convert to: [...] [Edit]
----------------------------------------------------------------------------

I was thinking about 'Synchronization' instead of 'Transfer' as well but that might be implying auto sync too much.
Comment 26 David Nielsen 2011-01-04 22:49:54 UTC
I think the desirable experience would likely be having all of this in one view.

Insert DAP, click DAP as it appears in Banshee to be presented with something functionally similar to:

---

David's Samsung Galaxy S

Music      [All, Playlist]
Audiobooks [All, Playlist]
Video      [All, Playlist]
Podcasts   [All, Playlist]

Conversion policy for this device [Skip unsupported files, Unsupported files only, Unsupported and Lossless (default), Force for all files]
Convert to [...] [Edit]

---

Neatly arranging what to convert and how. It is the best compromise I have been able to come up with so far.
Comment 27 bugzilla 2011-06-01 15:51:56 UTC
I'd just like to chime in and say I'd like a way to disable this transcoding feature completely. It really irritates me that it's the default with no way to deactivate it. I'm sure it's a nice feature for people who have limited players, but when you're moving files to a capable device there's no reason to screw with them.

In my case I'm trying to sync MP3s to an Android phone. For some reason it's only giving me ogg vorbis and PCM as encoding options. That's doubly strange because not only does Android handle MP3 just fine out of the box, what it handles is completely established in software. It's perfectly possible to install media apps that can decode all sorts of wacky formats that stock Android knows nothing about. 

So even if the device is mistakenly reporting only some of the formats it supports there's no reason to assume that's 100% accurate. I'm sure I'm not the only person with a device that misrepresents itself or is reprogrammable. There should most definitely be a way to override it, and if there is I haven't found it after several hours of digging.

It seems like pretty bad usability to me to add any feature to a music player that could impact audio quality without providing a way to disable it right from the start.
Comment 28 David Nielsen 2011-06-17 18:33:29 UTC
Devices that support a format but which do not show up in the preferences is a bug. Can you please file that separately?
Comment 29 Aran Cox 2012-06-13 13:52:57 UTC
I once used a player that had a dialog that allowed you to transcode files over a certain bitrate.  If you set it to say 500 you'd transcode all the losslessly encoded files I have, but none of the lossy ones.  If you set it to say 250 you'd transcode for example high-bit rate mp3s to something smaller, and your flacs.  If you wanted to disable transcoding you could set it to 5000 or something silly.

With a setting like this I wouldn't need to tell Banshee (by modifying the code) that my Android phone doesn't support flac files (which it does, but I want them transcoded.)
Comment 30 André Klapper 2020-03-17 08:22:37 UTC
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the
responsibility for active development again.
See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.