IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
foo_onewaysync, Copy playlists and files to your portable player with a single click
zimjo
post Apr 3 2014, 00:53
Post #1





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



Fellow foobar users,

as I got tired of manually moving playlists and their files to a portable player, I decided to create a component to simplify this task. Now, after many nights of fighting with the SDK and testing, I'd like to share my work with you.

foo_onewaysync adds menu commands that will copy selected playlists and the corresponding files with a single click. Plus the option to convert lossless files to mp3 on the fly. The lossy files will be stored also in the folder of the source file for later use. When choosing this option, I recommend to exclude the generated lossy files from foobars media library by adding the exclusion rule '*.lossy.mp3'.
A context command is also available under File Operations, in case you want to copy only a selection of files and not entire playlists.

Happy testing! smile.gif

Disclaimer: The component has been tested in foobar 1.3.1 on a Win7 machine and I did not encounter any problems. Nevertheless, I am not responsible if this component damages your files, crashes your computer or has any other undesired effects. Thank you.

Download
Go to the top of the page
+Quote Post
mudlord
post Apr 3 2014, 08:55
Post #2





Group: Developer (Donating)
Posts: 824
Joined: 1-December 07
Member No.: 49165



Is it possible to support other encoders than LAME?
I've been wanting to write a component like this for some time for my Sansa Clip Zip for syncing files both ways between my player and reencoding files.

edit: spelling

This post has been edited by mudlord: Apr 3 2014, 09:05
Go to the top of the page
+Quote Post
zimjo
post Apr 3 2014, 09:49
Post #3





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



Which encoder are you thinking of?
In principle, you can use any command line encoder able to handle PCM input, if it takes the two arguments source and destination filepath. The component does not care what is called, but it should produce a foobar compatible file at the expected location. However, some hardcoded command line options probably have to be adapted.
Go to the top of the page
+Quote Post
detmek
post Apr 3 2014, 16:10
Post #4





Group: Members
Posts: 85
Joined: 24-June 08
Member No.: 54802



Any chance to support DSP during conversion and lossy-lossy conversion?
I listen my music on phone which does not have crossfeed so I convert files using DSP Crossfeed into AAC. Source format is FLAC, AAC or MP3.
Go to the top of the page
+Quote Post
zimjo
post Apr 3 2014, 22:04
Post #5





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



Good idea! I've added lossy-lossy conversion, since it is reasonable in case a portable player does not support certain file types.
DSP functionality, however, is beyond the scope of this component. Maybe you can find an app for your phone which has a crossfeed feature...
Go to the top of the page
+Quote Post
chamber32
post Apr 4 2014, 00:12
Post #6





Group: Members
Posts: 38
Joined: 18-February 06
From: Bridge Creek, OK
Member No.: 27852



It would be great if one could specify max total size to copy.

c32


--------------------
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d303534
Go to the top of the page
+Quote Post
zimjo
post Apr 4 2014, 11:07
Post #7





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



What is the benefit of this? You would not be able to prioritize which playlists or files get copied. So the behaviour is similar to right now, copying stops if space in the destination runs out. In particular, every time you run the onewaysync command the same files are copied. The proper way to do this is imho to limit the length of playlists. If you want more refined control over size of playlists I suggest to look into foo_random_pools.
Go to the top of the page
+Quote Post
q-stankovic
post Apr 6 2014, 15:20
Post #8





Group: Members
Posts: 1748
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



If there is no playlist checked in "sync commands and options" then foobar2000 crashes when calling a command from main menu -> file -> onewaysync.

I've sended the crash report by foobar2000s crash dialogue.

Edit:

In preferences under the components page foo_onewaysync appears 4 times in the listing

Edit2:

I've sended two crash reports mor. The component crshes often when applying commands from Context menu

This post has been edited by q-stankovic: Apr 6 2014, 15:44


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
zimjo
post Apr 6 2014, 23:09
Post #9





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



Thanks for your feedback. Should all be fixed in newest version. Please let me know if you still experience crashes, in particular when using context command.
Go to the top of the page
+Quote Post
q-stankovic
post Apr 7 2014, 18:26
Post #10





Group: Members
Posts: 1748
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



Thank you for the component!

