Hello
I am trying to play the audio and the video from a mp4 file. If I run the following line: gst-launch -vvvvv --gst-debug-level=2 playbin uri=file:///<path_to_mp4_file> Then it plays the file's audio. I'm not putting the video anywhere, so I can't see if it is playing or not, but I assume it is based on the debug output. If I do the following line: gst-launch -vvv --gst-debug-level=2 filesrc location=<path_to_mp4_file> ! decodebin2 name=decoder decoder. ! audioconvert ! audioresample ! osssink decoder. ! ffmpegcolorspace ! xvimagesink It hangs at: Setting pipeline to PAUSED .. /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-m4a Pipeline is PREROLLING ... <audio debug output snipped> I need to open this file in C code, and grab access to the buffers. I was planning on using appsink to do it, but any time I pass in a video sink to the pipeline, it just hangs, never playing the audio, or moving forward. As I said, I need access to the video buffer, so either I need a way to grab it from the pipeline created from gst_parse_launch, or I was thinking that if I set up the pipeline myself, I could use a handoff signal on the last video sink, or mayber use the appsink methods. I have a feeling that I am missing something simple, and was hoping someone could point that out. Thanks, Rodney --
Rodney
Dowdall
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Mon, May 31, 2010 at 11:53 PM, Rodney Dowdall <[hidden email]> wrote:
You need to put 'queue' after each decodebin2's branch to start a new thread for them. The docs should have some more information about this: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-threads.html#section-threads-uses
FYI, you can set the video-sink property in playbin2 to your appsink and get the buffers from there.
-- Thiago Sousa Santos ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Rodney Dowdall
Rodney,
Your pipeline is missing queue, So it will look like, gst-launch -vvv --gst-debug-level=2 filesrc location=<path_to_mp4_file> ! decodebin2 name=decoder decoder. ! queue ! audioconvert ! audioresample ! osssink decoder. ! queue ! ffmpegcolorspace ! xvimagesink Best Kapil On Tue, Jun 1, 2010 at 8:23 AM, Rodney Dowdall <[hidden email]> wrote:
-- www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming) twitter handle: @gst_kaps http://www.linkedin.com/in/kapilagrawal ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks for the suggestion, but this is what I get when I use the queue's. Does something have to be actually looking at the video buffer? If the xvimagesink isn't actually going anywhere, would it block? Thanks again, Rodney gst-launch -vvv --gst-debug-level=2 filesrc location=/home/rdowdall/Documents/crank/contracts/guifx_800_480/movies/hallway_people.mp4 ! decodebin2 name=decoder decoder. ! queue ! audioconvert ! audioresample ! osssink decoder. ! queue ! ffmpegcolorspace ! xvimagesink Setting pipeline to PAUSED ... /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-m4a Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstQTDemux:qtdemux0.GstPad:sink: caps = audio/x-m4a 0:00:00.107951099 1810 0xdbcf80 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avc1 0:00:00.107980362 1810 0xdbcf80 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type avcC 0:00:00.107993073 1810 0xdbcf80 WARN qtdemux qtdemux_types.c:170:qtdemux_type_get: unknown QuickTime node type uuid 0:00:00.108996623 1810 0xdbcf80 WARN qtdemux qtdemux.c:5652:qtdemux_parse_trak:<qtdemux0> unknown version 00000000 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-buffers = 5 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-time = 0 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-bytes = 2097152 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0.GstPad:sink0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-buffers = 5 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-time = 0 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0: max-size-bytes = 2097152 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0.GstPad:src0: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstFaad:faad0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstDecodeBin2:decoder.GstDecodePad:src0: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstFaad:faad0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstDecodeBin2:decoder.GstDecodePad:src0.GstProxyPad:proxypad4: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 /GstPipeline:pipeline0/GstOssSink:osssink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2 ^CCaught interrupt -- handling interrupt. Interrupt: Stopping pipeline ... ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... /GstPipeline:pipeline0/GstOssSink:osssink0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder.GstDecodePad:src0: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstFaad:faad0.GstPad:src: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstFaad:faad0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0.GstPad:sink0: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstMultiQueue:multiqueue0.GstPad:src0: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstQTDemux:qtdemux0.GstPad:audio_00: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstQTDemux:qtdemux0.GstPad:video_00: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstQTDemux:qtdemux0.GstPad:sink: caps = NULL /GstPipeline:pipeline0/GstDecodeBin2:decoder/GstTypeFindElement:typefind.GstPad:src: caps = NULL Freeing pipeline ... On 10-06-01 01:35 AM, Kapil Agrawal wrote: Rodney, --
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Thiago Sousa Santos-2
Hello Thiago
Thanks for your suggestions. I read the playbin2 docs, and it said that I could use the fakesink's handoff signal to grab the buffer from the playbin2 video. I tried to set that up, but my signal handler never gets called. Here is the code snippet that I have: static void cb_handoff (GstElement *fakesink, GstBuffer *buffer, GstPad *pad, gpointer user_data) { static gboolean white = FALSE; /* this makes the image black/white */ printf("new buffer is happening\n"); } .... Initlization function stuff .... videosink = gst_element_factory_make ("fakesink", "videosink"); g_object_set (G_OBJECT (videosink), "signal-handoffs", TRUE, NULL); g_signal_connect (videosink, "handoff", G_CALLBACK (cb_handoff), NULL); gs_data->pipeline = gst_element_factory_make ("playbin2", "my-player"); g_object_set (G_OBJECT (gs_data->pipeline), "video-sink", videosink, NULL); g_object_set (G_OBJECT (gs_data->pipeline), "uri", "<path_to_mp4>", NULL); This plays the sound from the mp4, but I can't grab the buffer. Am I missing a step? Do I have to setup a video-bin, with a filter, converter, and sink? Thanks, Rodney On 10-05-31 11:40 PM, [hidden email] wrote:
--
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Rodney On 10-06-01 09:53 AM, Rodney Dowdall wrote: Hello Thiago --
------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |