Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great utility but my Model 3 cannot play the m4a files copied over. #17

Open
ummgood opened this issue Apr 29, 2018 · 52 comments
Open

Great utility but my Model 3 cannot play the m4a files copied over. #17

ummgood opened this issue Apr 29, 2018 · 52 comments
Assignees
Labels
enhancement Tell Tesla :( Unfortunately, this looks like a Tesla software thing vs. something we can workaround

Comments

@ummgood
Copy link

ummgood commented Apr 29, 2018

I tried manually copying the files first before trying your utility and the car will not load the m4a files. It gives a "Loading Error" message on the screen. I was hoping your utility would convert them to FLAC but it is doing no conversion. I saw that your utility would auto convert but that is not happening. I guess the utility thinks the files are AAC. Anyway to get the utility to convert to FLAC so I can see if that will work on my car?

@tattwamasi
Copy link
Owner

What actual format are the files? The utility only converts Apple Lossless to flac. The car should play normal aac files, but won’t play “FairPlay” DRM protected AAC files like those from Apple Music subscriptions (purchased downloads are not DRM protected and should work fine).

@ummgood
Copy link
Author

ummgood commented Apr 30, 2018

They are m4a from the iTunes media directory. Not sure of the exact format. They are purchased songs as I don't have an Apple Music subscription. Plus I purchased them recently so they are not the old file type that Apple used to use back in the day that had DRM protection. They should be ok to play but TeslaTunes won't convert them AND the car won't play them. I was able to use another utility to convert one to FLAC (it required an AAC plugin to work) and the car will play the FLAC file. Is there any way I could let you know the exact format?

Otherwise the tool works well on copying them to the drive so it isn't an issue with the tool itself running on my computer. I have a 2017 MBP 13" with Touchbar if that helps.

@tattwamasi
Copy link
Owner

Interesting. I haven't had anyone else report any results one way or another with model 3's and playing various audio files. I haven't followed the forums so I don't know if we know the capabilities and differences of the 3 vs. S/X in terms of codec/format support.

Sounds like it's an AAC file and should play.

If you send me a file with that behavior to test (we'll delete it from the issue afterwards, or send me a link) I'll check it to see if it plays on a S, if you haven't tried.

It'd be preferred not to re-encode a lossy AAC file to FLAC, since it will (in theory, and at best) sound the same, and will be a lot bigger.

@ummgood
Copy link
Author

ummgood commented Apr 30, 2018

Here's a link. Let me know when you get it so I can delete the file.

Thanks for helping! What would be cool in the tool is there was a way to force the conversion even if it might take up more space just in case someone wants to use the USB drive for a different car or something that doesn't support AAC. I love how the tool syncs the drive and that is why I wanted it to work because I am too lazy to do it manually.
<snip - got it>

@tattwamasi
Copy link
Owner

Got it. Looks like a normal 44.1KHz AAC file. 263 Kbit/s bitrate. Would expect it to work fine in car. Will check it.

@tattwamasi
Copy link
Owner

Yeah, that file works fine in my car. You've tried different fobs and filesystems on the fob (or at least just used fat32?)

Will ask Google about Model 3 AAC support.

@lraesly
Copy link

lraesly commented Apr 30, 2018 via email

@tattwamasi tattwamasi added enhancement Tell Tesla :( Unfortunately, this looks like a Tesla software thing vs. something we can workaround labels Apr 30, 2018
@ummgood
Copy link
Author

ummgood commented Apr 30, 2018

Thanks I used the same thumb drive so I'll order another one to try it out. I did reformat it again just to make sure it wasn't something weird. The car can see the file system and shows the artist/song name/etc... including album art. It just will error when trying to play the file.

@ummgood
Copy link
Author

ummgood commented Apr 30, 2018

Oh and I used Fat 32. The first time was formatted on a work machine (windows). The second time I formatted it using the disk utilities on my Mac.

@tattwamasi
Copy link
Owner

I've seen a few posts now about some individual's having issues with their model 3s and AACs and with Apple's iTunes purchased AAC's in particular. Fat32 is right, and you have tried everything I'd expect, at least once you use another fob to confirm the drive is good (but since it sees the filesystem and you can read/write the drive from both laptop and car, I doubt it's an issue).

Really sounds like the AAC bug others have mentioned, but I have no other knowledge of the specifics. I'll see if I can get more info in order to see if there's anything the app can do to provide better options / workaround, but barring something simple, I'd rather Tesla fix AAC playback over having to go through a lossy recompression cycle. I can look at whether it'd be easy to allow Flac conversion for AAC, but I hate that as a workaround.

No promises or timelines, but I'll see what I can find out.

@ummgood
Copy link
Author

ummgood commented Apr 30, 2018

Thanks I appreciate all you have done. I know this is a side project for you :)

I am a software developer by trade as well but not for Mac. I could probably hobble something together but yours seems to be the best solution right now so I figured I would reach out first to see if there was something that could be done.

I agree that the workaround is bad but it would at least get the Model 3 owners who want this up and running until Tesla fixes the software. I have a new flash drive coming tomorrow so I'll try that out just to rule out that as a possible issue. I just thought maybe a check box on the screen to "Force all AAC to FLAC" but then you might not have that converter in the software because it does lossless to FLAC but maybe not AAC to FLAC.

No hurry at all...

@tattwamasi
Copy link
Owner

Yeah, it was written just for alac to Flac support when it comes to conversions, but I did consider what I'd need to do to allow other things to convert to Flac, so it's not necessarily a big deal, just another wart to risk making the UI and choices more kludgy and confusing.

Anything that eliminates a pain point for doing this process is something worth considering - just don't want to add more pain as I go 😜

I sent a question regarding this off to Tesla, but I wouldn't count on a useful response. Will see what your new drive does tomorrow before making a decision.

@aiyagari
Copy link

I have the exact same problem on my new Model X as well. AAC files purchased from Apple don’t work, even though the artwork, artist etc all show up fine (so the metadata is obviously OK). I would like the reencode option as well - space is not a concern since I am using a portable 1 TB hard drive.

@tattwamasi
Copy link
Owner

If I were to add an option to covert the AAC (not just apple lossless) files to Flac, what would people want to see as options/Interface? I think I'd probably just do another checkbox "Convert AAC to FLAC" with the rest of them, and put up a warning about size/lossy conversion if/when it is clicked.

@lraesly
Copy link

lraesly commented Apr 30, 2018 via email

@ummgood
Copy link
Author

ummgood commented May 1, 2018

I think that is a great idea to add the check box and the warning.

@ummgood
Copy link
Author

ummgood commented May 1, 2018

Another thought I had was when I want to go back to AAC after the Model 3 has its kinks worked out if I uncheck the checkbox would the software replace the FLAC files with AAC? The other option is to wipe out the flash drive and run the software again like a fresh USB stick and that would accomplish the same result.

@lraesly
Copy link

lraesly commented May 1, 2018 via email

@tattwamasi
Copy link
Owner

reviewing the code (I'm at the stage where I wonder who wrote it when I look at it again), it does look like it'd be reasonable to change up a couple things and allow AAC conversion till the playback problem is fixed.

Unless I add other checks and cruft, I think you'd expect to just wipe and reload the flash later rather than expect the app to remember what it converted previously even though the destination is now a different name.

However if it's a playlist, then it is handled like @lraesly mentioned - anything no longer on the playlist will get deleted.

Otherwise the Flac files will just be regarded as extra files and left there for non-playlist situations.

@ummgood
Copy link
Author

ummgood commented May 2, 2018

Just an update I got a new USB thumb drive (128GB and FAT). The m4a files still do not play and the only files that play are two mp3 files that I had in my library that I ripped myself. So the drive functions.

I am wondering if the unified firmware has an issue because the Model X that has problems above. I know Tesla went to unified firmware for Model 3/S/X so maybe newer cars have the issue?

@tattwamasi
Copy link
Owner

If you'd like to try an in-development version that has the checkbox discussed above, you can try the one I've attached. I tested it with the file you provided and it converted to Flac ok, and sounded like the original, had good artwork, tags, etc. when I played both in my S and on the computer.

I've done very little testing on this version. I did end up redoing the UI code a bit and haven't finished tidying up the layout, resize, etc. behavior yet, so there could be new UI issues provoked. I don't think my changes are likely to have broken anything previously working, but be sure to let me know if anything seems off.

If this serves as an ok workaround for the moment, then I'll clean it up and finish the other items I was working on, then make a new release for others.
TeslaTunes_1.2.6-5-g23e17d9.zip

@tattwamasi tattwamasi self-assigned this May 4, 2018
@ummgood
Copy link
Author

ummgood commented May 8, 2018

Thank you for this! Sorry I didn't comment earlier I was out of town and then took my car into get tinted and detailed. I am picking it up tonight and will try the new version. Sorry didn't mean to leave you hanging.

@ummgood
Copy link
Author

ummgood commented May 9, 2018

I tried out the version attached and it worked great. The FLAC files worked fine in my Model 3. I had a weird issue where all my playlists didn't get moved over but it could be that my computer had some issue in the middle of the night. I won't be able to test again in a couple weeks because my car was taken by Tesla to get repaired today.

Thanks again for the help!

@tattwamasi
Copy link
Owner

Great. I'm going to continue slow but sure (well, slow at least) progress in making it and the other recent maintenance work ready for a new release. In the meantime, you and anyone else desperately wanting the workaround can feel free to use the dev version I linked.

Will close when I get that release official.

@aiyagari
Copy link

aiyagari commented Jul 5, 2018

Your development version is confirmed working on my Model X! Thank you! Why don't you go ahead and turn that into the production version?

@ummgood
Copy link
Author

ummgood commented Jul 24, 2018

Ok another thing I have found with this version is it converts and populates the thumb drive and my playlists but when it is done it goes back and deletes everything out of the playlist directory. Is this a bug with the bug fix release or is it something I am doing wrong?

@tattwamasi
Copy link
Owner

tattwamasi commented Jul 24, 2018

Not sure based on the description, yet.
Here’s what is supposed to happpen, based on memory. If and only if you select sync playlists too, then the app will manage the playlist directory on the destination in order to completely remove anything under that directory that is not currently in the current selected playlists.

Are you seeing something different? If you have sync playlists checked but didn't select any playlists, then not sure but I think the expected behavior would be to clear the playlist directory on the destination.

This behavior is different than the more aggregation oriented throw it all together thing I do for the music collection in general but it seemed like the right thing to do for playlists.

If you are seeing something different then describe and we will figure it out.

@ummgood
Copy link
Author

ummgood commented Jul 26, 2018

I'll attach a screen shot of how I have the app setup. I have 2 playlists selected that have about 250 songs combined. I have a 128GB flash drive I am writing to and my music library is only 7 GB. I do have podcasts on there that are 22GB in size. I'll kick off a run tonight and see how much space I am using unless FLAC is so large it is filling a 128GB drive.

When I watch the utility run and watch the filesystem while it is running it creates the two playlists and all the songs are present in the directories. Then at the very end it does a cleanup step and deletes everything in those directories. The main directories with all the music are fine. I'll post another photo probably tomorrow morning (I have to let it run overnight unless I have time to run it at work) with some more screenshots.
teslatunes

@ummgood
Copy link
Author

ummgood commented Jul 26, 2018

Oh and I just checked and I don't have the podcasts directory selected only the music directory under iTunes Media.

@ummgood
Copy link
Author

ummgood commented Jul 26, 2018

So I have been running it for about 4 hours. It currently has only 5 songs out of 71 in one of my two playlists. They are prefixed with the numbers 67-71. The interesting thing is on the main application UI it has Marked for/Deleted: 66. This is interesting because that is exactly the number of songs missing from that one playlist. It is currently working on the second playlist.

If I go into iTunes and look at the songs in the playlist the FLAC file is present in the Music directory it just for some reason thinks it needs to mark or delete the files in the playlist directory. The drive is currently at 40GB used with about 80GB free and I believe it is almost done processing.

@tattwamasi
Copy link
Owner

I'm a little stunned at how long you say this is taking. Maybe it's just spending all the time in the library portion and you have a large library? Shouldn't take that long for a few hundred files. Minutes not hours.

I tried to understand what you are seeing by taking the exact download linked above and copying a playlist. It did what I expected. All files in the playlist that it could access/convert, it did. Those it couldn't (in my case, I think Apple Music stuff that didn't have a file location) it skips but leaves a "hole" in the numbering for the playlist (so you can easily see which got skipped).

If you sync a playlist, then that playlist has changes the next time you sync it - for example you removed some tracks, reordered (note - I am going from memory on reordering), or if for some reason the app can't read the file location of the song from the playlist, then it will delete the things no long available while adding anything new.

I had to put a hold on wrapping up a new release right now anyway due to Xcode and Mojave changes I want to work out first, but definitely want to understand and alleviate whatever issue you are seeing.

@SpiceWare
Copy link

More data - tried your May 3rd build with the AAC->FLAC conversion. I originally tried "Copy whole library/folder" but realized it wasn't going to fit on the USB stick so aborted it and created a Smart Playlist with just a subset of my music. During the run I could see all the FLAC files appear on the USB stick. Once done, all but a few were deleted from the USB stick.

If I click STOP to abort the run then any files created remained on the USB stick.

Runtime also seemed much longer than I expected ~90 minutes for ~1000 files. CPU time was very low, possibly a USB bottleneck? I'm on a 2013 Mac Pro, still on 10.12.6 Sierra due to compatibility issue between High Sierra and my OWC Aura SSD.

after run without stopping:
screen shot 2018-10-11 at 10 40 13 am
screen shot 2018-10-11 at 10 40 16 am

after aborted run:
screen shot 2018-10-11 at 10 54 46 am
screen shot 2018-10-11 at 10 54 54 am

@SpiceWare
Copy link

Additional data:

Doing a single album works when done using Copy Whole Library/Folder:
screen shot 2018-10-12 at 10 51 25 am

screen shot 2018-10-12 at 10 51 18 am

If I create a playlist of that album I can watch them get created but then most of them are deleted.
screen shot 2018-10-12 at 10 52 11 am

screen shot 2018-10-12 at 10 52 05 am

If I run it again the playlist on the USB drive is deleted, then recreated, and a different handful of songs remain. I suspect the deletion is done as the songs in the playlist could have changed, so the numeric prefix for each song could be different.
screen shot 2018-10-12 at 10 52 39 am

screen shot 2018-10-12 at 10 52 37 am

If I rerun the Library/Folder it sees that it already created them so does not recreate them.
screen shot 2018-10-12 at 10 52 58 am

@tattwamasi
Copy link
Owner

Ok. You've obviously found a bug related to playlist processing with the convert all workaround.

I'll look into that code path. Meantime, no need to spend a lot of time on it - you've really gone above and beyond in terms of all the screenshots. IF you feel like bothering, I'm curious about 2 things:

  1. What happens if you do the playlist as above, in the way that's acting weird, but without the new hack "Convert .m4a AAC files too" selected? Same behavior or does it work more like how I described in a previous post?

  2. Has Tesla fixed the AAC player yet in the 3/X? Because this is a stupid workaround and I'd like to burn it with fire rather than let it get embedded into the utility long term :)

@SpiceWare
Copy link

SpiceWare commented Oct 12, 2018

No problem, I was working up instructions on how to use it due to a discussion on Twitter, so was already making a bunch of screenshots :)

I'd initially aborted a run to confirm purchased AAC and ripped AAC both played OK once converted to FLAC, so I knew ahead of time that an aborted run wouldn't delete what it'd already converted.

  1. Unchecked .m4a, behaves the same with different tracks being left behind after each run. It appears to alternate between leaving behind 5-8 and 9-13, have not seen any other combination of tracks left behind for that playlist.

  2. I've never had any luck with AAC tracks in my 3, only MP3 and FLAC that I converted using ver TeslaTunes 1.2.6. It's possible V9 will fix it, though I'm still waiting on it - my 3's on 2018.36.2 ac4a215.

screen shot 2018-10-12 at 3 24 24 pm

@MSimek-Quest
Copy link

  1. Has Tesla fixed the AAC player yet in the 3/X? Because this is a stupid workaround and I'd like to burn it with fire rather than let it get embedded into the utility long term :)

Just installed latest software update 2018.39.7 on Model 3 and AAC files still do not play, when I asked Tesla Service they told me to convert files to MP3.

@SpiceWare
Copy link

Decided to convert my entire iTunes library, directed it to save to my Drobo as I didn't think it would fit my USB stick. Was correct on that, about 80 GB short. Will need to weed out some stuff before moving it to the stick.

This did confirm the slow speed I saw was due to USB as it took ~70 minutes to convert ~9000 tracks (was ~90 for ~1000 before).