Before i come with some small suggestions and a feature request let me ask for the difference of the two commands in context menu "default" and "select..."

At first running the "default" command opens the same pop up dialogue like "select..." and then not. I don't understand that? What means "default" exactly?. And wouldn't it be enough just to have a "sync to..." command in file operations submenu?

__________________________________________

Another point: isn't it possible to get by sdk the commands of the convert submenu? So it would be possible to grab that commands from the "process destination files with"-list and to take full advantage of fb2k's converter capabilities (edit: see mudlords and detmeks requets)

__________________________________________

Edit: i would regard it as elegant if the context menu of one way sync would act like the other file operations commands: you start with "sync to..." and could use the dialogue for synching or saving a preset. Doing the latter would then turn "sync to..." command into "sync to -> submenu (presets + ´...` for calling the sync dialogue)"

Edit2: Ok, that was a very spontaneous request with the recreation of context menu and leads to the idea (if making it work like copy and move to) to having the general sync options in the "playlist to device"-window.

This post has been edited by q-stankovic: Apr 7 2014, 19:17


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
zimjo
post Apr 8 2014, 09:50
Post #11





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



I agree with you that it would be most elegant to use the built in foobar converter functionality. However, there is no interface to it in the SDK, in particular there is no way to get handles of the generated files.

The context menu commands should probably be made more intuitive. "Default" actually means last used setting. I will rename this and think about your suggestion for saving presets.
Go to the top of the page
+Quote Post
q-stankovic
post Apr 8 2014, 21:25
Post #12





Group: Members
Posts: 1748
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



Thank you for considering! I think apart from having commands in fileops submenu that are acting same the biggest advantage is to have the socalled "general sync options" defined seperately in each preset. So you can reflect that different devices act differently, f.e. one device can play a file format that the other one cannot. Global options are restricting in that case and only meaningful if having only one device. Edit: for the same reason i think it would be better to have these "general sync option" also preset specific in foobar2000 preferences so that the main menu actions could be adressed to different devices

________________________________________________

Two smaller suggestions for improving usability:

1. The name "Playlist to Device" for the popup windows is irritating: when running it the first time from context menu i thought that not only the selection would be copied but the whole playlist. Why not "Files to device"?

2. In preferences the "new" button at first adds the standard expression and then you have to click it for editing. Would be easier if the "new" button calls directly the editing window.





This post has been edited by q-stankovic: Apr 8 2014, 21:28


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
q-stankovic
post Apr 8 2014, 23:04
Post #13





Group: Members
Posts: 1748
Joined: 28-May 06
From: Düsseldorf
Member No.: 31251



QUOTE (zimjo @ Apr 8 2014, 10:50) *
I agree with you that it would be most elegant to use the built in foobar converter functionality. However, there is no interface to it in the SDK, in particular there is no way to get handles of the generated files.

I think you misunderstood me: i don't mean access of converter component directly by sdk but its commands in context menu - they are missing in the list of "process destination files with" list in ythe preferences. as far as i know that could be possible since i saw th access to dynamic submenus realized in several components. Wouldn't that do the trick?

This post has been edited by q-stankovic: Apr 8 2014, 23:05


--------------------
german support forum: www.foobar-users.de / user: qwert73
Go to the top of the page
+Quote Post
zimjo
post Apr 9 2014, 10:37
Post #14





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



No, as I stated above there is no way for my component to know where converter places the generated files. The key purpose of the component is to export playlist files, and store lossy conversions of lossless files, such that they don't need to be converted every single time. Both of which is not possible with what you suggest, at least not with the current SDK.

Thanks for your suggestions. I agree that the user interface is not perfectly polished, yet. Maybe I'll find time on the weekend to do that. smile.gif
Go to the top of the page
+Quote Post
zimjo
post Jun 3 2014, 22:39
Post #15





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



New version 0.2.6 available. Download here.
-improved: finding existing converted lossy files after move and rename
-improved: adding new folders and titleformat scripts is now more convenient

Currently, I do not plan to rework the context menu. I'm not really familiar with windows GUI programming and not eager to have to create more dialogs. wacko.gif biggrin.gif Just don't have the time for that now, also there doesn't seem to be a major interest...
Go to the top of the page
+Quote Post
yeeeargh
post Jun 4 2014, 10:46
Post #16





