video framerate encoding issue

mattes effemm at mykmk.com
Wed Dec 21 22:51:25 PST 2011


I am using Gstreamer pipeline to capture video and audio, and encode both
into a file. I noticed that the actual video frame rate differentiate,
 depending on the audio source and capture parameter.

On playback the audio is fine, but the video frame rate is much less the requested 30 fps.

Here the differences, depending on how audio is captured:

  a) alsasrc                        ==> 20fps video frame rate
  b) alsasrc buffer-time=1000000    ==>  6fps video frame rate
  c) audiotestsrc                   ==> 30fps video frame rate
  d) Encoding video only (w/o audio) results always in a perfect 30fps.

Why do different audio setting, cause a change in final video frame rate?
Are there any hidden bottlenecks in the video pipeline?
Something wrong with my command line?

Here my encoding commandline:

 gst-launch -e shmsrc blocksize=40960 socket-path=/tmp/test is-live=1 do-timestamp=1 ! \
video/x-raw-yuv,framerate=30/1,width=1280,height=720 ! queue ! ffenc_h263p bitrate=2000000 name=venc \
alsasrc  ! audio/x-raw-int,rate=48000,channels=1 ! queue ! audioconvert ! lame name=aenc \
qtmux name=mux ! filesink location=test.mp4 aenc. ! mux. venc. ! mux.

This is the video producing commandline I used for the test:

 gst-launch -v videotestsrc ! \
'video/x-raw-yuv, width=1280, height=720, framerate=30/1, format=(fourcc)I420' ! \
shmsink socket-path=/tmp/test shm-size=10000000 blocksize=40960 wait-for-connection=0

mattes




More information about the gstreamer-devel mailing list