Writing audio to a file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing audio to a file

Jeffrey Barish
I am not able to write audio to a file (that can be played).  I have tried

audiotestsrc ! audioconvert ! vorbisenc ! filesink location=test.ogg

and

cdparanoiasrc ! queue ! audioconvert ! vorbisenc ! filesink
    location=test.ogg

I keep getting a message (from ogg123) that the file may be corrupted.
--
Jeffrey Barish


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing audio to a file

Michael Smith-32
On Thu, 2008-01-24 at 13:49 -0700, Jeffrey Barish wrote:
> I am not able to write audio to a file (that can be played).  I have tried
>
> audiotestsrc ! audioconvert ! vorbisenc ! filesink location=test.ogg
>

This is dumping raw vorbis packets to a file. Raw vorbis packets don't
make any sense; they're not decodable.

You need to mux it into a container format (usually ogg); oggmux does
that.

So you can use: audiotestsrc ! audioconvert ! vorbisenc ! oggmux !
filesink

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing audio to a file

Jeffrey Barish
Michael Smith wrote:

> On Thu, 2008-01-24 at 13:49 -0700, Jeffrey Barish wrote:
>> I am not able to write audio to a file (that can be played).  I have
>> tried
>>
>> audiotestsrc ! audioconvert ! vorbisenc ! filesink location=test.ogg
>>
>
> This is dumping raw vorbis packets to a file. Raw vorbis packets don't
> make any sense; they're not decodable.
>
> You need to mux it into a container format (usually ogg); oggmux does
> that.
>
> So you can use: audiotestsrc ! audioconvert ! vorbisenc ! oggmux !
> filesink
>
> Mike

Thanks!  

I'm not sure how a novice is supposed to figure out something like this,
especially considering that GStreamer Base Plugins 0.10 Plugins Reference
Manual doesn't even mention oggmux (although it does mention oggdemux).
The next thing I wanted to do was to rip a track other than 1 using
cdparanoiasrc.  It seems that cdparanoiasrc has a property "track", but I
can't find documentation on it either.  Other than the documentation, I
think that GStreamer is pretty nice.
--
Jeffrey Barish


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing audio to a file

Jeffrey Barish
Jeffrey Barish wrote:

> Michael Smith wrote:
>
>> On Thu, 2008-01-24 at 13:49 -0700, Jeffrey Barish wrote:
>>> I am not able to write audio to a file (that can be played).  I have
>>> tried
>>>
>>> audiotestsrc ! audioconvert ! vorbisenc ! filesink location=test.ogg
>>>
>>
>> This is dumping raw vorbis packets to a file. Raw vorbis packets don't
>> make any sense; they're not decodable.
>>
>> You need to mux it into a container format (usually ogg); oggmux does
>> that.
>>
>> So you can use: audiotestsrc ! audioconvert ! vorbisenc ! oggmux !
>> filesink
>>
>> Mike
>
> Thanks!
>
> I'm not sure how a novice is supposed to figure out something like this,
> especially considering that GStreamer Base Plugins 0.10 Plugins Reference
> Manual doesn't even mention oggmux (although it does mention oggdemux).
> The next thing I wanted to do was to rip a track other than 1 using
> cdparanoiasrc.  It seems that cdparanoiasrc has a property "track", but I
> can't find documentation on it either.  Other than the documentation, I
> think that GStreamer is pretty nice.

To rip an entire CD with cdparanoiasrc, it seems that I need to set
the "track" property to successive integers from 1 to the number of tracks
on the CD.  Does GStreamer provide a way to get the number of tracks on the
CD?
--
Jeffrey Barish


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing audio to a file

Stefan Sauer
In reply to this post by Jeffrey Barish
Hi jeffrey,

Jeffrey Barish schrieb:

> Michael Smith wrote:
>
>> On Thu, 2008-01-24 at 13:49 -0700, Jeffrey Barish wrote:
>>> I am not able to write audio to a file (that can be played).  I have
>>> tried
>>>
>>> audiotestsrc ! audioconvert ! vorbisenc ! filesink location=test.ogg
>>>
>> This is dumping raw vorbis packets to a file. Raw vorbis packets don't
>> make any sense; they're not decodable.
>>
>> You need to mux it into a container format (usually ogg); oggmux does
>> that.
>>
>> So you can use: audiotestsrc ! audioconvert ! vorbisenc ! oggmux !
>> filesink
>>
>> Mike
>
> Thanks!  
>
> I'm not sure how a novice is supposed to figure out something like this,

gst-launch is not really a user tool.

> especially considering that GStreamer Base Plugins 0.10 Plugins Reference
> Manual doesn't even mention oggmux (although it does mention oggdemux).

I'll add it after the code-freeze (in two days).

> The next thing I wanted to do was to rip a track other than 1 using
> cdparanoiasrc.  It seems that cdparanoiasrc has a property "track", but I
> can't find documentation on it either.
Its inheritted from GstCddaBaseSrc, there you find the docs for the track property.

> Other than the documentation, I think that GStreamer is pretty nice.

Reporting docs bugs as you did will make it better :)

Stefan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel