Hi everyone,
I'm trying to build a simple GTK app using GST as a backend to see and record a webcam stream. I can do both but separately... My problem is doing both at the same time. What I'm trying to accomplish is this: gst-launch-0.10 v4l2src \ ! videorate \ ! video/x-raw-yuv,framerate=25/2 \ ! ffmpegcolorspace \ ! tee name=t1 \ ! queue \ ! xvimagesink sync=false t1. \ ! queue \ ! theoraenc quality=16 \ ! oggmux name=mux osssrc \ ! audio/x-raw-int,rate=22050,channels=1 \ ! queue \ ! audioconvert \ ! vorbisenc quality=0.2 \ ! mux. mux. \ ! queue \ ! filesink location=test.ogg My code is this: ... m_pipeline = gst_pipeline_new ("pipeline"); m_bin = gst_bin_new ("bin"); m_source = gst_element_factory_make ("v4l2src", "video_src"); m_videorate = gst_element_factory_make ("videorate", "videorate"); m_framerate = gst_element_factory_make ("video/x-raw-yuv,framerate=25/2", "framerate"); m_colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); m_tee = gst_element_factory_make ("tee name=t1", "t1"); m_queue = gst_element_factory_make ("queue", "queue"); m_imagesink = gst_element_factory_make ("xvimagesink sync=false t1.", "imagesink"); m_queue2 = gst_element_factory_make ("queue", "queue2"); m_videoenc = gst_element_factory_make ("theoraenc quality=16", "video_enc"); m_mux = gst_element_factory_make ("oggmux name=mux osssrc", "mux"); m_audio = gst_element_factory_make ("audio/x-raw-int,rate=22050,channels=1", "audio"); m_queue3 = gst_element_factory_make ("queue", "queue3"); m_audiocon = gst_element_factory_make ("audioconvert", "audio_con"); m_audioenc = gst_element_factory_make ("vorbisenc quality=0.2", "audio_enc"); m_mux2 = gst_element_factory_make ("mux. mux.", "mux2"); m_queue4 = gst_element_factory_make ("queue", "queue4"); m_file = gst_element_factory_make ("filesink location=test.ogg", "filesink"); gst_bin_add_many (GST_BIN (m_bin), m_source, m_videorate, m_framerate, m_colorspace, m_tee, m_queue, m_imagesink, m_queue2, m_videoenc, m_mux, m_audio, m_queue3, m_audiocon, m_audioenc, m_mux2, m_queue4, m_file , NULL); gst_bin_add (GST_BIN (m_pipeline), m_bin); gst_element_link_many (m_source, m_videorate, m_framerate, m_colorspace, m_tee, m_queue, m_imagesink, m_queue2, m_videoenc, m_mux, m_audio, m_queue3, m_audiocon, m_audioenc, m_mux2, m_queue4, m_file , NULL); if (GST_IS_X_OVERLAY (m_imagesink)) gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (m_imagesink), GPOINTER_TO_INT (window)); gst_element_set_state (m_pipeline, GST_STATE_PLAYING); ... Can anyone help me on what I'm doing wrong? Thanks, Carlos Castro -- Cumprimentos, Carlos Castro ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
With a little bit of work I managed to get it to work...
Carlos Castro Em 6 de Jan de 2010 15:21, Carlos Castro <[hidden email]> escreveu: > Hi everyone, > > > > I'm trying to build a simple GTK app using GST as a backend to see and > > record a webcam stream. > > > > I can do both but separately... My problem is doing both at the same time. > > What I'm trying to accomplish is this: > > > > gst-launch-0.10 v4l2src \ > > ! videorate \ > > ! video/x-raw-yuv,framerate=25/2 \ > > ! ffmpegcolorspace \ > > ! tee name=t1 \ > > ! queue \ > > ! xvimagesink sync=false t1. \ > > ! queue \ > > ! theoraenc quality=16 \ > > ! oggmux name=mux osssrc \ > > ! audio/x-raw-int,rate=22050,channels=1 \ > > ! queue \ > > ! audioconvert \ > > ! vorbisenc quality=0.2 \ > > ! mux. mux. \ > > ! queue \ > > ! filesink location=test.ogg > > > > My code is this: > > > > ... > > m_pipeline = gst_pipeline_new ("pipeline"); > > m_bin = gst_bin_new ("bin"); > > m_source = gst_element_factory_make ("v4l2src", "video_src"); > > m_videorate = gst_element_factory_make ("videorate", "videorate"); > > m_framerate = gst_element_factory_make > > ("video/x-raw-yuv,framerate=25/2", "framerate"); > > m_colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); > > m_tee = gst_element_factory_make ("tee name=t1", "t1"); > > m_queue = gst_element_factory_make ("queue", "queue"); > > m_imagesink = gst_element_factory_make ("xvimagesink sync=false t1.", > > "imagesink"); > > m_queue2 = gst_element_factory_make ("queue", "queue2"); > > m_videoenc = gst_element_factory_make ("theoraenc quality=16", "video_enc"); > > m_mux = gst_element_factory_make ("oggmux name=mux osssrc", "mux"); > > m_audio = gst_element_factory_make > > ("audio/x-raw-int,rate=22050,channels=1", "audio"); > > m_queue3 = gst_element_factory_make ("queue", "queue3"); > > m_audiocon = gst_element_factory_make ("audioconvert", "audio_con"); > > m_audioenc = gst_element_factory_make ("vorbisenc quality=0.2", "audio_enc"); > > m_mux2 = gst_element_factory_make ("mux. mux.", "mux2"); > > m_queue4 = gst_element_factory_make ("queue", "queue4"); > > m_file = gst_element_factory_make ("filesink location=test.ogg", "filesink"); > > > > gst_bin_add_many (GST_BIN (m_bin), m_source, m_videorate, m_framerate, > > m_colorspace, m_tee, m_queue, m_imagesink, m_queue2, m_videoenc, > > m_mux, m_audio, m_queue3, m_audiocon, m_audioenc, m_mux2, m_queue4, > > m_file , NULL); > > gst_bin_add (GST_BIN (m_pipeline), m_bin); > > gst_element_link_many (m_source, m_videorate, m_framerate, > > m_colorspace, m_tee, m_queue, > > m_imagesink, m_queue2, m_videoenc, m_mux, m_audio, m_queue3, > > m_audiocon, m_audioenc, m_mux2, m_queue4, m_file , NULL); > > > > if (GST_IS_X_OVERLAY (m_imagesink)) > > gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (m_imagesink), > > GPOINTER_TO_INT (window)); > > > > gst_element_set_state (m_pipeline, GST_STATE_PLAYING); > > ... > > > > Can anyone help me on what I'm doing wrong? > > > > > > Thanks, > > Carlos Castro > > > > -- > > Cumprimentos, > > Carlos Castro > This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi
Carlos,
> With a little bit of work I managed to get it to
work...
What did you do
differently?
Regards
Steve _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Carlos Castro
Hi
Carlos,
> With a little bit of work I managed to get it to
work...
What did you do
differently?
Regards
Steve _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |