Mp4 to wav

Hi, Gurus,

I’ve

pipeline = Gst::Pipeline.new “audio-player”
source = Gst::ElementFactory.make “filesrc”, “file-source”
decoder = Gst::ElementFactory.make “qtdemux”, “mp4-decoder”
conv = Gst::ElementFactory.make “audioconvert”, “converter”
encoder = Gst::ElementFactory.make “wavenc”, “encoder”
sink = Gst::ElementFactory.make “filesink”, “file-output”

Hi, Gurus,

I’m trying to write a small program using ruby gstreamer to extract wav
file from mp4 video. The following is the snippet. I got an error
message at execution and not sure how to fix the error. Can anyone shed
some lights on this error? I really appreciate your help. thanks

./mp3towav1.rb:44:in <main>': undefined method>>’ for nil:NilClass
(NoMethodError)

code snippet:

pipeline = Gst::Pipeline.new “audio-player”
source = Gst::ElementFactory.make “filesrc”, “file-source”
decoder =
Gst::ElementFactory.make “qtdemux”, “mp4-decoder”
conv = Gst::ElementFactory.make “audioconvert”, “converter”
encoder = Gst::ElementFactory.make “wavenc”, “encoder”
sink = Gst::ElementFactory.make “filesink”, “file-output”


pipeline.add source, decoder, conv, encoder, sink
source >> decoder >> conv >> encoder >> sink

Subject: Re: [ruby-gnome2-devel-en] mp4 to wav
Date: Fri 15 Nov 13 10:48:35PM -0800
Sorry for the delay!

Quoting Ding ([email protected]):

./mp3towav1.rb:44:in <main>': undefined method>>’ for nil:NilClass
(NoMethodError)

I presume that line 44 in your code is

source >> decoder >> conv >> encoder >> sink

It is ages since I had dabbled with gstreamer, and I remember how
difficult it had been to convince it to do what I wanted, so I do not
pretend to solve your problem. But I see that if I split the line,
“decoder >> conv” returns nil. This is why the whole line
fails. Apparently you cannot pipe your decoder to your converter.

Carlo

  •     Se la Strada e la sua Virtu' non fossero state messe da 
    

parte,

  • K * Carlo E. Prelz - [email protected] che bisogno ci
    sarebbe
    •           di parlare tanto di amore e di rettitudine? 
      

(Chuang-Tzu)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs