Hello everyone !
I'm a newbie here and i'm reading the "Application Development Manual" which is really helpful. But here is my problem : I would like to play an Avi video file. I've seen an example in the manual for an ogg audio file, so i've started from here. But I can't find a working decoder for my avi file.. Anyone can help me plz? Here is my pipeline : pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); decoder = gst_element_factory_make ("decodebin", "decoder"); conv = gst_element_factory_make ("videoconvert", "converter"); sink = gst_element_factory_make ("autovideosink", "video-output"); Thanks for anyone who can help me ! |
On 31.01.2011 12:48, StyveA wrote:
> Hello everyone ! > > I'm a newbie here and i'm reading the "Application Development Manual" which > is really helpful. > > But here is my problem : I would like to play an Avi video file. > > I've seen an example in the manual for an ogg audio file, so i've started > from here. > But I can't find a working decoder for my avi file.. > Anyone can help me plz? > > Here is my pipeline : > > pipeline = gst_pipeline_new ("video-player"); > source = gst_element_factory_make ("filesrc", "file-source"); > demuxer = gst_element_factory_make ("avidemux", "avi-demuxer"); > decoder = gst_element_factory_make ("decodebin", "decoder"); > conv = gst_element_factory_make ("videoconvert", "converter"); > sink = gst_element_factory_make ("autovideosink", "video-output"); > > Thanks for anyone who can help me ! decodebin2 ! ... stefan ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by StyveA
On Mon, 2011-01-31 at 02:48 -0800, StyveA wrote:
> I'm a newbie here and i'm reading the "Application Development Manual" which > is really helpful. > > But here is my problem : I would like to play an Avi video file. Try gst-launch-0.10 -v playbin2 uri=file:///path/to/foo.avi > I've seen an example in the manual for an ogg audio file, so i've started > from here. > But I can't find a working decoder for my avi file.. > Anyone can help me plz? Hard to help if you don't say what format the video inside the AVI is in... but just use playbin2 (or uridecodebin/decodebin2). gst-ffmpeg provides video decoders for many common formats. Cheers -Tim ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Stefan Sauer
Thanks for your reply Stefan =) Hum as I said I'm a newbie, so I don't understand everything yet ^^' If I'm correct, my pipeline should look like this : (?) pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); decoder = gst_element_factory_make ("decodebin2", "decoder"); conv = gst_element_factory_make ("videoconvert", "converter"); sink = gst_element_factory_make ("autovideosink", "video-output"); Am I correct? :o -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Avi-decoder-tp3248462p3248494.html Sent from the GStreamer-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Tim-Philipp Müller-2
Thanks Stefan and Tim ! Hum as I said I'm a newbie, so I don't understand everything yet ^^' If I'm correct, my pipeline should look like this : (?) pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); decoder = gst_element_factory_make ("decodebin2", "decoder"); conv = gst_element_factory_make ("videoconvert", "converter"); sink = gst_element_factory_make ("autovideosink", "video-output"); Am I correct? :o Tim> I need to do this in code, I don't want to use a command. But thanks ^^ and for the format inside the AVI.. Oo.. I don't know this.. That's a common movie -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Avi-decoder-tp3248462p3248503.html Sent from the GStreamer-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Stefan Sauer
Thanks Stefan and Tim ! Hum as I said I'm a newbie, so I don't understand everything yet ^^' > decodebin would plug avidemux already. Just use playbin2 or filesrc ! > decodebin2 ! ... > > stefan If I'm correct, my pipeline should look like this : (?) pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); decoder = gst_element_factory_make ("decodebin2", "decoder"); conv = gst_element_factory_make ("videoconvert", "converter"); sink = gst_element_factory_make ("autovideosink", "video-output"); Am I correct? :o And for Tim : The problem is that I need to do it by a code not a command =/ -- View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Avi-decoder-tp3248462p3248645.html Sent from the GStreamer-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by StyveA
I tried this code :
play = gst_element_factory_make ("playbin", "play"); g_object_set (G_OBJECT (play), "uri", argv[1], NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (play)); gst_bus_add_watch (bus, my_bus_callback, loop); gst_object_unref (bus); gst_element_set_state (play, GST_STATE_PLAYING); /* now run */ g_main_loop_run (loop); /* also clean up */ gst_element_set_state (play, GST_STATE_NULL); gst_object_unref (GST_OBJECT (play)); But I get the following error : error : URI not valid. don't understand =/ Ps : I want to play the video in the framebuffer (cause I'll use dfbvideosink after, I've my directfb appliaction wrote), and playbin does'nt seems to work for my video =/ |
the argv[1] has to look like "file:///home/myvideos/video.avi"
|
Ah thanks that works fine but not in the framebuffer =/ Do you know what could work in the framebuffer? Decodebin maybe? I absolutly need to read my video in the framebuffer cause I need to use DirectFB which use it.. =/ |
Okay I've had a look to older threads and it seems that I need to use dfbvideosink (which I need..).
So I've tried something : pipeline = gst_pipeline_new ("video-player"); source = gst_element_factory_make ("filesrc", "file-source"); decoder = gst_element_factory_make ("decodebin", "decoder"); sink = gst_element_factory_make ("dfbvideosink", "video-output"); But I can't play the video... It stays on a black screen when I run it.. Do I have missed something? a converter maybe? an avidemux? Thanks. |
Maybe a small Bump ? ^^'
|
In reply to this post by StyveA
On 31.01.2011 17:28, StyveA wrote:
> > gekko wrote: >> the argv[1] has to look like "file:///home/myvideos/video.avi" >> > Ah thanks that works fine but not in the framebuffer =/ > > Do you know what could work in the framebuffer? Decodebin maybe? > > I absolutly need to read my video in the framebuffer cause I need to use > DirectFB which use it.. =/ that sink and believe it is in general not so widely used. You can have a look at the debug logs, e.g. GST_DEBUG="*:3" ./myapp GST_DEBUG="*:4" ./myapp 2>debug.log Stefan ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
=O I hope this stuff works 'cause I really need to use it for my project =/ I'll have a look on the debug logs, thanks ! I'm also working on Ubuntu through a VirtualBox, I don't know if it can be the origin of my problem... |
On 02/01/2011 09:09 AM, StyveA wrote:
> =O I hope this stuff works 'cause I really need to use it for my project =/ > > I'll have a look on the debug logs, thanks ! > > I'm also working on Ubuntu through a VirtualBox, I don't know if it can be > the origin of my problem... Very well could be. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Stefan Sauer
I've done the Debug, and it seems that the the file is read. I don't know what exactly I need to see in it, but I don't see anything too strange :o Hum what should I see if there is an error plz? |
Am 01.02.2011 23:28, schrieb StyveA:
> > > Stefan Kost wrote: >> >> On 31.01.2011 17:28, StyveA wrote: >>> >>> gekko wrote: >>>> the argv[1] has to look like "file:///home/myvideos/video.avi" >>>> >>> Ah thanks that works fine but not in the framebuffer =/ >>> >>> Do you know what could work in the framebuffer? Decodebin maybe? >>> >>> I absolutly need to read my video in the framebuffer cause I need to use >>> DirectFB which use it.. =/ >> Can you verify otherwise that the directfb stuff works? I am not using >> that sink and believe it is in general not so widely used. >> >> You can have a look at the debug logs, e.g. >> GST_DEBUG="*:3" ./myapp >> GST_DEBUG="*:4" ./myapp 2>debug.log >> >> Stefan >> >> > > > I've done the Debug, and it seems that the the file is read. > I don't know what exactly I need to see in it, but I don't see anything too > strange :o > Hum what should I see if there is an error plz? Search for "dfbvideosink" (the log category of the element or rerun with: GST_DEBUG="*:2,dfbvideosink:4" ./myapp 2>debug.log this way you get all warnings and debug info for the sink only. Stefan ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
This post was updated on .
Thanks, I've done it and it seems that my pipeline is wrong...
My log give me this (only the interessant part...the rest is for DirectFB) : (and I don't understand everything ^^') 0:00:00.147369409 [331m 1926 [00m 0x90ba640 [36mDEBUG [00m [00m dfbvideosink dfbvideosink.c:773:gst_dfbvideosink_setup:<sink> [00m getting pixel format from foreign surface 0x91f65b8 0:00:00.148479268 [331m 1926 [00m 0x90ba640 [36mDEBUG [00m [00m dfbvideosink dfbvideosink.c:787:gst_dfbvideosink_setup:<sink> [00m external surface is 800x600 and uses RGB32 pixel format 0:00:00.157083423 [331m 1926 [00m 0x9221370 [33;01mWARN [00m [00m riff riff-read.c:251:gst_riff_parse_file_header:<avi-demuxer> [00m error: Stream is no RIFF stream: ELF 0:00:00.157253412 [331m 1926 [00m 0x9221370 [33;01mWARN [00m [00m avidemux gstavidemux.c:5004:gst_avi_demux_loop: [00m stream_init flow: error 0:00:00.158229065 [331m 1926 [00m 0x9221370 [33;01mWARN [00m [00m avidemux gstavidemux.c:5071:gst_avi_demux_loop:<avi-demuxer> [00m error: Erreur interne de flux de données. 0:00:00.158320185 [331m 1926 [00m 0x9221370 [33;01mWARN [00m [00m avidemux gstavidemux.c:5071:gst_avi_demux_loop:<avi-demuxer> [00m error: streaming stopped, reason error I think I will use the caps to know which elements I should use.. Am I right for this method (?) : ------------------------------------------------------------------ GstElement* source = gst_element_factory_make("filesrc", "source"); GstPad* pad = gst_element_get_pad(source, "src"); GstCaps* padCaps = gst_pad_get_caps(pad); g_object_set(source,"location", argv[1],NULL); gst_element_set_state (source, GST_STATE_READY); g_print("The caps for the source pad are:\n%s\n", gst_caps_to_string(padCaps)); ------------------------------------------------------------------ For my avi file its format is : video/x-msvideo and the audio is Mpeg1 |
I really don't understand where is my error...
I've launch this line : gst-launch filesrc location=test.avi ! avidemux name=demux demux.video_00 ! decodebin ! ffmpegcolorspace ! videoscale ! autovideosink and my video works fine.. But when I do this : //-----------------------------CODE-------------- int main (int argc, char *argv[]) { GstElement *pipe,*src, *dec,*ffm,*scale, *sink; GstMessage *msg; gst_init (&argc, &argv); loop = g_main_loop_new (NULL, FALSE); if (argc < 2) g_error ("Usage: %s <path to file>", argv[0]); pipe = gst_pipeline_new ("pipeline"); src = gst_element_factory_make ("filesrc", "src"); gst_bin_add (GST_BIN (pipe), src); g_object_set (src, "location", argv[1], NULL); //essayer avec dec au lieu de src dec = gst_element_factory_make ("decodebin", "decoder"); gst_bin_add (GST_BIN (pipe), dec); ffm = gst_element_factory_make ("ffmpegcolorspace", NULL); gst_bin_add (GST_BIN (pipe), ffm); scale = gst_element_factory_make ("videoscale", NULL); gst_bin_add (GST_BIN (pipe), scale); sink = gst_element_factory_make ("autovideosink", "sink"); gst_bin_add (GST_BIN (pipe), sink); g_signal_connect (dec, "pad-added", G_CALLBACK (on_new_pad), sink); gst_element_link_many (src,dec,ffm,scale,sink, NULL); if(!pipe || !dec || !sink || !src || !scale || !ffm) g_print ("error...\n"); gst_element_set_state (pipe, GST_STATE_PLAYING); g_print ("Running...\n"); g_timeout_add (5000, get_me_out, NULL); g_main_loop_run (loop); /* Out of the main loop, clean up nicely */ g_print ("Returned, stopping playback\n"); gst_element_set_state (pipe, GST_STATE_NULL); g_print ("Deleting pipeline\n"); gst_object_unref (GST_OBJECT (pipe)); return 0; } //-----------------------------END--------------- I have nothing that shows up ! Just the "running..." message, but no video.. I really don't get it.. |
Free forum by Nabble | Edit this page |