您的位置:首页 > 其它

dump video es and audio es from avi using gstreamer tools

2012-02-24 10:10 375 查看
I am using a embedded linux board with gstreamer installed.

"cd" to the directory where gst tools are installed, you can run the gst commands such as gst-launch and gst-inspect.

A usb mememory is mounted under /mnt/sda. Under the directory of "streams" some streams are available. I want to dump video and audio from the "VID-3B.avi" stream, so I ran the following command respectively, and the 2 files test_video.es and test_audio.es are generated respectively under current directory.

1. generate video es:

./gst-launch filesrc location=/mnt/sda/streams/VID-3B.avi ! queue max-size-time=0 max-size-buffers=10 max-size-bytes=$((8*1024)) ! avidemux name=dm dm.video_00 ! filesink location=test_video.es

2. Generate audio es:

./gst-launch filesrc location=/mnt/sda/streams/VID-3B.avi ! queue max-size-time=0 max-size-buffers=10 max-size-bytes=$((8*1024)) ! avidemux name=dm dm.audio_00 ! filesink location=test_audio.es

Suppose your file is on the http, using the command like below:

gst-launch souphttpsrc location=http://xx.xx.xx.xx/test/H_VIDEO_CODECS/VID-3B.avi ! avidemux name=dm dm.video_00 ! queue max-size-time=0 max-size-buffers=10 max-size-bytes=$((8*1024)) ! filesink sync=true render-delay=250000000 location=test_1.es

Where xx.xx.xx.xx is the IP address of your http server.

本文出自 “linux问题” 博客,请务必保留此出处http://greg10.blog.51cto.com/3430979/788299
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: