Obtain information from the GST-inspect in gstreamer, sample of the GST-Launch Test Link

Source: Internet
Author: User
Tags flv file gstreamer

Share and memo.

When using the gstreamer architecture for media development, GST-inspect and GST-launch are two very useful gadgets. The former is used to query all the elements in the library and their details, the latter is used to quickly build a pipeline. This command is the best, because you can feel the pleasure of playing with just one sentence. Let's just look at the example:

1 GST-inspect usage:

First enter the command line, and then type:

GST-inspect, all elements are displayed;

GST-inspect> D:/c.txt export all elements to C under the root directory of drive D. In a TXT file, this command is useful when you want to find an element but are not sure about its full name

GST-inspect FFMPEG> D/c.txt is the same as above, but the exported Element range is reduced to the FFMPEG range.

GST-inspect ffdec_h264. Display ffdec-h264 details, you can enter any element you want to query, as long as it already exists, you can find

 

2. usage of the GST-launch build link:

The first step is to build a link. Of course, using playbin, playbin2, decodebin, decodebin2, uridecodebin and other upper-layer elements is the easiest and easiest to do.

For example, if you want to play a FLV file in D:/test_videos/1.flv, first go to the command line and type:

GST-launch filesrc location = D:/test_videos/1.flv! Decodebin! Autovideosink uses filesrc decodebin and autovideosink three elements, and sets the location attribute value of filesrc as the file path.
GST-launch filesrc location = D:/test_videos/1.flv! Decodebin2! Autovideosink is the same as above, but decodebin is replaced by a newer decodebin2.

GST-launch uridecodebin uri = file: // D:/test_videos/1.flv! Autovideosink uses uridecodebin and autovideosink two elements. The uridecodebin attribute URI Sets

GST-launch playbin uri = file: // D: test_video/1.flv uses playbin as an element and sets its attribute URI to file: // Add a file path.
GST-launch playbin2 uri = file: // D: test_video/1.flv is the same as above, but playbin2 is replaced by playbin.

 

If you want to build a link using the basic element instead of the upper bin element, perform the following steps.

For example, if you want to play a FLV file at D:/test_videos/0.flv

First, you need to determine the desired decoding element to construct. Therefore, you must first determine the file encoding format.

Then, type:

GST-launch filesrc location = D:/test_videos/0.flv! Flvdemux! Ffdec_h264! Autovideosink

Among them, flvdemux is used to separate multiple channels of data, ffdec-h264 is used to decode, and finally played by autovideosink

If you want to play other files, you only need to specify the specific Demux according to the corresponding file container format, and then specify the specific Decoder Based on the encoding format. If you do not know which element to use, the best method, of course, is to use the GST-inspect to find and verify it.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.