Group: Members
Posts: 19
Joined: 25-June 11
Member No.: 91829



hi,

just tested this component and I really like it. Exactly what I needed since I’m re-ripping my collection in FLAC.

But I foobar2000 crashes for me every time I use it. I tried running it via the menu command for a whole playlist and the context command for just a couple of files. The conversion works just fine and I have the files in the destination folder.

I sent both crash reports. If I can help you with other information to fix this, please let me know.

Anyways, thanks for the work!
Go to the top of the page
+Quote Post
zimjo
post Jun 4 2014, 12:41
Post #17





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



Thanks for your kind feedback and reporting the issue. Are you using the latest version of the component?
Does the destination location contain the playlist files?

Could you please upload the crash logs here, or send them to me via PM. This is probably faster than retrieving them from Peter.
Go to the top of the page
+Quote Post
yeeeargh
post Jun 4 2014, 12:59
Post #18





Group: Members
Posts: 19
Joined: 25-June 11
Member No.: 91829



QUOTE (zimjo @ Jun 4 2014, 13:41) *
Thanks for your kind feedback and reporting the issue. Are you using the latest version of the component?

yes. 0.2.6

QUOTE (zimjo @ Jun 4 2014, 13:41) *
Does the destination location contain the playlist files?

it just generates the playlist file when I sync a playlist. when i just convert them via the file operations menu no playlist files get generated, am I right?
so yeah, the m3u8 playlist gets generated.

QUOTE (zimjo @ Jun 4 2014, 13:41) *
Could you please upload the crash logs here, or send them to me via PM. This is probably faster than retrieving them from Peter.

going to pm them to you.
Go to the top of the page
+Quote Post
fate
post Jun 21 2014, 14:56
Post #19





Group: Members
Posts: 1
Joined: 21-June 14
Member No.: 116480



seems copying fails when the source is part of an zip archive :/

Console:
Error while copying: Z:\irony [ClariS].zip|01 - irony.mp3 -> F:\Music\ClariS - irony

Go to the top of the page
+Quote Post
zimjo
post Jul 3 2014, 22:50
Post #20





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



A new version with minor fixes is available here. Please let me know if you still encounter unexpected behaviour or crashes.
Thanks for testing!

@fate: zip or rar files are not supported by this component, sorry. Typically, it does not save a lot of space to compress music files. Why not just uncompress them? wink.gif
Go to the top of the page
+Quote Post
Chris Norman
post Jul 15 2014, 22:52
Post #21





Group: Members
Posts: 139
Joined: 3-June 05
From: Cluj-Napoca
Member No.: 22498



Thank you very much for this component. I have been waiting for something like this for a long time (basically since my ipod broke and that I have to use other devices / services now).

The ipod manager was the (almost) perfect way to keep a device synced with only a little effort.

I am syncing Google Music a Blackberry Z1 and an old Nokia phone with mp4/mp3 capability now.

Looking at the features of One Way Sync I could use very much the following features:
  • Possibility to use multiple command line settings. Google music is best served with mp3 (everything else gets converted by google music). The other devices are better off with nero mp4 (better sound at very low bitrates).
  • Possibility to conduct multiple commands instead of only one
  • Using the converter e.g. downmixing 5.1. mixes to stereo, to resample to 44,1 kHz or applying replaygain. (Currently, conversion will fail if target e.g. mp3 does not support multiple channels).
  • Embed and resize album art. All devices do not show art if it exceeds a certain size. (like foo ipod did)
  • Even thorough you wrote that you have no know knowledge of where the files are written to: a foo-ipod-like sync functionality would be awesome. If new files are added only these get converted, if files are removed from the playlist, they are being removed from the device as well. (I remember the author stored a sql lite database on the device which stores information of all files on the device).
Again thanks for the development and wish you all the best.

Cheers.







--------------------
http://www.vonpell.com
Go to the top of the page
+Quote Post
xen126
post Jul 17 2014, 17:01
Post #22





Group: Members
Posts: 4
Joined: 8-January 14
Member No.: 113883



Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?
Go to the top of the page
+Quote Post
zimjo
post Jul 17 2014, 23:26
Post #23





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



