Template:Glsdk running gsttestplayer

Gsttestplayer
gsttestplayer is a gstreamer test application useful for testing some features not testable with gst-launch-1.0 such as:
 * 1) Seek - Seeking to random points in a stream
 * 2) Trick play  - Playback at different speeds (fast forward, rewind)
 * 3) Pause, Resume
 * 4) Playing multiple streams simultaneously in the same process, in a loop or one after another.

Running gsttestplayer
Command line options: target # gsttestplayer -h Usage: gsttestplayer -s   Specify the video sink name to be used, default: kmssink -n              Do not use VPE, implies no scaling -r x Resize the output to widthxheight, no scaling if left blank -a              Play with no A/V Sync -c  Non-interactive mode, reading commands from --help-gst                       Show GStreamer Options

Example: To use waylandsink and resize the output video to 800x400. target # gsttestplayer -s waylandsink -r 800x400

In normal mode, when -c option is not used, the application enters an command prompt at which the user enter various commands. Type "help" to print out the list of possible commands: target # gsttestplayer -s waylandsink -r 800x400 Scaling output to 800x400 Using videosink=waylandsink  help Commands available: start  stop pause resume seek    sleep msleep  rewind exit 

Example commands: start 0 KMS_MPEG4_D1.MP4 # Start playing the file "KMS_MPEG4_D1.MP4", using instance 0. start 1 NTSC_h264.mp4    # Start playing the file "NTSC_h264.mp4" (simultaneously) using instance 1. stop 0                   # Stop playback of instance 0. seek 0 0 2               # Seek to "0"th second mark of the stream playing in instance 0, # and start playing back at speed 2x. seek 0 300 -1            # Seek to "300"th second mark of the stream playing in instance 0, # and start playing back reserve at speed 1x. start 2 /dev/video1      # Start capturing from /dev/video1 using the v4l2src plugin

All these commands could be put into a text file and given as input to gsttestplayer with the "-c" option. In this case, gsttestplayer runs non-interactively, reading commands from the text file one line after another. The commands sleep and rewind are useful for this mode, to introduce delays or to create a loop respectively.

Notes:
 * 1) This application plays video only. Audio path is not used.
 * 2) The input filename should have the correct file extension to indicate the type of file. The supported extensions are "mp4", "avi", "ts", "asf" & "wmv".
 * 3) The input filename should contain the string "264", "mpeg2", "mpeg4" or "vc1"/"wmv" to indicate which video codec should be used for decoding - H.264, MPEG-2, MPEG-4 or Windows Media Video.
 * 4) If the input filename is a video device which matches /dev/videoX pattern, v4l2src plugin would be used for video capture instead of playback.
 * 5) Decode and capture can be run in parallel depending on the sink being used.