-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add file compression #11
Comments
Hmm, a valid idea, can be done using a ffmpeg/libav dependency. However, I am unsure of the design where this feature will fit in. One option would be to have an additional optional |
I'd say those 2 features could work independent, but would profit from each other. The optional dir would be required since a compression allows more files to be added after compression. But in general it would be a nice idea, so say the script "pick this path". So optional input/output params would be nice. Compression itself makes sense and can be done with some decoder as you suggested. --bitrate (-b) would make sense. Default is no optimization. |
Looking at the source I think we need to change a few more things to make this API more flexible. I also though of just appending files. Like you select an input source This requires to write the database again. You need to scan the whole ipod for files and then rewrite the database. Thinking about this some time, I found out we just dont need to change that much and keep things intuitive. We just need to add an import function. Within this import it simply copies data to the ipod. We can add those features then:
After importing the normal database generation function runs. You have a new database which has the imported and existing files in place. This way you can drag&drop files onto the ipod. Also other ideas would be to:
|
The importing workflow and features sounds good to me, nicely summed up. I think importing it the same way as Rhythmbox (Artist/Album/Track.mp3) should be the good thing to have, conflicts being resolved through suffix renaming. I think rather than stuffing things inside the single shuffle.py file, importer should get its own importer.py which can be used by shuffle.py. Adding this feature should not be challenging, will just require handling edge cases and testing. Regarding the other ideas
|
Adding a 2nd script sounds nice. Auto organizing the sounds might be an idea, but I just though it would copy the structure of a folder into the ipod. About idea 1) I would just write it as additional tip into the readme. Other suggestions will follow. But we should keep structured and dont mix up issue topics. Looking forward to see a very nice api here. Rythmbox and other programs could use this as underlying api too, if its good and flexible enough. |
I currently tried to add lame encoder for smaller files. However there is a problem with converting files over and over again. We could create a special database file for the converted files (but removing files will not be recognized) or special The best solution would be to check the quality before converting. Or as discussed an import/convert script that does the job. A special script with input/output folder param would possibly the best. Maybe just in normal bash, not python. If no output is provided it could just overwrite the files (as described above). |
This tool suits my needs: You can convert a whole folder to mp3. You can copy additional data, you can exclude dirs, you can skip already encoded files etc. Other alternatives can be found here: The input files have to be flac though, but the ffmpeg script for example should also work with other inputs. The mentioned program above has even multicore support, so its super fast. I just need to have flac sources though. We could add this information to the Readme and close this issue. Or we integrate the program as optdep and somehow add a param for it. But I dont think this makes much sense. |
soundconverter Is also a very nice app. I just copy everything to /tmp (ramdisk) and the convert the files via replace. Then finally move them to the ipod and generate the database. |
Lets just write our own ffmpeg scripts? It is quite straightforward, and we also avoid dependencies. ffmpeg can take up any audio file and converts it to target format with specified bitrate. I will prepare a demo script and get your feedback on it. |
Actually this is not required. I am really happy with the last solution (soundconverter) which can also be used in batch and gui mode. You could also just select input folders and output all of them to the ipod. So its extremely simple and straightforward. I think no additional script is required, it would just have less fetures. I suggest to add the archwiki page and the soundconverter link to the readme and close this issue. For me that really solved the problem. |
Okay, makes sense. We need not reinvent the wheel! Updated the readme |
Thanks. Do you really plan on switching to python3 now? If not I will update the pkgbuild with python2. |
I am wondering if it would be possible to place the mp3 file in a directory outside the ipod and then transfer them. We could then also reduce the filesize with compressing the files.
Itunes also has this option and I really appreciated this. I normally only have 320kb/s mp3, but on an ipod it its really low space. Having an option for 192kb/s or others would be really nice. If you dont need to manually do it and just select a folder from your music library, copy and shrink it, that'd be perfect.
Any chance to see this?
The text was updated successfully, but these errors were encountered: