| 1 | [[PageOutline]] |
| 2 | |
| 3 | [=#audio-and-video] |
| 4 | = Video and Audio = |
| 5 | Playback of combined video and audio is a bit more complicated as now you need to utilize parsers, named elements to split the audio and video paths, and queues to avoid single-threaded blocking. |
| 6 | |
| 7 | The following pipeline examples utilize plugins from the the Freescale gst-fsl-plugin package on GStreamer 0.10. |
| 8 | |
| 9 | gst-fsl-plugin elements used: |
| 10 | * Parsers / Demuxers: |
| 11 | * '''aiurdemux''' - parse and identify source stream formats |
| 12 | |
| 13 | Example using Big Buck Bunney H.264 (MOV H264 video, AAC suuround sound): |
| 14 | {{{ |
| 15 | gst-launch filesrc location=/media/sda1/big_buck_bunny_1080p_h264.mov typefind=true ! aiurdemux name=d ! \ |
| 16 | queue2 ! beepdec ! alsasink d. ! \ |
| 17 | queue2 ! vpudec ! mfw_v4lsink device=/dev/video16 |
| 18 | }}} |
| 19 | |
| 20 | |
| 21 | == GStreamer '''playbin2''' and '''decodebin2''' elements == |
| 22 | GStreamer has some '''bin''' elements that try to 'autoplug' other elements together by inspecting the pipeline. |
| 23 | |
| 24 | The '''decodebin2''' element will try to figure out the proper decoder pipeline for the sink specified: |
| 25 | {{{ |
| 26 | gst-launch filesrc location=/media/sda1/big_buck_bunny_720p_surround.avi ! \ |
| 27 | decodebin2 ! mfw_v4lsink device=/dev/video16 |
| 28 | }}} |
| 29 | |
| 30 | There is also '''playbin2''' which just needs to be given a source and a sink |
| 31 | {{{ |
| 32 | gst-launch playbin2 uri=file:///home/root/hawaii.mp4 \ |
| 33 | video-sink="mfw_v4lsink device=/dev/video16" |
| 34 | }}} |
| 35 | |
| 36 | Note that these 'bin' elements may not always do what you want or expect (they may not use hardware decode for example). |
| 37 | |
| 38 | |
| 39 | == Freescale gplay == |
| 40 | Or if simplicity is required, the Freescale GStreamer based '''gplay''' app will try to determine the file type and play it back as best as it can. |
| 41 | {{{ |
| 42 | gplay /media/sda1/big_buck_bunny.mov |
| 43 | }}} |