linux - Gstreamer video output position tracking and seeking -


i using gstreamer (gst-launch) capture camera , save stream both video , image frame. problem of pipeline is, when pipeline finishes (by interrupt) video record, can not support position tracking , seeking. hence, video played in vlc player unknown lenght. think problem @ pipeline itself. how can achieve support position tracking , seeking.

here below can see gstreamer pipeline code:

gst-launch -v --gst-debug-level=0 \        v4l2src device=/dev/video0 \        ! videorate \        ! video/x-raw-yuv, width=320, height=240, framerate=5/1 \        ! tee name=tp        tp. \        ! queue \        ! videobalance saturation=0.0 \        ! textoverlay halign=left valign=top text="(c)park on om " shaded-background=true \        ! clockoverlay halign=right valign=top time-format="%d %t "  text="date:" shaded-background=true \        ! queue \        ! ffmpegcolorspace \        ! ffenc_mpeg4 \        ! avimux \        ! filesink location=/ram/pmc/recordcam1.mp4 \        tp. \        ! queue \        ! jpegenc \        ! multifilesink location=/ram/pmc/webcam1.jpeg & 

the explanation of pipeline below:

                                                        ______________  ________  _______     ________________                                                         |convert into|->|append|->|encode| -> |save file    |  _________________    ________________   _____________   | grayscale  |  |text  |  |ffenc |    | recordcam1.mp4 | | use /dev/video |-> |set framerate |-> |multiplexer|-> | input source|   |and resolution|   | named tp  |->                                                         __________  _________________                                                         |jpeg enc|->|save filesink|                                                         | encode |  |   jpeg      | 

at end both mux output saves files disk. should add pipeline achieve position tracking @ media player.

regards

make sure gstreamer signals elements stream end, when interrupt it.

usually done sending eos event.

man gst-launch    [...]    -e, --eos-on-shutdown            force eos event on sources before shutting pipeline down.            useful make sure muxers create readable files when muxing            pipeline   shut  down forcefully via control-c. 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -