[gst-devel] Duplicates frames in h264 stream

Prabhulinga Swamy B S prabhulingaswamy.bs at globaledgesoft.com
Tue Jul 20 08:05:37 CEST 2010



Hi Sudarshan,

     The video play duration is double actually. I was receiving frames 
at 30fps and I'm writing
     to the avi header as 30 fps only. But the file size is exactly same 
as the bytes I received
     from the network. I was printing debug message whenever I called
     gst_app_src_push_buffer(pSrc, pGstbuf) to push buffer into gst 
pipeline.

     I can't trace out exactly how to control that.

     And the bitrate of the video file is having a junk value. Don't 
know how to write bitrate
     information into avi header. I think Gstreamer itself will write 
all header info.

With Regards,
Prabhu B S



On 07/19/2010 05:39 PM, sudarshan bisht wrote:
> That means you are somewhere pushing GstBuffer with NULL data part and 
> some timestamp.
>
> OK can you tell that the video play duration is fine or its doubled ?
>
>
> On Mon, Jul 19, 2010 at 1:31 PM, Prabhulinga Swamy B S 
> <prabhulingaswamy.bs <http://prabhulingaswamy.bs>@globaledgesoft.com 
> <http://globaledgesoft.com>> wrote:
>
>
>     Hi,
>             I agree with h264parse can complete h264 frames.
>
>             Before starting gstreamer pipeline, I'll negotiates the
>     video resolution. Thats not a problem.
>
>             The reason, I'm receiving complete h264 frames before
>     pushing to h264parse is, another display
>             application using ffmpeg is displaying the live stream.
>     Display application uses the completed
>             frames for  displaying.
>
>             My problem is with dummy frames written into avi file.
>
>
>     On 07/15/2010 11:36 AM, sudarshan bisht wrote:
>>      Hi ,
>>       You are setting caps 800x600 in caps but you output shows
>>     1280x720 ??
>>
>>        And why you are waiting to receive a complete frame ?  you can
>>     simply push the data to appsrc , h264parse is there to build a
>>     complete frame .
>>
>>     On Thu, Jul 15, 2010 at 11:15 AM, Prabhulinga Swamy B S
>>     <prabhulingaswamy.bs
>>     <http://prabhulingaswamy.bs>@globaledgesoft.com
>>     <http://globaledgesoft.com>> wrote:
>>
>>         hi Sandeep,
>>              thank you for your reply.
>>
>>             Yes, I'm sure of receiving 30 fps from the network. After
>>         completely receiving
>>             the frame, I'm incrementing frame count.
>>
>>             What I mean about the duplicate frames is, after every
>>         valid frame
>>         in the resulting
>>             video file, there is a duplicate and empty frame.
>>
>>             The fallowing output can clear your doubt.
>>
>>         prabhu at prabhu:avi $ ffmpeg -v 5 -i sample.avi -f null -
>>
>>         Input #0, avi, from 'sample.avi':
>>           Duration: 00:00:00.00, start: 0.000000, bitrate: -2147483 kb/s
>>             Stream #0.0, 1/60: Video: h264, yuv420p, 1280x720, 1/120,
>>         59.94
>>         tbr, 60 tbn, 120 tbc
>>         Output #0, null, to 'pipe:':
>>             Stream #0.0, 1/90000: Video: rawvideo, yuv420p, 1280x720,
>>         1001/60000, q=2-31, 200 kb/s, 90k tbn, 59.94 tbc
>>         Stream mapping:
>>           Stream #0.0 -> #0.0
>>           existing PPS referenced
>>
>>         [h264 @ 0x806ed70]non-existing PPS referenced
>>         [h264 @ 0x806ed70]decode_slice_header error
>>         [h264 @ 0x806ed70]no frame!
>>         Error while decoding stream #0.0
>>         Error while decoding stream #0.0
>>             Last message repeated 1 times
>>         [h264 @ 0x806ed70]non-existing PPS referenced
>>         [h264 @ 0x806ed70]decode_slice_header error
>>         [h264 @ 0x806ed70]no frame!
>>         Error while decoding stream #0.0
>>         *** 1 dup!
>>         Error while decoding stream #0.0
>>         *** 1 dup!
>>                 .
>>                 .
>>                 .
>>         Error while decoding stream #0.0
>>         *** 1 dup!
>>         frame=  315 fps=122 q=0.0 Lsize=      -0kB time=5.26 bitrate=
>>         -0.0kbits/s dup=315 drop=0
>>         video:0kB audio:0kB global headers:0kB muxing overhead -inf%
>>
>>         I've received 315 frames from the network and pushed those
>>         many frames into
>>         gstreamer pipeline. But don't know why these dummy frames are
>>         written
>>         into the file.
>>
>>         For ex, if I receive 30MB of video data, the resulting file
>>         is also of
>>         same size, but
>>         frames count will be double the original frames.
>>
>>
>>
>>
>>         On 07/14/2010 09:38 PM, Sandeep Prakash wrote:
>>         > Hi,
>>         >
>>         >
>>         > Prabhulinga Swamy B S wrote:
>>         >
>>         >>         appsrc is-live=true
>>         >> "caps=video/x-h264,width=800,height=600,framerate=30/1" ! \
>>         >>           h264parse ! queue ! avimux ! queue ! filesink
>>         >> location=filename.avi
>>         >>
>>         >>
>>         > Are you sure the h264 stream you are getting from the
>>         network has 30 fps?
>>         >
>>         >
>>         > Prabhulinga Swamy B S wrote:
>>         >
>>         >>       But the resulting file is having duplicate frames.
>>         >>       For ex, if i push 200 frames, the resulting file
>>         contain nearly 200
>>         >> frames.
>>         >>
>>         >>
>>         > Plz explain in detail on the above statements. What does
>>         "nearly" mean?
>>         >
>>         > Regards,
>>         > Sandeep
>>         >
>>
>>         --
>>
>




More information about the gstreamer-devel mailing list