Help - Search - Members - Calendar
Full Version: Trouble with oggenc2 and stdin
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
Cerebus
I'm on a Win2k box, and I'm trying to transcode an mpc file to an ogg file for use on my portable. I issue the following command:

CODE

mppdec.exe --gain 1 --prev --wav "D:\MPCs\Daryl Hall (1986) Three Hearts in the Happy Ending Machine\01 - Dreamtime.mpc" - | oggenc2.exe -q 0 -a "Daryl Hall" -t "Dreamtime" -l "Three Hearts in the Happy Ending Machine" -d "1986" -G "Rock" -N "1" - -o "D:\oggs\Daryl Hall (1986) Three Hearts in the Happy Ending Machine\01 - Dreamtime.ogg"


and I get 'oggenc2.exe - Application Error : The instruction at "0x0040baf7" referenced memory at "0x00000000". The memory could not be "read".'

am I doing something wrong here?

Thanks for your help.

[edit]I tried using the oggenc.exe from the vorbis-tools-1.0 package at vorbis.com, and it worked just fine.[/edit]
AstralStorm
I think that both mppdec and mppenc have broken pipe support,
or does it only apply to the encoder?
john33
QUOTE(Cerebus @ Sep 19 2003, 04:13 PM)
I'm on a Win2k box, and I'm trying to transcode an mpc file to an ogg file for use on my portable.  I issue the following command:

CODE

mppdec.exe --gain 1 --prev --wav "D:\MPCs\Daryl Hall (1986) Three Hearts in the Happy Ending Machine\01 - Dreamtime.mpc" - | oggenc2.exe -q 0 -a "Daryl Hall" -t "Dreamtime" -l "Three Hearts in the Happy Ending Machine" -d "1986" -G "Rock" -N "1" - -o "D:\oggs\Daryl Hall (1986) Three Hearts in the Happy Ending Machine\01 - Dreamtime.ogg"


and I get 'oggenc2.exe - Application Error : The instruction at "0x0040baf7" referenced memory at "0x00000000".  The memory could not be "read".'

am I doing something wrong here?

Thanks for your help.

[edit]I tried using the oggenc.exe from the vorbis-tools-1.0 package at vorbis.com, and it worked just fine.[/edit]

Can you tell me which version of oggenc2 this is?
NRAninja
I was talking to Cerebus when he was having these problems and he was using this compile from rarewares:

CODE

Oggenc2.3 2003-09-07
Command line encoder - allows direct input of '.flac', '.ape', '.wv', '.pac', '.ofr' and '.shn' files - ICL7.1 compile


It's the post 1.0 CVS one.

I tried using the same one in MultiFrontend to encode from FLAC and couldn't get it to work. I got one of those win2K crash popup boxes that said 'oggenc2.exe has caused an error. A log file has been generated.' Also, the dos box multifrontend popped up said this:

QUOTE
Opening with wav module: WAV file reader

01 - The Hollow.flac: ERROR while decoding data
                      state = 3:FLAC__STREAM_DECODER_READ_FRAME
-------------------------------------------------------------------------------

Press any key to continue . . .


The ogg 1.0 version that worked for Cerebus also worked in multifrontend for me.

HTH,
NRAninja
john33
OK, thanks for the input. I'll sort it out and get back to you.
john33
OK, the problem has been identified as being within the 'Unicode' add on. I have for the time being, therefore, removed the Unicode code and recompiled. The uploaded versions now perform correctly with regard to stdin, but the Unicode option is no longer available until I can figure out where the problem is, and fix it!!
Cerebus
Thanks, John. I have a series of home-grown scripts written for generating checksums and transcoding files from one format to another, and this was the last roadblock to getting Ogg supported in the tools - much appreciated.
Linkin
just for addition: i had the same problem with that oggenc version and the cli encoder for fb2k

thx john for fixing
john33
You're welcome! wink.gif Sorry I didn't notice it before.
Peter Harris
QUOTE(john33 @ Sep 22 2003, 07:19 AM)
OK, the problem has been identified as being within the 'Unicode' add on.

Whoops. That means it was probably my fault, then.

Is there a more simple test case I can use to fix this problem? Installing mpc seems like overkill.
Jasper
On my system the OggEnc2.3 I downloaded on the 21st (September 2003) crashes with this commandline:
CODE
oggenc2 -r -
john33
QUOTE(Peter Harris @ Sep 22 2003, 04:23 PM)
QUOTE(john33 @ Sep 22 2003, 07:19 AM)
OK, the problem has been identified as being within the 'Unicode' add on.

Whoops. That means it was probably my fault, then.

Is there a more simple test case I can use to fix this problem? Installing mpc seems like overkill.

Anything like:
CODE
lame --decode 10.mp3 - | oggenc -q 5 - -o 10.ogg

In other words, anything piping into stdin of oggenc.

Edit: Peter, I found the same problem in the oggencUnicode version that I posted at Rarewares. That was really how I identified it. But I'm not at all sure where it is.
john33
QUOTE(Peter Harris @ Sep 22 2003, 04:23 PM)
QUOTE(john33 @ Sep 22 2003, 07:19 AM)
OK, the problem has been identified as being within the 'Unicode' add on.

Whoops. That means it was probably my fault, then.

Is there a more simple test case I can use to fix this problem? Installing mpc seems like overkill.

@Peter: So far as I can determine, the problem seems to be that the modified parse_options seems to return 'isutf8 = 1' even if 'utf8' is not specified in the command line.
Peter Harris
QUOTE(john33 @ Sep 23 2003, 08:44 AM)
@Peter: So far as I can determine, the problem seems to be that the modified parse_options seems to return 'isutf8 = 1' even if 'utf8' is not specified in the command line.

That's not actually the bug. Windows operates in UCS-16, so for simplicity I always translate the command line into UTF-8.

However, it did give me a valuable clue: I'm trying to translate the filenames from UTF-8 back to 'printable' for the status updates. When using stdin/stdout, there is no filename. Whoops.

CODE

--- oggenc.c~   Wed Aug 21 13:57:49 2002
+++ oggenc.c    Tue Sep 23 13:03:48 2003
@@ -292,8 +292,15 @@
               enc_opts.comments = &vc;
        if (opt.isutf8) {
            /* TODO: error checking here */
-            utf8_decode(out_fn, &enc_opts.filename);
-            utf8_decode(infiles[i], &enc_opts.infilename);
+            if (out_fn)
+                utf8_decode(out_fn, &enc_opts.filename);
+            else
+                enc_opts.filename = NULL;
+
+            if (infiles[i])
+                utf8_decode(infiles[i], &enc_opts.infilename);
+            else
+                enc_opts.infilename = NULL;
        } else {
            enc_opts.filename = out_fn;
            enc_opts.infilename = infiles[i];


The complete patch has been updated too.

Thank you for your help in fixing this bug, and thanks to NRAninja for reporting the bug in the first place.
john33
QUOTE(Peter Harris @ Sep 23 2003, 05:18 PM)
QUOTE(john33 @ Sep 23 2003, 08:44 AM)
@Peter: So far as I can determine, the problem seems to be that the modified parse_options seems to return 'isutf8 = 1' even if 'utf8' is not specified in the command line.

That's not actually the bug. Windows operates in UCS-16, so for simplicity I always translate the command line into UTF-8.

However, it did give me a valuable clue: I'm trying to translate the filenames from UTF-8 back to 'printable' for the status updates. When using stdin/stdout, there is no filename. Whoops.

CODE

--- oggenc.c~   Wed Aug 21 13:57:49 2002
+++ oggenc.c    Tue Sep 23 13:03:48 2003
@@ -292,8 +292,15 @@
               enc_opts.comments = &vc;
        if (opt.isutf8) {
            /* TODO: error checking here */
-            utf8_decode(out_fn, &enc_opts.filename);
-            utf8_decode(infiles[i], &enc_opts.infilename);
+            if (out_fn)
+                utf8_decode(out_fn, &enc_opts.filename);
+            else
+                enc_opts.filename = NULL;
+
+            if (infiles[i])
+                utf8_decode(infiles[i], &enc_opts.infilename);
+            else
+                enc_opts.infilename = NULL;
        } else {
            enc_opts.filename = out_fn;
            enc_opts.infilename = infiles[i];


The complete patch has been updated too.

Thank you for your help in fixing this bug, and thanks to NRAninja for reporting the bug in the first place.

Excellent news. I'll add the extra patch and update oggenc2.3 accordingly. Thanks for the very prompt response.
john33
Patch works just fine. smile.gif I'll upload new compiles tomorrow and post when they're available. Thanks, Peter.
john33
New compiles uploaded and available at Rarewares. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.