summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorShuang He <shuang.he@intel.com>2013-04-24 10:01:15 +0800
committerJosé Fonseca <jose.r.fonseca@gmail.com>2013-04-24 07:32:04 +0100
commit90808c138de511a81b6b85d22a9400007d91336b (patch)
tree61c76ba0b9e3371a5f0013ea96a778a9a355c9cc /README.markdown
parent472fa28fe03219b20a50da287238c873e20884c5 (diff)
Add option '--snapshot-format=' to allow write raw RGB directly to stdout
This allows to create h264 video with gstreamer-vaapi very fast, and save much more disk space. Using PNM format couldn't reach same performance, since PNM decoding seems inefficient in gstreamer. Following are some experiment data with smokinguns demo 1920x1080 resolution on Ivybridge: 1. With png saving, it runs at around 4.5 FPS, which has compression rate 5.15x against raw RGB data Reference command: glretrace -s snapshot/ smokinguns.trace 2. Using PNM with gstreamer-vaapi, which could run at around 9 FPS, which has compression rate 485x (QP dependent) against raw RGB data. Reference command: glretrace -s - smokinguns.trace | gst-launch-0.10 fdsrc blocksize=409600 ! queue \ ! pnmdec ! videoparse format=rgb width=1920 height=1080 ! ffmpegcolorspace ! queue \ ! vaapiupload direct-rendering=0 ! queue ! vaapiencodeh264 ! filesink location=xxx.264 3. With following command that directly write raw RGB stream and encoded into H264 video, it runs at around 18.5 FPS, which has compression rate 485x (QP dependent) against raw RGB data, Reference command: glretrace --snapshot-format=RGB -s - smokinguns.trace | gst-launch-0.10 fdsrc blocksize=409600 ! queue \ ! videoparse format=rgb width=1920 height=1080 ! queue ! ffmpegcolorspace ! queue \ ! vaapiupload direct-rendering=0 ! queue ! vaapiencodeh264 ! filesink location=xxx.264 v2: Use --snapshot-format= option to specify which format is used to write to stdout output v3: Use enum for snapshotFormat and add example in README.markdown
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 7545982e..03f9e886 100644
--- a/README.markdown
+++ b/README.markdown
@@ -277,6 +277,14 @@ You can make a video of the output by doing
apitrace dump-images -o - application.trace \
| ffmpeg -r 30 -f image2pipe -vcodec ppm -i pipe: -vcodec mpeg4 -y output.mp4
+Recording a video with gstreamer
+--------------------------------------
+
+You can make a video of the output with gstreamer by doing
+
+ glretrace --snapshot-format=RGB -s - smokinguns.trace | gst-launch-0.10 fdsrc blocksize=409600 ! queue \
+ ! videoparse format=rgb width=1920 height=1080 ! queue ! ffmpegcolorspace ! queue \
+ ! vaapiupload direct-rendering=0 ! queue ! vaapiencodeh264 ! filesink location=xxx.264
Trimming a trace
----------------