iMX6 gstreamer pipeline appsrc to mp4mux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX6 gstreamer pipeline appsrc to mp4mux

ソリューションへジャンプ
3,052件の閲覧回数
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.

ラベル(4)
0 件の賞賛
返信
1 解決策
2,114件の閲覧回数
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 件の賞賛
返信
1 返信
2,115件の閲覧回数
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 件の賞賛
返信