[gst-devel] Joining Two Video Streams using GNonLin

Sandeep Prakash 123sandy at gmail.com
Wed Jun 23 08:47:46 CEST 2010


Hi All,

I am writing a simple gst application to cut and join 2 video files (both
mp4/mpeg-4) using GNonLin. 
The pipeline I am constructing in my application goes like this:

gnlcomposition \(name=comp 
                 gnlfilesource \(name=video1 start=0 duration=10
media-start=25 media-duration=10         
                                      location=file1.mp4 \)
                 gnlfilesource \(name=video2 start=10 duration=10
media-start=0 media-duration=10 
                                      location=file2.mp4 \) \)
comp.src ! ffmpegcolorspace ! tee name=videotee videotee.src0 ! queue !
xvimagesink videotee.src1 ! 
queue ! identity single-segment=true ! videoscale ! 
"video/x-raw-yuv, width=(int)800, height=(int)480" ! videorate !
ffenc_mpeg4 ! mux. ffmux_3gp name=mux ! filesink location=out.3gp

This pipeline joins 2 video streams each of 10 seconds. A 10 second chunk is
cut in the middle 
of each of the files from 25th sec to 35th sec of the 1st file and 0th sec
to 10th sec of the 2nd file.

In the above pipeline I am facing an issue like this:
-> When file1.mp4 and file2.mp4 are same or have the same FPS, then the
resulting out.3gp 
     is properly encoded.
-> When file1.mp4 and file2.mp4 have different FPS, then in the resulting
out.3gp, the frames from 
     file1.mp4 is encoded properly, but the frames from file2.mp4 is
corrupted. 
     When played in mplayer following is the o/p:
	[mpeg4 @ 0x18bffe0]hmm, seems the headers are not complete, trying to guess 
                                      time_increment_bits
	[mpeg4 @ 0x18bffe0]my guess is 14 bits ;)
	[mpeg4 @ 0x18bffe0]hmm, seems the headers are not complete, trying to guess 
                                      time_increment_bits
	[mpeg4 @ 0x18bffe0]my guess is 11 bits ;)
	[mpeg4 @ 0x18bffe0]Error, header damaged or not MPEG4 header (qscale=0)
	[mpeg4 @ 0x18bffe0]header damaged
	Error while decoding frame!
	[mpeg4 @ 0x18bffe0]Error, header damaged or not MPEG4 header (qscale=0)
	[mpeg4 @ 0x18bffe0]header damaged
	Error while decoding frame!
        ****************For all the Frames*****************

Could anyone help me out in this regard and suggest some alternatives.

Other Details:
Gst Version:        0.10.25
GNonLin Version: 0.10.13

Thanks in advance
Sandeep Prakash
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Joining-Two-Video-Streams-using-GNonLin-tp2265170p2265170.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list