@lraesly
Copy link

lraesly commented Oct 14, 2018 via email

@tattwamasi
Copy link
Owner

tattwamasi commented Oct 15, 2018 via email

@tattwamasi
Copy link
Owner

I've done some casual quick looking at the playlist cleanup code, and I am not seeing where the unexpected deletion/cleanup is going wrong. I'm sure it's there, so will just have to set up a better test run and look harder

@ummgood
Copy link
Author

ummgood commented Nov 7, 2018

Here is another interesting data point. I am the original person complaining about it deleting the playlist files. If I check the "Set genre to playlist name" option then it does not delete the playlist files.

@tattwamasi
Copy link
Owner

There's a new build linked in #19
There was a potential threading issue fixed in it that has an off chance of being related to unexpected playlist cleanup stuff (but not likely). Feel free to try it out. There's another code path that could be an issue that I still need to think about more, but either way I haven't forgotten.

@SpiceWare
Copy link

Somehow I missed this. I just ran a test of the Jan 28 test build and successfully converted a playlist without any tracks getting deleted afterward.

I'll do more extensive testing next week.

@SpiceWare
Copy link

SpiceWare commented Apr 14, 2019

Kicked off a conversion of my 3*, 4*, and 5* playlists last night, it was successful! Did notice 2 things:

The TeslaTunes finished around 10pm, but the USB was still flashing so I let it be thinking the file copying had been cached by the OS. Was still flashing when I got up this morning. Realized Spotlight was most likely indexing the files, so added the USB stick to Spotlight's Privacy list and the USB activity stopped. So maybe make mention somewhere that the user may wish to add the stick to Spotlight's ignore list before starting in order to speed things up.

I have the 26 radio programs of Hitchhickers Guide to the Galaxy and Fits 2, 9, and 10 were listed out of order in the car. Looks like the sequence numbers were different for some reason, likely due to the multithreading of the jobs.

Screen Shot 2019-04-14 at 9 53 34 AM

Had a similar issue when I'd previously converted Music/Folder as the tracks were named using DISC#-TRACK#-TITLE but DISC# only using 1 digit formatting so the car sorted the episodes on discs 10, 11, etc directly after the episodes on disc 1.

Both times it was just a minor issue, I renamed the tracks to fix the order. Maybe an option when coping using Playlists to put the tracks on the USB drive using same path & filename as when using Music/Folder option. Also change the disc# formatting to use 2 digits like the tracks, so disc 1 would be 01.

Anyway thanks!

@tattwamasi
Copy link
Owner

Thanks for the feedback, first off. And it pleases me to see Hitchhiker's Guide radio broadcast get mention - great version of the great story by a great author, imo.

Are the results you are reporting re: hitchhiker's guide from converting a smart playlist or something? When the filenames for a playlist are created, the first digits should exactly match the displayed order in iTunes of the playlist (assuming natural order and not re-sorted). That portion of playlist handling happens prior to multithreading the actual copying and conversion of the files.

I can't explain the order with what I know so far. Can you confirm the default ordering in iTunes and verify it's different?

As for the similar issue mentioned, I'm not sure where those names came from for you. I don't change the filenames for general non-playlist copying/converting. They are just whatever they were originally, no changes other than changing the extension to Flac if converted. For the names I create, in the case of playlists, I actually check the number of digits in the number of songs in the playlist so I can pad appropriately for the sequence number, but I never use the track or disc numbers in any filename I actually generate (so far as I see and recall).

You're probably right about spotlight, and up to the user if they want to disable indexing removable storage, etc. If the app says it's done though, should be fine to safely eject the fob and let the indexing handle itself at low priority in the background - no need to pay any attention to it really.

So, I'd like to get to the bottom of the playlist order issue you mentioned (which is big if it isn't getting the order right), but otherwise things seemed fine for you, given the notes I just made?

@SpiceWare
Copy link

SpiceWare commented Apr 14, 2019

The current results are from converting a smart playlist. The order in iTunes appears to be random, while the USB stick appears to be by album name.

