Hello,
I've been trying to run a simple OpenCV application which opens, reads and displays an .avi file on an IMX53 qsb
Instead of having a video frame displayed, I keep getting this warning message until the program exits:
** (fen:21270): WARNING **: ffmpegcsp0: size 729600 is not a multiple of unit size 720000
although it is just a warning the cvNamedWindow doesn't even appear.
Has anyone encountered this issue ? I believe it has something to do with the frame buffer but I have no idea how to deal with it.
NB : I use OpenCV 2.3.1 and I followed this tutorial http://technology.dip.jp/~ray/2012/12/898 to compile it for my target.
Thank you
which bsp release are you using ? Also, OpenCV will not use our hardware to decode the videos, so, you are not going to have a good performance with this procedure. I suggest you to use gstreamer instead, the you get the video frames and then use it with opencv.
regards,
Andre
Thanks for your answer. I'm sorry for the long delay before my reply, I wasn't able to work on this project until now.
I'm using Linux lucid 2.6.35.3-1129-g691c08a #7 PREEMPT Wed Nov 16 14:33:06 BRST 2011 armv7l GNU/Linux.
I tried to launch the video with gstreamer to make sure the pipeline works fine before using it inside the openCV application,
gst-launch filesrc location=video.avi ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! autovideosink
and this is what I get:
Setting pipeline to PAUSED ...
MFW_GST_V4LSINK_PLUGIN 2.0.3-1-179-e630aa8d build on Sep 28 2011 15:04:02.
Pipeline is PREROLLING ...
Aiur: 2.0.3-1-179-e630aa8d
Core: AVI_PARSER_03.02.00 build on Jul 11 2011 09:49:53
mime: video/x-msvideo
file: lib_avi_parser_arm11_elinux.3.0.so.3.2.1
Content Info:
URI:
file://video.avi
Idx File:
/home/lucid/.aiur/video.avi.aidx
Seekable : Yes
Size(byte): 36107876
Movie Info:
Seekable : Yes
Live : No
Duration : 0:01:40.000000000
ReadMode : File
Track : 1
Track 00[Video]: Disabled
Codec: 0, SubCodec: 0
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin2:dec/GstAiurDemux:aiurdemux0: GStreamer encountered a general stream error.
Additional debug info:
aiurdemux.c(3872): aiurdemux_pull_task (): /GstPipeline:pipeline0/GstDecodeBin2:dec/GstAiurDemux:aiurdemux0:
streaming stopped, reason error, state 2
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Total rendered:0
[--->FINALIZE aiurdemux
[--->FINALIZE v4l_sink
Freeing pipeline ...
I checked on my laptop and the gstreamer pipeline works fine. Am i missing a file or something ?
try using this pipeline:
gst-launch filesrc location=file.avi ! decodebin2 ! mfw_v4lsink ---> for framebuffer
gst-launch filesrc location=file.avi ! decodebin2 ! ffmpegcolorspace ! mfw_v4lsink ---> for framebuffer
gst-launch filesorc location=file.avi ! decodebin2 ! ffmpegcolorspace ! ximagesink ---> x window
and also you can do a quick test using playbin:
gst-launch playbin uri=file:///file_path.
regards,
Andre
It looks like neither of them work. I keep getting the same error message.
even the playbin pipeline didnt work ?
even the playbin...
I will do as you say and come back if it ever get solved.
Thanks a lot for your time !
Cool, just another thing that may help you... OpenCV uses v4l libraries to create its own read/write video functions... Unless you select it to use gstreamer you don´t need gstreamer. I particularly never used OpenCV with gstreamer.
regards,
Andre
You will need to check the GST plugins you have installed, try searching for some gstreamer thread in this community. Unfortunately I´m a gstreamer expert =(