INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Encoding to Ogg for Handhelds result in Error  (Read 4262 times)

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Encoding to Ogg for Handhelds result in Error
« on: November 06, 2011, 05:16:47 am »

Hello,

Syncing my library to my handheld (WinMo) in the Ogg format is causing MC17 to report Error for every track which requires conversion. I see oggenc2.exe being called but it seems to exit immediately, indicating some sort of error from oggenc.

Mp3s and other low-bitrate files sync fine.

Any pointers? I enabled logging but nothing seems to be logged in terms of oggenc2 output.

Thanks for any pointers.
Logged

mbagge

  • Galactic Citizen
  • ****
  • Posts: 255
Re: Encoding to Ogg for Handhelds result in Error
« Reply #1 on: November 06, 2011, 11:18:03 am »

Try searching your disc for oggenc2.exe to validate the version and compare it to the version at http://www.rarewares.org/ogg.php
Just a hint. Hope it helps.  :)
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #2 on: November 06, 2011, 04:54:06 pm »

Yes, I replaced it with the latest aoTuV binary, just like I did with MC16.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #3 on: November 07, 2011, 09:32:02 am »

Yes, I replaced it with the latest aoTuV binary, just like I did with MC16.
Does it work to just convert one in your library? I just tried that and it was ok. Do you have the number of simultaneous encodes set to 1? All of the available binaries have bugs in the temp file creation which prevents them from working reliable with multiple simultaneous encodes.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #4 on: November 07, 2011, 03:54:25 pm »

Yup, I've tried 1 and 2 simultaneous encodes, no difference in results. oggenc2.exe starts, exits immediately, and the MC reports "Error" without elaborating. oggenc2 lasts for such a short time that Task Manager has to be placed on highest refresh rate to see the entry appear and disappear.

Any way to see the redirected output?

If it helps, I'm on a domain network where the user profile has been redirected to a UNC path. That worked with MC16 though.
Logged

mbagge

  • Galactic Citizen
  • ****
  • Posts: 255
Re: Encoding to Ogg for Handhelds result in Error
« Reply #5 on: November 07, 2011, 04:53:17 pm »

What happens if you run oggenc2.exe in a command prompt ?
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #6 on: November 07, 2011, 05:33:34 pm »

Quote
ERROR: No input files specified. Use -h for help.

Hmm. Should I hook up a debugger and get debug output? I don't know what debug output MC will give, though.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #7 on: November 07, 2011, 05:42:10 pm »

Hmm. Should I hook up a debugger and get debug output? I don't know what debug output MC will give, though.
We've changed how we handle UNC paths. With logging on in MC do you see any "file not found" kind of messages??
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #8 on: November 07, 2011, 10:04:59 pm »

