IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
iTunes Encode and foobar2000
Sebastian Mares
post Jan 15 2006, 19:58
Post #1





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



Hello!

I am not sure if this should go to AAC or foobar2000, so sorry if I made the wrong decision.

Anyways, I am trying to convert some of my WavPack disc images to AAC tracks for use in an iPod. Since I don't want to decode the files to WAV with foobar2000, then import them in iTunes, have it encode one album, then switch to MP3Tag to add tags and change the filenames, I would like to do the whole conversion in one step using foobar2000 and the promising-looking iTunes Encode. However, although following the instructions from the readme and setting the bit-depth to 16 bits in fb2k as recommended by several users, foobar2000 always fails with the message that file XYZ could not be flushed. iTunes seems to receive only one file, while fb2k is sending two. Any idea how to solve the problem?

Regards,
Sebastian

Edit: I am using foobar2000 0.9 Beta 13.

This post has been edited by Sebastian Mares: Jan 15 2006, 19:59


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
skelly831
post Jan 15 2006, 20:07
Post #2





Group: Members (Donating)
Posts: 782
Joined: 11-April 05
From: México
Member No.: 21361



I've been using iTunesEncode and Foobar 0.9 b13 to convert WavPack+Cue images for a while, I've had no problems. All I do is set up iTunesEncode like the Readme file says to do with Foobar, the resulting AAC files are tagged with iTunes and named like specified in the Converter settings. I don't remember if I set it to 16bit or 24bit, I think I had it set to 24 (there's currently nothing installed on my PC so I can't look, sorry).

EDIT: Maybe you set it up for piping instead of a temp file, maybe that's the problem.

This post has been edited by skelly831: Jan 15 2006, 20:09


--------------------
we was young an' full of beans
Go to the top of the page
+Quote Post
Sebastian Mares
post Jan 15 2006, 20:23
Post #3





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE (skelly831 @ Jan 15 2006, 08:07 PM)
I've been using iTunesEncode and Foobar 0.9 b13 to convert WavPack+Cue images for a while, I've had no problems. All I do is set up iTunesEncode like the Readme file says to do with Foobar, the resulting AAC files are tagged with iTunes and named like specified in the Converter settings. I don't remember if I set it to 16bit or 24bit, I think I had it set to 24 (there's currently nothing installed on my PC so I can't look, sorry).

EDIT: Maybe you set it up for piping instead of a temp file, maybe that's the problem.
*


Well, this is what I have:

Encoder: Custom
Encoder: C:\WINDOWS\iTunesEncode.exe
Extension: m4a
Parameters: -e "AAC Encoder" -a "%artist%" -l "%album%" -t "%title%" -g "%genre%" -y %date% -n %tracknumber% -i %s -o %d
Format is: lossy
Highest BPM mode supported: 16
Display name: M4A (iTunes), ~128kbps

When selecting a bunch of files and telling fb2k to convert into same directory with [%track% ]$if2(%title%,%filename%) as naming scheme, I get this error:

QUOTE
Error flushing file (Object Not Found) : file://D:\Eigene Musik\Hohe Qualität\Chris Rea\Espresso Logic\02 Red.m4a


As I said, fb2k is always processing two files at a time (maybe because I have two logical CPUs?).


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
skelly831
post Jan 17 2006, 00:38
Post #4





Group: Members (Donating)
Posts: 782
Joined: 11-April 05
From: México
Member No.: 21361



Maybe if you try a different output filename and/or have iTunesEncode.exe in another directory, I keep it in Foobar's directory. Your parameters seem fine tho.


--------------------
we was young an' full of beans
Go to the top of the page
+Quote Post
richard123
post Jan 17 2006, 02:27
Post #5





Group: Members
Posts: 342
Joined: 9-January 03
Member No.: 4498



Try converting something else, such as a wav or flac file, with those parameters and see if it works. That should help narrow the problem.
Go to the top of the page
+Quote Post
tedgo
post Jan 17 2006, 09:38
Post #6





Group: Members
Posts: 1078
Joined: 16-April 04
From: Bavaria, Germany
Member No.: 13548



Try:

-e "AAC Encoder" -a "%artist%" -l "%album%" -t "%title%" -g "%genre%" -y %date% -n %tracknumber% -d -i %s -o %d

(-d deletes the encoded tracks from the iTunes library. I got a similar problem with iTunesEncode before using this switch. Don't ask me why...)
Go to the top of the page
+Quote Post
Synthetic Soul
post Jan 17 2006, 10:12
Post #7





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (Sebastian Mares @ Jan 15 2006, 07:23 PM)
As I said, fb2k is always processing two files at a time (maybe because I have two logical CPUs?).
According to this thread foobar 0.9 has done this since beta 10.

I can only assume that iTunes cannot handle being told to encode two files at a time.

It would be a shame if you cannot work around this on a dual processor machine.

Edit: Could you try with 0.8.3?

This post has been edited by Synthetic Soul: Jan 17 2006, 11:00


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
Alex B
post Jan 17 2006, 11:50
Post #8





Group: Members
Posts: 1303
Joined: 14-September 05
From: Helsinki, Finland
Member No.: 24472



I can't get it working.

With foobar 0.9 b12 I get the same error message as Sebastian. foobar 0.83 hangs in the first "converting" display and the foobar task must be killed.

This happens with various source file formats. "-d" does not help anything. I have the P4 Hyperthreading enabled (uses two virtual processors).

This used to work with some older iTunes version several months ago. I guess iTunes has changed since then (I have v. 6.0.1.3 now). On the other hand the iTunes module in dBpowerAMP works.


--------------------
http://listening-tests.freetzi.com
Go to the top of the page
+Quote Post
Synthetic Soul
post Jan 17 2006, 12:20
Post #9





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



I have 6.0.1.3, and a machine with 1 processor.

It works fine using Otto's suggested fb2k command line with foobarr 0.9b13.


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
arman68
post Jan 17 2006, 15:23
Post #10





Group: Members
Posts: 111
Joined: 11-December 01
Member No.: 625



I had the same problem with Hyperthreading, and in the end, I had to turn hyperthreading off.

Just a thought: it might be possible to restrict it to only 1 instance using processor affinity. I have not tried though.
Go to the top of the page
+Quote Post
Synthetic Soul
post Jan 17 2006, 15:31
Post #11





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (Alex B @ Jan 17 2006, 10:50 AM)
This used to work with some older iTunes version several months ago. I guess iTunes has changed since then (I have v. 6.0.1.3 now). On the other hand the iTunes module in dBpowerAMP works.

Is it possible that you were also using a version of foobar 0.9 pre beta 10?

I.e.: It may not be the change in iTunes, but more likely the change in foobar that has stopped it working.

Edit: Although this doesn't explain why you have problems with 0.8.3... sad.gif

This post has been edited by Synthetic Soul: Jan 17 2006, 15:33


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
Sebastian Mares
post Jan 17 2006, 16:51
Post #12





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



Using fb2k 0.8.3 is not an option for me, sorry. So, dBpowerAMP can encode to AAC using iTunes' / QuickTime's codec?


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
fairyliquidizer
post Jan 17 2006, 17:06
Post #13





Group: Members
Posts: 318
Joined: 11-November 03
Member No.: 9786



QUOTE (Synthetic Soul @ Jan 17 2006, 06:31 AM)
QUOTE (Alex B @ Jan 17 2006, 10:50 AM)
This used to work with some older iTunes version several months ago. I guess iTunes has changed since then (I have v. 6.0.1.3 now). On the other hand the iTunes module in dBpowerAMP works.

Is it possible that you were also using a version of foobar 0.9 pre beta 10?

I.e.: It may not be the change in iTunes, but more likely the change in foobar that has stopped it working.

Edit: Although this doesn't explain why you have problems with 0.8.3... sad.gif
*


http://www.dbpoweramp.com/codec-central-mp4.htm


--------------------
http://www.glop.org/starforce/
Go to the top of the page
+Quote Post
Otto42
post Jan 17 2006, 17:35
Post #14





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (Synthetic Soul @ Jan 17 2006, 04:12 AM)
I can only assume that iTunes cannot handle being told to encode two files at a time.

I can confirm this. iTunesEncode will report failure if you try to run two instances of it simultaneously. This is a limitation of iTunes, I cannot work around it.

QUOTE (Synthetic Soul @ Jan 17 2006, 04:12 AM)
It would be a shame if you cannot work around this on a dual processor machine.
*

Set foobar's processor affinity to one CPU only so that it won't try to launch two encoding processes.


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
Synthetic Soul
post Jan 17 2006, 17:58
Post #15





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (Otto42 @ Jan 17 2006, 04:35 PM)
Set foobar's processor affinity to one CPU only so that it won't try to launch two encoding processes.

This (Otto's) thread looks useful, if this is a more suitable resolve.

I only wish I could afford to have two processors. sad.gif

Edit: Not sure if this is of any further use.

This post has been edited by Synthetic Soul: Jan 17 2006, 18:00


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
Sebastian Mares
post Jan 17 2006, 18:18
Post #16





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE (Otto42 @ Jan 17 2006, 05:35 PM)
Set foobar's processor affinity to one CPU only so that it won't try to launch two encoding processes.
*


I tried to set the affinity to CPU 0, but it doesn't work. foobar2000 keeps converting two files at a time.

BTW, I don't have two physical CPUs / cores, but an Intel Pentium with HT that "simulates" two processors.


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
foosion
post Jan 17 2006, 18:39
Post #17





Group: FB2K Moderator (Donating)
Posts: 4224
Joined: 24-February 03
Member No.: 5153



QUOTE (Sebastian Mares @ Jan 17 2006, 06:18 PM)
QUOTE (Otto42 @ Jan 17 2006, 05:35 PM)
Set foobar's processor affinity to one CPU only so that it won't try to launch two encoding processes.
*


I tried to set the affinity to CPU 0, but it doesn't work. foobar2000 keeps converting two files at a time.

BTW, I don't have two physical CPUs / cores, but an Intel Pentium with HT that "simulates" two processors.
*

That is because foobar2000 does not query the number of processors it may run on, but the number of installed processors.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Otto42
post Jan 17 2006, 19:24
Post #18





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (foosion @ Jan 17 2006, 12:39 PM)
That is because foobar2000 does not query the number of processors it may run on, but the number of installed processors.
*

Well, then that is a bug. If I've restricted a program to run on one processor only and it intentionally tries to run on more than one, then it has done something I have explicitly told it not to do. I grant you that this is an edge case, since foobar is actually launching other processes. However, there are cases where you cannot rely on the number of "installed" processors either, such as having two dual-core processors (Windows reports this as three installed processors, though it allows use of all four, I think).

Really, the simplest solution seems to be to put in a manual override somewhere in foobar's options. Maybe you want it to only launch one process for other reasons. Maybe you have some encoder that farms out the processing to other machines on a network, and so you can launch a dozen different processes to talk to those machines. Lots of possibles there, relying on the OS to give this sort of setting seems unwarranted.


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
jarsonic
post Mar 7 2006, 22:05
Post #19





Group: Members
Posts: 193
Joined: 30-September 01
From: C-ville, VA
Member No.: 83



How might this affect a Core Duo system? Will it essentially act as a dual processor system, or one?

Anyone tried it?
Go to the top of the page
+Quote Post
Sebastian Mares
post Mar 7 2006, 22:08
Post #20





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



I am almost sure 2. And if you have a dual core system with HT, most likely 4.


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
jarsonic
post Mar 7 2006, 22:45
Post #21





Group: Members
Posts: 193
Joined: 30-September 01
From: C-ville, VA
Member No.: 83



QUOTE (Sebastian Mares @ Mar 7 2006, 04:08 PM)
I am almost sure 2. And if you have a dual core system with HT, most likely 4.
*



Ah, ok. So, was this a bug in iTunesEncode, or fb2k?

Edit: from what I am seeing, I'm thinking it's a bug in fb2k, as far as the affinity specification goes. Otherwise, it's a bug in iTunes itself, right? You'd think they'd iron this out, especially with macbook pros being dual core...

This post has been edited by jarsonic: Mar 7 2006, 22:53
Go to the top of the page
+Quote Post
Sebastian Mares
post Mar 7 2006, 23:00
Post #22





Group: Members
Posts: 3621
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



It's not a bug IMO, but an unfortunate situation. Maybe foobar2000 can have an option to limit the number of encoder instances that are launched.


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
Otto42
post Mar 8 2006, 19:37
Post #23





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (jarsonic @ Mar 7 2006, 03:05 PM)
How might this affect a Core Duo system?  Will it essentially act as a dual processor system, or one?

Anyone tried it?
*

I have an AMD Dual Core chip, and yeah, it'll try to launch two processes. I expect the Core Duo will be the same.

Welcome to the sometimes painful world of multiple processors. I've found numerous programs that have problems with my dual core setup. Forcing affinity usually fixes the problem though. You find this problem in the weirdest places too.. Like IrfanView. You wouldn't expect an image viewing/editing program to be thread unsafe, would you? Well, it is, somehow.

Anyway, iTunes no longer has the original dual core problems I posted about in another thread (they fixed it in 6.02 or 6.03, I think) , but iTunesEncode in combination with iTunes cannot cope with dual cores and two iTunesEncode instances. This has to do with iTunes encoding mechanism, it cannot add encoding processes after the fact, as it were... You can demonstrate this in iTunes by telling it to "Convert" some file, then telling it to convert another file. It'll complain about that. But if you select multiple files and tell it to convert them all at once, it's okay with that.

iTunesEncode is geared to only encode a single file, not multiple files, and so it runs afoul of this restriction in iTunes when you run it twice. A future revision of iTunes might remove this limitation, but I would not expect it to happen anytime soon. And given the available COM interface in iTunes, there's no obvious way for me to tell iTunes to encode multiple files simultaneously from an external program.

So the short of it is that foobar needs to recognize the number of available processors (instead of the number of installed processors), or to have an override to allow you to specify the number of encoding processes. Either way would let you solve the problem, either by setting affinity or by overriding the spawned encoders to 1 only.

Note that it might be possible to rejigger iTunesEncode to detect this condition and wait for iTunes to become available for encoding again. This would effectively force one instance to wait for the other to quit before it started encoding. However, since I lost a lot of iTunesEncode's source by accident, I'd have to rewrite most of iTunesEncode in order to do it.

This post has been edited by Otto42: Mar 8 2006, 19:41


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
jarsonic
post Mar 8 2006, 23:19
Post #24





Group: Members
Posts: 193
Joined: 30-September 01
From: C-ville, VA
Member No.: 83



QUOTE (Otto42 @ Mar 8 2006, 01:37 PM)
Note that it might be possible to rejigger iTunesEncode to detect this condition and wait for iTunes to become available for encoding again. This would effectively force one instance to wait for the other to quit before it started encoding. However, since I lost a lot of iTunesEncode's source by accident, I'd have to rewrite most of iTunesEncode in order to do it.
*



Shoot, if you have time at some point, that would be greatly appreciated. smile.gif

How long did it take you to write iTunesEncode?
Go to the top of the page
+Quote Post
cannesahs
post Mar 9 2006, 10:24
Post #25





Group: Members
Posts: 8
Joined: 4-March 06
Member No.: 28261



I have hyperthreading processor and for me it would be nice to have way to force foobar2000 to use only x threads while encoding. So it could do encoding "on background" while other programs have still own "cpu" to use.

There is quite big overall performance hit for userprograms when cpu-intensive program uses both "cpus".
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: 20th June 2013 - 12:27