iMX6 gstreamer pipeline appsrc to mp4mux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 gstreamer pipeline appsrc to mp4mux

Jump to solution
2,327 Views
evgenymolchanov
Contributor III

Hello all.

i need to record video from IP cameras in chunks of 1 minute each.

This command line pipeline

gst-launch rtspsrc location=rtsp://admin:admin@192.168.1.200/0 ! gstrtpjitterbuffer ! rtph264depay ! h264parse ! mp4mux ! filesink location=/media/Videos/mvr.mp4 -e -v

works perfectly.

But then I split it programmatically on two pipelines:

descr = g_strdup_printf ("rtspsrc name=rtspsrc location=%s ! gstrtpjitterbuffer ! rtph264depay ! legacyh264parse ! appsink name=appsink", url);

and

descr = g_strdup_printf ("appsrc name=appsrc !  mp4mux ! filesink name=filesink");

i rceive an error:

Error: Internal data flow error.

[Debug details: /home/mef/iMX6/fsl-release-bsp/build-dfb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline1/GstAppSrc:appsrc:

streaming task paused, reason not-negotiated (-4)]

Returned, stopping playback

Deleting pipeline

if I change second pipeline to:

descr = g_strdup_printf ("appsrc name=appsrc ! vpudec output-format=1 ! queue ! vpuenc ! mp4mux ! filesink name=filesink");

everything works fine.

I don't want to use VPU for this cause I need VPU for decoding and displaying video from IP cameras.

Help me please.

Labels (4)
0 Kudos
1 Solution
1,389 Views
evgenymolchanov
Contributor III

I have solved this problem.

It is necessary move h264parse element to second pipeline after appsrc:

descr = g_strdup_printf ("rtspsrc name=rtspsrc location=%s ! gstrtpjitterbuffer ! rtph264depay !  appsink name=appsink", url);

descr = g_strdup_printf ("appsrc name=appsrc ! legacyh264parse !  mp4mux ! filesink name=filesink");

View solution in original post

0 Kudos
1 Reply
1,390 Views
evgenymolchanov
Contributor III

I have solved this problem.

It is necessary move h264parse element to second pipeline after appsrc:

descr = g_strdup_printf ("rtspsrc name=rtspsrc location=%s ! gstrtpjitterbuffer ! rtph264depay !  appsink name=appsink", url);

descr = g_strdup_printf ("appsrc name=appsrc ! legacyh264parse !  mp4mux ! filesink name=filesink");
0 Kudos