QUOTE (Chris Norman @ Jul 15 2014, 23:52) *
Thank you very much for this component. I have been waiting for something like this for a long time (basically since my ipod broke and that I have to use other devices / services now).
...
Again thanks for the development and wish you all the best.

Cheers.

Thank you! happy.gif

QUOTE
  • Possibility to use multiple command line settings. Google music is best served with mp3 (everything else gets converted by google music). The other devices are better off with nero mp4 (better sound at very low bitrates).
  • Possibility to conduct multiple commands instead of only one

These are great ideas. I think I will implement them as soon as I have more time again...which will be in a few weeks.

QUOTE
  • Using the converter e.g. downmixing 5.1. mixes to stereo, to resample to 44,1 kHz or applying replaygain. (Currently, conversion will fail if target e.g. mp3 does not support multiple channels).

I see that multi channel audio is problematic. Though, using foobars converter is not possible for the reasons I listed above. Adding DSP functionality is in principal possible and would resolve the issues you mention. However, I do not see this happening anytime soon. You can apply replaygain also by processing the destination files with a command...

QUOTE
  • Embed and resize album art. All devices do not show art if it exceeds a certain size. (like foo ipod did)

Personally, I do not use embedded album art. I would expect that album art is present in destination files if it was present in source files, is this not the case? Unless resizing can be achieved with standard functions of the SDK or WinSDK I do not see this coming for future versions.

QUOTE
  • Even thorough you wrote that you have no know knowledge of where the files are written to: a foo-ipod-like sync functionality would be awesome. If new files are added only these get converted, if files are removed from the playlist, they are being removed from the device as well. (I remember the author stored a sql lite database on the device which stores information of all files on the device).

Currently, only new files get converted/copied if the option to store converted files at source location is activated. In a future version, I will change the behaviour such that it is not necessary to convert files that already exist at the target location even when that option is disabled.
Removing files from the device, when removed from a playlist, is something I would like to see implemented myself. However, it is not straightforward to do, as one file might be referenced in multiple playlists, e.g. even in a playlist which is not part of the onewaysync command being processed. Since I could not come up with a good and simple solution, this is postponed for a later release.


QUOTE
Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?

Glad you like the component. Replacing with empty string works for me!
Go to the top of the page
+Quote Post
xen126
post Jul 18 2014, 10:50
Post #24





Group: Members
Posts: 4
Joined: 8-January 14
Member No.: 113883



QUOTE (zimjo @ Jul 18 2014, 06:26) *
QUOTE
Been waiting for something like this for ages!

I can't seem to replace a string with an empty string though.

For example, $replace(%path%,A,B) is fine but not $replace(%path%,A,). Or am I doing something wrong?

Glad you like the component. Replacing with empty string works for me!

I've been trying to replace multiple directories in the path so that I can preserve the folder structure when converting. $replace(%path%,C:\,) will work but anything more than that will result in an "incorrect path syntax", e.g. $replace(%path%,C:\Users,)

Although... I've been thinking that it might be easier to just keep the *.lossy.mp3 files and then extract them using a VBS later.

Also, it will be great if changed files, not just newly added files, will be converted as well! I suppose you can compare the .mp3's timestamp with the source file's "Date Modified" file attribute.
Go to the top of the page
+Quote Post
zimjo
post Jul 18 2014, 12:58
Post #25





Group: Developer
Posts: 25
Joined: 3-April 14
Member No.: 115309



QUOTE (xen126 @ Jul 18 2014, 11:50) *
I've been trying to replace multiple directories in the path so that I can preserve the folder structure when converting. $replace(%path%,C:\,) will work but anything more than that will result in an "incorrect path syntax", e.g. $replace(%path%,C:\Users,)

Although... I've been thinking that it might be easier to just keep the *.lossy.mp3 files and then extract them using a VBS later.

Also, it will be great if changed files, not just newly added files, will be converted as well! I suppose you can compare the .mp3's timestamp with the source file's "Date Modified" file attribute.


Try $replace(%path%,C:\Users\,).
The component will sync changes in tags, that includes replaygain, automatically. So there is no need to compare timestamps... unless I misunderstood your intentions?
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th June 2015 - 05:20