0

I'm trying to view the MPEG-4 video stream from IP-camera which is sent by UDP multicast using gstreamer-java. Each frame sent by camera is splitted into several UDP-packets. After assembling complete frames from UDP-packets I get sequence of I-Frames and P-frames represented as byte arrays. I push each of these frames into "AppSrc" which is connected to "capsfilter" which is connected to "decodebin". The problem is: gstffmpegdec.c:2259:gst_ffmpegdec_frame: ffdec_mpeg4: decoding error (len: -1, have_data: 0). I also tried the following chain: apprc => capsfilter => mpeg4videoparse => decodebin => videosink. The result was the same. What I must to do to workaround this problem?

beemaster
  • 291
  • 1
  • 3
  • 13

1 Answers1

0

Seems I found one way and now i'm testing it for stability. I have compiled from git (git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-good) the gstreamer core, the "base", the "good" and the "bad" packages. And then I applied the "xviddec" plugin which is now capable to process the buffers with caps "video/mpeg, mpegversion=4".

So the pipeline description is: "mpeg4videoparse name=parser ! xviddec ! ffmpegcolorspace ! capsfilter name=outfilter" which is connected to AppSrc object and VideoComponent object of "gstreamer-java" wrapper.

To specify the path to my compiled gstreamer binaries I pass the following JVM parameter: "-Djna.library.path="path_to_my_home/bin/gstreamer/lib".

Note that compiling of "xviddec" requires the package "libxvidcore-dev" to be installed.

beemaster
  • 291
  • 1
  • 3
  • 13