Screen Shot 2019-04-14 at 3 43 47 PM

Screen Shot 2019-04-14 at 3 44 05 PM

Finally figured out how to change the view in the playlist - it was sorted by Rating on a smart playlist containing only tracks with Rating of 5. I just changed sort to Artist and THHGTTG are now all in order. I'll run TeslaTunes again, I'll report back when finished - I bet the tracks will end up in the order I expected.

The prior time I'd converted using Music/Folders, and looking at THHGTTG tracks in iTunes' folder I see the root of the filename matches what I saw on the USB stick from before, so that explains it. Mac does a smart-sort so 10 gets sorted after 9, the Tesla apparently does not so 10 gets sorted after 1.

Screen Shot 2019-04-14 at 3 53 38 PM

@SpiceWare
Copy link

Bummer, with the playlist sorted by artist:

Screen Shot 2019-04-15 at 8 06 52 AM

THHGTTG converted with the same positions as before.

Screen Shot 2019-04-15 at 8 00 37 AM

Oh well, at least the songs no longer delete after conversion and it's easy enough to rename THHGTTG tracks so they list in the correct order.

Anyway thanks for the utility, I do appreciate it!

@tattwamasi
Copy link
Owner

tattwamasi commented Apr 17, 2019

So the view in iTunes of a playlist doesn't change its playlist order in the actual playlist, though you can choose from the view menu how to sort (including by playlist order) for the iTunes display and playback at that moment in the playlist.

I looked at a smart playlist I had, change the view to playlist order, then was able to drag around the items to change the order. I'm not positive that it is persisted, but I did quit/restart iTunes after changing the playlist order in the smart playlist and it stayed changed. I expect it'd get changed again when the smart rules get reevaluated, but I'm not sure.

Anyway, that'll probably work to fix the order and be a bit easier than manually renaming.
[edit] suppose you could also just do a quick convert of the smart list to a normal list, which would "freeze" the order till you want to refresh it.

If I'm understanding correctly at this stage, things are working "as intended" for you, in terms of the actual app, correct?

@SpiceWare
Copy link

Correct - all my music wouldn't fit on the USB stick. With your latest test build I was able to use my 3*, 4* and 5* smart playlists to copy/convert a subset that would fit.

Thanks!

@tattwamasi
Copy link
Owner

OMG the size of this thread…

Anyway, I went to Tesla again after I saw I hadn't received a reply from my year ago Tesla inquiry, where I provided them with one of the files a Model 3 owner said wouldn't work, and which worked fine in the S. Here's their reply:

Thank you for reaching out to Tesla customer support. This is definitely an interesting topic and there can be a few different variables as to why these owners are experiencing their files not playing. AAC is definitely something we support and as long as it is formatted correctly there should be no issues with playback. At this time we would recommend you inform these owners that you come in to contact with to reach out to Tesla support so we can diagnose their cars and what may be going on.

So… I don't know. Seems crazy that it wouldn't be supported, so please make some noise. The workarounds to blow the files up by several order of magnitude, or (as I was thinking of adding if never fixed) converting to another lossy format like mp3 are all just, well, lame.

@SpiceWare
Copy link

Been quite busy of late, my folks bought a new house and temporarily moved in with me as their old home sold faster than expected. We moved them into the new house last weekend, have lots of unpacking left to do. I hope to follow up on this next month.

@aiyagari
Copy link

How exactly am I supposed to do this? Their app has only well-defined categories of requesting service, and the phone system doesn't do much other than hang up on you. There seems to be no system to give general feedback to Tesla.

Thank you for reaching out to Tesla customer support. This is definitely an interesting topic and there can be a few different variables as to why these owners are experiencing their files not playing. AAC is definitely something we support and as long as it is formatted correctly there should be no issues with playback. At this time we would recommend you inform these owners that you come in to contact with to reach out to Tesla support so we can diagnose their cars and what may be going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Tell Tesla :( Unfortunately, this looks like a Tesla software thing vs. something we can workaround
Projects
None yet
Development

No branches or pull requests

6 participants