$ simple-encoder -r inputfile.y4m
And you'll got an output file in H264 with two regions of interest.
https://bugzilla.gnome.org/show_bug.cgi?id=768248
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
gst_video_info_set_format() and gst_video_info_from_caps() call, internally,
gst_video_info_init(), hence it is not required to call it before them. This
patch removes these spurious calls.
Add a cosmetic change to replace VAAPI buffer with VA buffer and most
importantly fix warnings spitted out during build on 64-bit platforms.
../../tests/simple-encoder.c:211:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘gssize’ [-Wformat=]
g_warning ("Invalid VAAPI buffer size (%d)", size);
^
../../tests/simple-encoder.c:217:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘gssize’ [-Wformat=]
g_warning ("Failed to create output buffer of size %d", size);
^
This patch adds a simple-encoder test program that uses libgstvaapi for video
encoding to elementary (raw) streams. Input stream is raw YUV in the Y4M
format. That can be from a regular file or standard input when the input
filename is "-".
Usage: simple-encoder [options]* <source>
Options:
--output|-o output file name
--codec|-c codec to use for video encoding
--bitrate|-b desired bitrate (kbps)
By default, and as an initial patch, the encoded stream shall conform to the
minimally supported profile. That is "Constrained Baseline Profile" for H.264
and "Simple Profile" for MPEG-2. Though, those are the defaults to be
generated by libgstvaapi.
You can find Y4M sample files here http://samples.mplayerhq.hu/yuv4mpeg2/
Original-patch-by: Changzhi Wei <changzhix.wei@intel.com>
* general code clean-up
* removed the yuv reader thread
* re-wrote the y4m file parser
* updated used API fixed some wrong usage
* fixed a lot of memory leaks
* added the bitrate setting
* keep fps' numerator and denominator
* simplified the thread control
* removed custom logging and use glib
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=719528