[gst-devel] PNG encoding produces empty file with ffenc_png

Franz TRIERWEILER franz.trierweiler.ingenieur at gmail.com
Wed Apr 7 14:31:56 CEST 2010


Hello,

I am trying on a Freescale ARM-based board to encode JPEG or PNG picture
from a webcam source through gst-launch this way:

gst-launch-0.10 --verbose v4l2src num-buffers=1 ! ffenc_png !  filesink
location=toto.png

(I was advised by Freescal support to set num-buffers to 1 because
gst-launch never gets out).

The result is as follows and produces an empty file:

Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
video/x-raw-yuv, 1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/ffenc_png:ffenc_png0.GstPad:src: caps = image/png,
width1
/GstPipeline:pipeline0/ffenc_png:ffenc_png0.GstPad:sink: caps =
video/x-raw-yuv1
Got EOS from element "pipeline0".
Execution ended after 7175133452 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/ffenc_png:ffenc_png0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/ffenc_png:ffenc_png0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
root at freescale ~$ ls

When I try the same command on an Ubuntu system with the same webcam
(*replacing
ffenc_png with pngenc - I do not know why pngenc has been replaced with
ffenc_png on the Freescale Linux distro*) then I get a right PNG file:

gst-launch-0.10 --verbose v4l2src num-buffers=1 ! pngenc !  filesink
location=toto.png

This produces:
Définition du pipeline à PAUSED...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)16711680,
green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321,
width=(int)640, height=(int)480, framerate=(fraction)30/1
Le pipeline est actif et n'a pas besoin de phase PREROLL...
Passage du pipeline à la phase PLAYING...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstPngEnc:pngenc0.GstPad:src: caps = image/png,
width=(int)640, height=(int)480, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstPngEnc:pngenc0.GstPad:sink: caps =
video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)16711680,
green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321,
width=(int)640, height=(int)480, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = image/png,
width=(int)640, height=(int)480, framerate=(fraction)30/1
EOS reçu de l'élément « pipeline0 ».
Execution ended after 791913102 ns.
Définition du pipeline à PAUSED...
Définition du pipeline à READY (prêt)...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstPngEnc:pngenc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstPngEnc:pngenc0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
Définition du pipeline à NULL...
Libération du pipeline (FREE)...

On Ubuntu, the first pipe gives more information about the v4l2src, not on
the Freescale.

What I know is that the webcam is providing video data since I can fill a
file when I simply do:

gst-launch-0.10 --verbose v4l2src num-buffers=1 ! filesink loc
ation=toto.raw

I am ready to provide more information if required for debugging this. My
first goal is:
1- Do I use the correct syntax with ffenc_png?
2- What do the debug messages mean?

I have other issues with the jpeg encoding but first I prefer focusing on
PNG encoding.

Best Regards,
Franz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100407/1874d251/attachment.htm>


More information about the gstreamer-devel mailing list