converter - How to convert raw BGRA image to JPG using GStreamer 1.0? -
converter - How to convert raw BGRA image to JPG using GStreamer 1.0? -
i'm trying display raw image (1.8mb) gst-launch-1.0
. understand info needs encoded jpg before can achieve. if image stored jpg file story quite simple:
gst-launch-1.0.exe -v filesrc location=output.jpg ! decodebin ! imagefreeze ! autovideosink
however, need assemble pipeline display raw bgra 800x600 image (looks same above) dumped disk 3d application.
this i've done far, problem creates black image on disk:
gst-launch-1.0.exe -v filesrc location=dumped.bin ! video/x-raw,format=bgra,width=800,height=600,framerate=1/1 ! videoconvert ! video/x-raw,format=rgb,framerate=1/1 ! jpegenc ! filesink location=out.jpg
can gstreamer handle task?
solved! 2 major issues faced were:
dump.bin symlink on scheme (cygwin) , reasongst-launch-1.0
unable work it; when working raw data, 1 must specify blocksize filesrc
. ❄
gst-launch-1.0.exe -v filesrc location=dumped.bin blocksize=1920000 ! video/x-raw,format=bgra,width=800,height=600,framerate=1/1 ! videoconvert ! video/x-raw,format=rgb,framerate=1/1 ! jpegenc ! filesink location=out.jpg
on specific case needed flip image vertically because captured opengl framebuffer of 3d application:
gst-launch-1.0.exe -v filesrc location=dumped.bin blocksize=1920000 ! video/x-raw,format=bgra,width=800,height=600,framerate=1/1 ! videoconvert ! video/x-raw,format=rgb,framerate=1/1 ! videoflip method=vertical-flip ! jpegenc ! filesink location=out.jpg
image converter gstreamer gst-launch
Comments
Post a Comment