With the normal logging, there are no file not found messages (or none that I can see that is similar to what Windows will return for ERROR_FILE_NOT_FOUND). Furthermore, after cancelling, and unplugging my phone, MC crashes (I think it's the Worker.exe though, since MC still continues running and music keeps playing)

One thing though, when only the mp3s synced, MC gets stuck in the "Working" status for more than 1 hour... I cancelled it, deleted all the files on my phone and then synced, it went past Working to syncing in less than 5 minutes.

Do you want me to send the logs somewhere? It's rather verbose and I do not really know what to look out for.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #9 on: November 09, 2011, 05:17:27 pm »

Bump -- any updates please?
Logged

mbagge

  • Galactic Citizen
  • ****
  • Posts: 255
Re: Encoding to Ogg for Handhelds result in Error
« Reply #10 on: November 10, 2011, 10:37:00 am »

Quote
ERROR: No input files specified. Use -h for help.

It looks as if MC17 forgot to parse the name of an input file to oggenc2.exe ? I think the developer has to check that.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #11 on: November 10, 2011, 12:25:05 pm »

It looks as if MC17 forgot to parse the name of an input file to oggenc2.exe ? I think the developer has to check that.
I'm thinking lowjoel was just testing to see if ogg2enc ran at a command prompt, not actually putting in the parameters to encode the file.
Putting in the whole command line in a cmd window would be a good test.

lowjoel, you could email logs to bob (at) jriver (dot) com. It shouldn't matter that they are large. It would be good though if you could just try to start logging just before you get a failure and stop right after the failure.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #12 on: November 11, 2011, 01:27:59 am »

I'll try logging only when it starts generating errors.

Which logging components would you think I should enable? Probably disabling some would help reduce verbosity (SDK? Library? Probably Encoding and Handheld should be left on?)

On another note, yes, I just ran it on the command line. I don't see the need to include any encoding parameters since for that to work I'd have to get the exact parameters which MC issues to oggenc. Perhaps I can try using the built-in conversion function as a control?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #13 on: November 11, 2011, 11:35:03 am »

I'll try logging only when it starts generating errors.

Which logging components would you think I should enable? Probably disabling some would help reduce verbosity (SDK? Library? Probably Encoding and Handheld should be left on?)

On another note, yes, I just ran it on the command line. I don't see the need to include any encoding parameters since for that to work I'd have to get the exact parameters which MC issues to oggenc. Perhaps I can try using the built-in conversion function as a control?
It's OK to just leave them all one since the conversion should fail pretty much right away, correct? As long as you reset the log file just befroe starting logging it shouldn't really be that large. Thanks!
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #14 on: November 13, 2011, 05:53:59 pm »

Hope you received the logs Bob.

Today I tried to convert a file to ogg using the Convert Audio command, and it failed as well: "Please check that the files exist, and are of a supported audio format." So I think the problem is not isolated to handheld transcoding.

This time the log's rather short:
Quote
0227652: 5988: Playback: CMJPlayerCore::Play: Start
0227652: 5988: Playback: CMJPlayerCore::Play: Created feeder helper for type flac (native: 1)
0227652: 5988: Playback: CMJWaveFeeder::Play: Start
0227652: 5988: Playback: CMJWaveFeeder::Play: Finish (0 ms)
0227652: 5992: Playback: CMJWaveFeeder::Thread: Start
0227668: 5988: Playback: CMJPlayerCore::Play: Play succeeded
0227668: 5992: Playback: CMJWaveFeeder::Thread: Adding skinning
0227668: 5988: Playback: CMJPlayerCore::Play: Result: 1
0227668: 5992: Playback: CMJWaveFeeder::Thread: Opening file
0227668: 5988: Playback: CMJPlayerCore::Play: Finish (16 ms)
0227699: 5992: Playback: CMJWaveFeeder::Thread: Setting output format
0227715: 5992: Playback: CWaveOutBin::DestroyBin: Start
0227715: 5992: Playback: CWaveOutBin::DestroyBin: Finish (0 ms)
0227715: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Start
0227715: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Using input format
0227715: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: wFormatTag 1
0227715: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nChannels 2
0227730: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nSamplesPerSec 44100
0227730: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nAvgBytesPerSec 176400
0227730: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nBlockAlign 4
0227730: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: wBitsPerSample 16
0227730: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: cbSize 0
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Finish (31 ms)
0227746: 5992: Playback: CWaveOutBin::DestroyBin: Start
0227746: 5992: Playback: CWaveOutBin::DestroyBin: Finish (0 ms)
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Start
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Using input format
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: wFormatTag 1
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nChannels 2
0227746: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nSamplesPerSec 44100
0227762: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nAvgBytesPerSec 176400
0227762: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: nBlockAlign 4
0227762: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: wBitsPerSample 16
0227762: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: cbSize 0
0227762: 5992: Playback: CAutoConfigureAudioOutput::GetOutputFormat: Finish (16 ms)
0227886: 5992: Playback: CMJWaveFeeder::Thread: Preparing to feed data
0227886: 6008: Playback: CWaveOutBinPlayThread::Thread: Start
0227886: 5992: Playback: CMJWaveFeeder::Thread: Running feeder loop
0228573: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Start
0228635: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Cancel
0228666: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Stopping thread
0228666: 5992: Playback: CMJWaveFeeder::Thread: Finished feeder loop (bCancel: 1)
0228713: 5992: Playback: CMJWaveFeeder::Thread: Finish (1061 ms)
0228807: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Deleting input source
0228822: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Unloading DLL
0228822: 5988: Playback: CMJWaveFeeder::~CMJWaveFeeder: Finish (249 ms)
0228838: 5988: Playback: CWaveOutBin::DestroyBin: Start
0228854: 5988: Playback: CWaveOutBin::DestroyBin: Cancelling play thread
0228869: 5988: Playback: CWaveOutBin::DestroyBin: Deleting play thread
0228869: 6008: Playback: CWaveOutBinPlayThread::Thread: Finish (983 ms)
0228885: 5988: Playback: CWaveOutBinPlayThread::~CWaveOutBinPlayThread: Start
0228900: 5988: Playback: CWaveOutBinPlayThread::~CWaveOutBinPlayThread: Finish (15 ms)
0228900: 5988: Playback: CWaveOutBin::DestroyBin: Deleting objects
0228900: 5988: Playback: CWaveOutBin::DestroyBin: Finish (62 ms)
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #15 on: November 14, 2011, 01:29:26 pm »

What build of MC are you running?
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #16 on: November 14, 2011, 05:05:56 pm »

The one posted in the forum was 17.0.33; the one sent via email is 17.0.31.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #17 on: November 15, 2011, 09:33:33 am »

What's the format of the flac files you are trying to convert? Can you send me one? I can't duplicate this.
You can send it to bob (at) jriver (dot) com. It doesn't matter if it turns out to be a large email, we can handle it.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #18 on: November 15, 2011, 05:13:44 pm »

it's not any flac file in particular, since nothing converts (not even WMA lossless) only MP3s go straight to the device (that is, without transcoding)
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #19 on: November 15, 2011, 07:25:32 pm »

I just did a simple test: instead of syncing the handheld, I used the Convert Audio function. That worked this time around (it used to skip from 0% to failed) I'm guessing that if that now works, portable sync should work. It's running now, I'll keep everyone updated.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #20 on: November 15, 2011, 07:47:52 pm »

Okay, it still doesn't work, oggenc2.exe runs but quits immediately. So I got my hands dirty and went to ProcMon to see what's going on.

I got the command line issued to oggenc2:

"\\Server\Users\Joel\Application Data\J River\Media Center 17\Plugins\ogg_encoder\oggenc2.exe" -Q -q 5 - -o "\\Server\Users\Joel\Application Data\J River\Media Center 17\Temp\dawn.ogg"

which when I do run in a Command Prompt, oggenc just waits for input (which I presume MC17 will provide by parsing the input file and then providing a raw stream.

Examining the order of events in ProcMon makes me imagine that this goes on:

1. MC opens the input file for reading.
2. oggenc2 is called
3. MC tries to pass the raw data to oggenc2. Fails without error detected (since oggenc2 is called with -Q, nothing is output to stderr -- does MC even read stderr?)
4. MC is none the wiser, tries to find the converted .ogg file in %APPDATA%\J River\Media Center 17\Temp\yadayada.ogg
5. MC tries to move the file to transcode cache (in my case, %TEMP%\J River\Transcoding Cache). File does not exist, errors out.

This is just the bit that require transcoding. In my last sync, now even mp3s do not sync - but let's cross that bridge when we get to it.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #21 on: November 15, 2011, 07:57:06 pm »

Further debugging: I noticed that the temporary transcoding output folder was a UNC path. My conversions to a disk path was fine, so I executed oggenc (armed with the command line) pointing to a UNC path: the problem is clear:

"\\Server\Users\Joel\Application Data\J River\Media Center 17\Plugins\ogg_encoder\oggenc2.exe" -q 5 "\\Server\Media\Joel\Music\Sakamoto Maaya\Loop\Loop (ループ).flac" -o "\\Server\Users\Joel\Application Data\J River\Media Center17\Temp\Loop.ogg"
Opening with flac module: FLAC file reader
Couldn't create directory "\\Server": No such file or directory
ERROR: Could not create required subdirectories for output filename "\\Server\Users\Joel\Application Data\J River\Media Center 17\Temp\Loop.ogg"

I'm quite surprised that MC16 handled this fine, though. In addition, if I may suggest, the %APPDATA% folder should not be used to hold temporary files, as a good dev practice (from my own personal experience, too). %LOCALAPPDATA% should be fine, however, as while %APPDATA% may be mapped to a network share (as in my case) %LOCALAPPDATA% will remain in the users's profile folder (%LOCALAPPDATA% on my profile maps to C:\Users\Joel\AppData\Local)
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13820
Re: Encoding to Ogg for Handhelds result in Error
« Reply #22 on: November 17, 2011, 11:46:43 am »

Looks like the ogg encoder can't handle UNC paths for the temp file. You could change the temp file location under:
Tools->Options->File Location->Program Files->Temporary Files
Also we agree that the default temp path should be %LOCALAPPDATA%,  a change that should occur soon.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #23 on: November 17, 2011, 04:39:47 pm »

Ah yes, no wonder it seemed to work in MC16, I changed that path manually when going through the settings. I must have overlooked it. I've changed the path and I'm doing another sync; fingers crossed.
Logged

lowjoel

  • World Citizen
  • ***
  • Posts: 159
Re: Encoding to Ogg for Handhelds result in Error
« Reply #24 on: November 17, 2011, 06:50:50 pm »

So far so good, 17% has synced. But I had to leave my desk so I cancelled it and unplugged my device. MC17 promptly crashed (hh_portable.dll)

Oops.
Logged
Pages: [1]   Go Up