dump video es and audio es from avi using gstreamer tools

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.

 

你可能感兴趣的:(职场,休闲,gstreamer,gst)