Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Oggdec - stdout? (Read 6932 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Oggdec - stdout?

Hello all,

Sorry if this is a dumb question but is there a way to get oggdec (on Windows for now) to decode an ogg file and send the output to standard out?  I need to do this so I can then pipe the output into Lame to transcode on the fly to MP3.  This will be used in our streaming media application, Jinzora (http://www.jinzora.com).  We already do this with MP3/Flac/Musepack/Wavpack and would love to be able to resample OGG's on the fly too.

I read a post where someone had hacked this into their oggdec but I can't find that version anywhere...

Thanks,

Ross

Oggdec - stdout?

Reply #1
You want my oggdec on Rarewares.

Oggdec - stdout?

Reply #2
Thanks a ton, i grabbed it but am having some trouble with it (but I think it's my fault not the app...)

But, is there a linux version?  I see the "sources" file, but there's no make or configure file in there, I have no idea to do with it...

Thanks,

Ross

Oggdec - stdout?

Reply #3
Quote
Thanks a ton, i grabbed it but am having some trouble with it (but I think it's my fault not the app...)

But, is there a linux version?  I see the "sources" file, but there's no make or configure file in there, I have no idea to do with it...

Thanks,

Ross
[a href="index.php?act=findpost&pid=302898"][{POST_SNAPBACK}][/a]

Sorry, no can help. I'm a linux virgin!!

Oggdec - stdout?

Reply #4
Well I realized that's a Visual Studio package, so no recompiling it on Linux anyway...

Thanks guys,

Ross

Oggdec - stdout?

Reply #5
Quote
Well I realized that's a Visual Studio package, so no recompiling it on Linux anyway...

Thanks guys,

Ross
[a href="index.php?act=findpost&pid=302980"][{POST_SNAPBACK}][/a]

you could get someone with VS to export a makefile for you.. I think..

Oggdec - stdout?

Reply #6
But oggdec can do pipes, can't it?

oggdec -o - in.ogg | lame - out.mp3


Oggdec - stdout?

Reply #8
I've never tried it, but looking at the code, yes, it does.

Oggdec - stdout?

Reply #9
Thanks for all the replies guys.  There are a few issues from what I can tell...

I can get the command line to work (piping from oggdec to stdout to lame to stdout) but for some reason it is SO SLOW that it won't work for my application.  That's kinda odd since Wavpack, Flac, Musepack, and Lame all work perfectly...

So, the real thing I'm trying to get at here is can you resample ogg files on the fly to ease streaming?  Lame will let you specify an MP3 as an input file so it handles it quite well.  Doesn't look like oggenc can do that.

Any other ideas?  Also is there an oggdec for Linux?

Thanks,

Ross

Oggdec - stdout?

Reply #10
YES (look up)

it's in vorbis-tools


later

Oggdec - stdout?

Reply #11
Yeah, but the problem is pipe starvataion.  Oggdec can't decode fast enough to give data to lame so it won't work...

Any other ideas?  I think I'm just stuck and this can't be done...

Ross

Oggdec - stdout?

Reply #12
Vorbis decoding shouldn't be *that* slow. It should be more or less on par with MP3 decoding.

http://www.foobar2000.org/foospeed/

BTW, have you tried hacking Xiph.org's oggdec in Linux?

I wonder what john33 meant by "yes, it does". I haven't gotten round to testing it myself.

1. Yes, it does mean it doesn't support stdout.
2. yes, it does support stdout.

I suspect the second is correct, because he smiled. At least I hope so.

Oggdec - stdout?

Reply #13
Quote
Vorbis decoding shouldn't be *that* slow. It should be more or less on par with MP3 decoding.

http://www.foobar2000.org/foospeed/

BTW, have you tried hacking Xiph.org's oggdec in Linux?

I wonder what john33 meant by "yes, it does". I haven't gotten round to testing it myself.

1. Yes, it does mean it doesn't support stdout.
2. yes, it does support stdout.

I suspect the second is correct, because he smiled. At least I hope so.
[a href="index.php?act=findpost&pid=303921"][{POST_SNAPBACK}][/a]

Yes to No. 2.

Edit: And, BTW, the decoding speed should far exceed the encoding speed of LAME, so I would think there is some other factor at play here.

Oggdec - stdout?

Reply #14
Well if there is something else I just can't find it.  I did read a lot about piping while trying to work this out and since the commands work just fine if I pipe them to a file but NOT if I pipe them to stdout the only thing I can conclude is that is the issue.

And oggdec on Linux does NOT work with piping to stdout.  If it does I can't get it to work.  As for hacking, sorry a bit beyond me...

So if you've got an idea of what this could be I'd be very grateful.  If I didn't say this does work great with:

Flac > Lame > stream
Musepack > Lame > stream
Wavpack > Lame > stream
MP3 > Lame > stream

So I can only conclude that it's something with oggdec.  BTW I also did try this with ogg123 (piping to stdout) and that didn't work either (but again creating the file did).  The main issue is I MUST do this by piping to stdout to achieve what I want...

Any other ideas???

Oh, and BTW guys, THANKS A TON for all the assistance here, I really appreciate it!!!

Ross

Oggdec - stdout?

Reply #15
Hm, piping from both oggdec and ogg123 to lame works for me on linux. Speed is comparable to piping from flac.

You could probably make use of named pipes, if stdout doesn't work?

Oggdec - stdout?

Reply #16
D'oh!  It was me, it was the way we were sending data to the media player.  Not only did I got Ogg to work, we added Wav as well.

So we now support real time on-the-fly transcoding and streaming of:

Flac
Musepack
Wavpack
Wav
MP3
Ogg

All to MP3 at a user selected bitrate :-)

Woo Hoo!!!

Thanks again for your help guys, I really appreciate it.  If you're interested we'd love to have the feedback over at http://www.jinzora.com

Thanks,

Ross

 

Oggdec - stdout?

Reply #17
in the same fashion, you can add support for AAC with faad2 and just about any format with a linux binary (except for monkey's audio, which is an example of the worst possible frontend)


later