Let's say you have a video file.
As far as I searched, you first need to know what container it uses by mediainfo
command.
假设你有一个视频文件。在我搜索的过程中,您首先需要知道mediainfo命令使用的是什么容器。
$ mediainfo your_path_to_a_video.file
you then need to find a demuxer for the container, so you do
然后需要为容器找到一个demuxer,这样就可以了。
$ gst-inspect-1.0 | grep your_container_name_such_as_ogg
now that you have a proper demuxer, such as oggdemux
, you can split video and audio. If you want to display the video, you first need to know the codec name, and you will need to decode it to output to the screen.
Going back to the mediainfo
output, you go find the video Format
, and you do
现在您有了一个合适的demuxer,比如oggdemux,您可以分割视频和音频。如果您想要显示视频,首先需要知道codec的名称,您需要将其解码以输出到屏幕。回到mediainfo输出,你可以找到视频格式,然后你就可以了。
$ gst-inspect-1.0 | grep format_name_such_as_theora
You will find theoradec
and you check its details by
你会发现定理和它的细节。
$ gst-inspect-1.0 | decoder_name_such_as_theoradec
to see the sink
and src
. You now find the src
is video/x-raw
so you will need to find the final sink to output the video on display, such as xvimagesink
.
去看水槽和src。您现在发现src是视频/x-raw格式,所以您需要找到最终的接收器来输出显示的视频,比如xvimagesink。
I am just writing this all based on a web page in Japanese, and I didn't find any other pages that explained more than this (either in English or Japanese).
我只是用日语的一个网页来写这篇文章,我没有发现任何其他的页面可以解释得更多(不管是英文还是日语)。
I want to find pages explaining how one can complete a pipeline based on mediainfo and so on. Even after I read the web page, I am still not sure how to match capabilities between elements to elements.
我想找一些页面来解释一个人如何能够完成一个基于mediainfo的管道。即使在阅读了web页面之后,我仍然不确定如何在元素之间匹配元素。
How do you build your pipelines?
How do you match caps?
如何构建管道?你如何搭配帽子?
1 个解决方案
#1
1
If all you want is to playback your video file, you can do:
如果你只想播放你的视频文件,你可以这样做:
gst-launch-1.0 playbin uri=file:///path/to/your/video
gst -发射- 1.0 playbin uri =文件:/ / / /你/视频/路径
If you need to decode it to a raw video format and do further processing, you can :
如果您需要将其解码为原始视频格式并进行进一步处理,您可以:
gst-launch-1.0 uridecodebin uri=file:///path/to/your/video ! video/x-raw ! further_processing
Same goes with audio, and you can even name your uridecodebin to separate audio and video:
音频也是一样,你甚至可以将你的uridecodebin命名为单独的音频和视频:
gst-launch-1.0 uridecodebin uri=file:///path/to/your/video name=d ! video/x-raw ! further_video_processing d. ! audio/x-raw ! further_audio_processing
If you want to see what the actual pipeline looks like, you can set the GST_DEBUG_DUMP_DOT_DIR environment variable to dump a dot representation:
如果要查看实际的管道是什么样子,可以设置GST_DEBUG_DUMP_DOT_DIR环境变量来转储一个点表示:
GST_DEBUG_DUMP_DOT_DIR=$PWD gst-launch-1.0 playbin uri=file:///path/to/your/video
Then:
然后:
dot -Tsvg name_of_the_dot_file.dot -o mypipeline.svg
Edit : as for the documents I read to figure this out, the "application development manual", the manual page for gst-launch and gst-inspect along with the various docs here : http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs should get you started.
编辑:至于我读过的文档,我想知道,“应用程序开发手册”,gst-launch和gst-inspect的手册页,以及这里的各种文档:http://cg.freedesktop.org/gstreamer/gstreamer/tree/docs应该可以启动。
#1
1
If all you want is to playback your video file, you can do:
如果你只想播放你的视频文件,你可以这样做:
gst-launch-1.0 playbin uri=file:///path/to/your/video
gst -发射- 1.0 playbin uri =文件:/ / / /你/视频/路径
If you need to decode it to a raw video format and do further processing, you can :
如果您需要将其解码为原始视频格式并进行进一步处理,您可以:
gst-launch-1.0 uridecodebin uri=file:///path/to/your/video ! video/x-raw ! further_processing
Same goes with audio, and you can even name your uridecodebin to separate audio and video:
音频也是一样,你甚至可以将你的uridecodebin命名为单独的音频和视频:
gst-launch-1.0 uridecodebin uri=file:///path/to/your/video name=d ! video/x-raw ! further_video_processing d. ! audio/x-raw ! further_audio_processing
If you want to see what the actual pipeline looks like, you can set the GST_DEBUG_DUMP_DOT_DIR environment variable to dump a dot representation:
如果要查看实际的管道是什么样子,可以设置GST_DEBUG_DUMP_DOT_DIR环境变量来转储一个点表示:
GST_DEBUG_DUMP_DOT_DIR=$PWD gst-launch-1.0 playbin uri=file:///path/to/your/video
Then:
然后:
dot -Tsvg name_of_the_dot_file.dot -o mypipeline.svg
Edit : as for the documents I read to figure this out, the "application development manual", the manual page for gst-launch and gst-inspect along with the various docs here : http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs should get you started.
编辑:至于我读过的文档,我想知道,“应用程序开发手册”,gst-launch和gst-inspect的手册页,以及这里的各种文档:http://cg.freedesktop.org/gstreamer/gstreamer/tree/docs应该可以启动。