GStreamer Transcoding and Scaling

Document created by Leonardo Sandoval Gonzalez Employee on Sep 28, 2012Last modified by Jodi Paul on Apr 16, 2013
Version 7Show Document
  • View in full screen mode
Audio transcoding

# Transcode the input file into MP3

 

gst-launch filesrc location=media_file typefind=true ! beepdec ! mfw_mp3encoder ! matroskamux ! filesink location=output_audio_file.mk

Audio transcoding + streaming

# Transcode the input file into MP3 and stream it

 

# On host, get the transcoded audio data

gst-launch udpsrc port=8880 ! <CAPS_FROM_THE_TARGET> ! queue ! ffdec_mp3 ! alsasink

# where <CAPS_FROM_THE_TARGET> can be something like 'audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2'

 

 

# run the pipeline and check the caps

gst-launch filesrc location=media_file typefind=true ! queue ! beepdec ! mfw_mp3encoder ! udpsink host=10.112.103.77 port=8880 -v

Video Transcoding*

# Transcode the input file into AVC (H-264)

 

gst-launch filesrc location=media_file typefind=true ! aiurdemux name=demux ! queue ! vpudec ! vpuenc codec=avc ! matroskamux name=mux ! filesink location=output_media_file.mk

Video Transcoding + scaling*

# Transcode the input file into AVC (H264) and rescale video to 480p

 

gst-launch filesrc location=media_file typefind=true ! aiurdemux name=demux ! queue ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, width=(int)720, height=(int)480' ! vpuenc codec=avc ! matroskamux name=mux ! filesink location=output_media_file.mk

Video transcoding + scaling + streaming*

# NOTE: Run the pipelines in the presented order

 

# On host, get the transcoded+scaled video data

$ gst-launch udpsrc port=8888 ! <CAPS_FROM_THE_TARGET> ! queue ! ffdec_h264 ! xvimagesink

 

# On target, run the pipeline and check the caps

gst-launch filesrc location=media_file typefind=true ! aiurdemux name=demux ! queue ! vpudec ! mfw_ipucsc ! 'video/x-raw-yuv, width=(int)720, height=(int)480' ! vpuenc codec=avc ! udpsink host=$HOST_IP port=8888 -v

 

 

* There is a limit for the number of pipelines which can be run simultaneously, for high resolution input files, at most two for 1080p and four for 720p.

Attachments

    Outcomes