Generating YUV test samples with GStreamer

If you need to generate test samples in different YUV formats you can use GStreamer's ffmpegcolorspace plugin like in the following snippet; for instance, in order to get an image in the NV12 raw format you can do:

gst-launch-0.10 -q \
  filesrc location=my_image.jpg ! \
  decodebin2 ! \
  ffmpegcolorspace ! video/x-raw-yuv,format=\(fourcc\)NV12 ! \
  filesink location=my_image_NV12.yuv

obviously you can use FFmpeg directly too.

Here is a script attached for me to use in the future.


CommentsSyndicate content

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
L
w
5
e
n
A
Enter the code without spaces.