Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Local transcoding for non-mp3 files #56

Closed
simon-weber opened this issue Dec 10, 2012 · 10 comments
Closed

Local transcoding for non-mp3 files #56

simon-weber opened this issue Dec 10, 2012 · 10 comments
Milestone

Comments

@simon-weber
Copy link
Owner

I assumed that MM did transcoding locally for non-mp3 tracks, but this was never verified. @mgillespie believes it's done server-side.

This should be investigated - it would drop a dependency and remove a lot of logic.

@ghost
Copy link

ghost commented Dec 10, 2012

Just to clarify, I don't see any CPU spike in task maanger that suggests any transcoding it taking place, pretty sure it's sending them as-is.

@fruel
Copy link

fruel commented Dec 24, 2012

I am pretty sure the files are transcoded on the Goolge servers.
Test scenario:

Uploading a FLAC file with Music Manager while monitoring the CPU usage.

FLAC File: http://www.eclassical.com/custom/eclassical/files/BIS1536-001-flac_16.flac
Mediainfo of FLAC: http://pastebin.com/tKMTeyc6

Uploading the file started immediately after I click the Upload button in Music Manager. CPU usage of the Music Manager is never higher than 6% (CPU: Intel Core 2 Duo T9900 @ 3GHz). Upload rate ~60kb/s

CPU usage statistic (Format: [Time] [Usage in %]): http://pastebin.com/EXM8Uciv

Uploaded file on Google Music: http://img189.imageshack.us/img189/5364/95410234.png

Mediainfo of MP3 downloaded from Google Music: http://pastebin.com/TNMmv26f

@simon-weber
Copy link
Owner Author

Thanks for checking this out, fruel; this seems pretty conclusive.

@simon-weber
Copy link
Owner Author

I just confirmed this.

Thanks for bringing this up; this is a huge simplification!

@simon-weber
Copy link
Owner Author

It looks local transcoding is done - this is causing problems with my new uploading code. I'm sure m4a -> mp3 is done, and wma -> mp3 might be done. Notably, flac can be sent as-is, which explains the above results.

@fruel, do you mind trying to upload an m4a to see if you can recreate this?

@simon-weber
Copy link
Owner Author

Actually, I just noticed that there are issues with my newly-uploaded flacs, too: I get a 400 when I try to stream, and a 404 when I try to download. I wonder if this is what #57 was referring to?

@simon-weber
Copy link
Owner Author

It looks like a new Music Manager was pushed out recently. I'll spend the weekend looking for evidence that non-mp3s can be uploaded without transcoding.

I'm planning to publish a new release next week that gets uploading working again.

@simon-weber
Copy link
Owner Author

Bad news: local transcoding is unavoidable right now. This is a bummer - especially for @mgillespie - but there's nothing I can do about it from my side. The current server software simply doesn't deal with non-mp3 uploads (note that I can actually get flacs and oggs up to the server, but they won't play. The Music Manager transcodes these same files to mp3 first).

There is some good news, at least: vbr mp3s are supported, and uploaded as-is (at least for <=320k. I haven't tried higher bitrates).

I'll use avconv like I used ffmpeg before, and I'll figure out some way for quality to be configured (likely just an int for -qscale). All of this will be explained thoroughly, and folks will always be able to transcode offline to mp3 if they don't want me to touch their music.

@simon-weber
Copy link
Owner Author

Ok, all my tests pass for 076c04b. This should work for all formats, but non-mp3 formats are transcoded with avconv.

If you get a "permanent error" from the server, you might have to change the tags of the file you're uploading before it'll work (this is the server seeing that it had a problem before with a file of the same hash).

@simon-weber
Copy link
Owner Author

Ok, transcode quality is now exposed when uploading: https://unofficial-google-music-api.readthedocs.org/en/develop/#gmusicapi.api.Api.upload.

simon-weber referenced this issue Feb 10, 2013
Music Manager doesnt transcode (e.g.) 320 kbps CBR Mp3s so add an option not to transcode uploads.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants