Duplicates frames in h264 stream

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicates frames in h264 stream

Prabhulinga Swamy B S
Hi all,
     I'm using the fallowing pipeline to receive the h264 stream from
the network and writing into a avi file using avimux.

       appsrc is-live=true
"caps=video/x-h264,width=800,height=600,framerate=30/1" ! \
         h264parse ! queue ! avimux ! queue ! filesink location=filename.avi

     Once complete h264 frame is received, I'm using  
'gst_app_src_push_buffer' to push frames
      into pipeline. I'm counting the frames pushed into pileline.

     But the resulting file is having duplicate frames.
     For ex, if i push 200 frames, the resulting file contain nearly 200
frames. But the file size is
     same as the bytes I received from the network.

     I tried using 'videorate' plugin, but It supports only raw frames.

     Any feedback is helpful.
     Thanks in advance.

Regards,
Prabhu B S



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sandeep Prakash
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
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S
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@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
>    

--

Regards,
Prabhulinga Swamy B S



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sudarshan Bisht
 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@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@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
>

--

Regards,
Prabhulinga Swamy B S



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S

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@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@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
>

--

Regards,
Prabhulinga Swamy B S



--
Regards,

Sudarshan Bisht
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

-- 

Regards,
Prabhulinga Swamy B S


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S
In reply to this post by Prabhulinga Swamy B S

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@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@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
>

--


-- 

Regards,
Prabhulinga Swamy B S


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sudarshan Bisht
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@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@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@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
>

--


-- 

Regards,
Prabhulinga Swamy B S


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S
In reply to this post by Prabhulinga Swamy B S


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@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
>>         >
>>
>>         --
>>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sandeep Prakash
Hi Prabhulinga,

From your ffmpeg command line

 prabhu@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

we can also observe that the framerate is actually 60 (59.94 to be exact) and not 30
as you are saying. So somewhere the framerate is getting modified. This explains the
video duration getting awry.

Can you attach some logs that will show the caps at each element. Try setting the
GST_DEBUG=3 env variable.

Also you can try to disable your frame completion logic and check whats the outcome.

Regards
Sandeep Prakash
http://sandeepprakash.homeip.net
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sudarshan Bisht

But if the frame rate is 60 then the file duration should be half  , right ?

Can you dump the file before giving it to avimux and check the number of frames ?

On Tue, Jul 20, 2010 at 9:41 AM, Sandeep Prakash <[hidden email]> wrote:

Hi Prabhulinga,

>From your ffmpeg command line

 prabhu@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

we can also observe that the framerate is actually 60 (59.94 to be exact)
and not 30
as you are saying. So somewhere the framerate is getting modified. This
explains the
video duration getting awry.

Can you attach some logs that will show the caps at each element. Try
setting the
GST_DEBUG=3 env variable.

Also you can try to disable your frame completion logic and check whats the
outcome.

Regards
Sandeep Prakash
http://sandeepprakash.homeip.net
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Duplicates-frames-in-h264-stream-tp2288920p2294998.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S

Hi,

     I am setting the video caps of appsrc as,

    appsrc is-live=true "caps=video/x-h264,width=1280,height=720,framerate=60/1" \
        h264parse ! queue ! avimux ! queue ! filesink location=filename.avi

        To test the video file, I just set it as 60fps. I'm having a count for
        number of frames received. I'm sure its 30fps. If i set video caps as 30fps
        file take double the time, and if  I set it as 60fps, it plays as normal.
       
        I set the GST_DEBUG=3 as a environment variable. Is it right ? I didn't get
        any debug messages of gstreamer.
        Or, let me know correct way of setting GST_DEBUG variable.


With Regards,
     Prabhu B S


On 07/20/2010 12:44 PM, sudarshan bisht wrote:

>
> But if the frame rate is 60 then the file duration should be half  ,
> right ?
>
> Can you dump the file before giving it to avimux and check the number
> of frames ?
>
> On Tue, Jul 20, 2010 at 9:41 AM, Sandeep Prakash <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     Hi Prabhulinga,
>
>     >From your ffmpeg command line
>
>      prabhu@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
>
>     we can also observe that the framerate is actually 60 (59.94 to be
>     exact)
>     and not 30
>     as you are saying. So somewhere the framerate is getting modified.
>     This
>     explains the
>     video duration getting awry.
>
>     Can you attach some logs that will show the caps at each element. Try
>     setting the
>     GST_DEBUG=3 env variable.
>
>     Also you can try to disable your frame completion logic and check
>     whats the
>     outcome.
>
>     Regards
>     Sandeep Prakash
>
>
> --
> Regards,
>
> Sudarshan Bisht
>
>
>    



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sandeep Prakash
you can set the debugs as follows:

export GST_DEBUG=3

or

gst-launch --gst-debug-level=3 .......<rest of pipeline>


For more info check man page or info page of gst-launch

Regards,
Sandeep
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sudarshan Bisht
In reply to this post by Prabhulinga Swamy B S
use export GST_DEBUG=element_name:5

What is your goal here ? You want an avi file having video width and height 1280x720 or 800x600 ? with frame rate 30 or 60 ?

And can you please tell us what is you sender application ? Is it some gstreamer pipeline ?





On Tue, Jul 20, 2010 at 10:29 AM, Prabhulinga Swamy B S <prabhulingaswamy.bs@globaledgesoft.com> wrote:

Hi,

    I am setting the video caps of appsrc as,

   appsrc is-live=true "caps=video/x-h264,width=1280,height=720,framerate=60/1" \
       h264parse ! queue ! avimux ! queue ! filesink location=filename.avi

       To test the video file, I just set it as 60fps. I'm having a count for
       number of frames received. I'm sure its 30fps. If i set video caps as 30fps
       file take double the time, and if  I set it as 60fps, it plays as normal.

       I set the GST_DEBUG=3 as a environment variable. Is it right ? I didn't get
       any debug messages of gstreamer.
       Or, let me know correct way of setting GST_DEBUG variable.


With Regards,
    Prabhu B S


On 07/20/2010 12:44 PM, sudarshan bisht wrote:
>
> But if the frame rate is 60 then the file duration should be half  ,
> right ?
>
> Can you dump the file before giving it to avimux and check the number
> of frames ?
>
> On Tue, Jul 20, 2010 at 9:41 AM, Sandeep Prakash <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     Hi Prabhulinga,
>
>     >From your ffmpeg command line
>
>      prabhu@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
>
>     we can also observe that the framerate is actually 60 (59.94 to be
>     exact)
>     and not 30
>     as you are saying. So somewhere the framerate is getting modified.
>     This
>     explains the
>     video duration getting awry.
>
>     Can you attach some logs that will show the caps at each element. Try
>     setting the
>     GST_DEBUG=3 env variable.
>
>     Also you can try to disable your frame completion logic and check
>     whats the
>     outcome.
>
>     Regards
>     Sandeep Prakash
>
>
> --
> Regards,
>
> Sudarshan Bisht
>
>
>



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S

Hi,
     My application not aimed at any fixed resolution. The sender
application is getting frames
     from a camera. The aim is to get  at video at 30fps. I just tried
writing 60fps to avi header
     to test video file. Sorry if you misleaded with that.

     I get GST_DEBUG=3 and I got this output as in the attachment.



On 07/20/2010 01:13 PM, sudarshan bisht wrote:

> use export GST_DEBUG=element_name:5
>
> What is your goal here ? You want an avi file having video width and
> height 1280x720 or 800x600 ? with frame rate 30 or 60 ?
>
> And can you please tell us what is you sender application ? Is it some
> gstreamer pipeline ?
>
>
>
>
>
> On Tue, Jul 20, 2010 at 10:29 AM, Prabhulinga Swamy B S
> <prabhulingaswamy.bs <http://prabhulingaswamy.bs>@globaledgesoft.com
> <http://globaledgesoft.com>> wrote:
>
>
>     Hi,
>
>         I am setting the video caps of appsrc as,
>
>        appsrc is-live=true
>     "caps=video/x-h264,width=1280,height=720,framerate=60/1" \
>            h264parse ! queue ! avimux ! queue ! filesink
>     location=filename.avi
>
>            To test the video file, I just set it as 60fps. I'm having
>     a count for
>            number of frames received. I'm sure its 30fps. If i set
>     video caps as 30fps
>            file take double the time, and if  I set it as 60fps, it
>     plays as normal.
>
>            I set the GST_DEBUG=3 as a environment variable. Is it
>     right ? I didn't get
>            any debug messages of gstreamer.
>            Or, let me know correct way of setting GST_DEBUG variable.
>
>
>     With Regards,
>         Prabhu B S
>
>
>     On 07/20/2010 12:44 PM, sudarshan bisht wrote:
>     >
>     > But if the frame rate is 60 then the file duration should be half  ,
>     > right ?
>     >
>     > Can you dump the file before giving it to avimux and check the
>     number
>     > of frames ?
>     >
>     > On Tue, Jul 20, 2010 at 9:41 AM, Sandeep Prakash
>     <[hidden email] <mailto:[hidden email]>
>     > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >
>     >
>     >     Hi Prabhulinga,
>     >
>     > >From your ffmpeg command line
>     >
>     >      prabhu@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
>     >
>     >     we can also observe that the framerate is actually 60 (59.94
>     to be
>     >     exact)
>     >     and not 30
>     >     as you are saying. So somewhere the framerate is getting
>     modified.
>     >     This
>     >     explains the
>     >     video duration getting awry.
>     >
>     >     Can you attach some logs that will show the caps at each
>     element. Try
>     >     setting the
>     >     GST_DEBUG=3 env variable.
>     >
>     >     Also you can try to disable your frame completion logic and
>     check
>     >     whats the
>     >     outcome.
>     >
>     >     Regards
>     >     Sandeep Prakash
>     >
>     >
>     > --
>     > Regards,
>     >
>     > Sudarshan Bisht
>     >
>     >
>     >
>
>
>
>
> --
> Regards,
>
> Sudarshan Bisht
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>    
--

Regards,
Prabhulinga Swamy B S



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

gst_debug3_log.txt (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Sandeep Prakash
Plz provide the logs as follows:

gst-launch --gst-debug=GST_CAPS:5,GST_ELEMENT_*:1 <rest of pipeline>

Also provide the logs where the fps is changing from 30 to 60.

Regards,
Sandeep
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S

Hi Sandeep,
     As my application is using appsrc element which is used to collect
h264 frames, I think I can't
     run it using gst-launch.

     Here attacted a log file with GST_DEBUG=4. I found the debug
messages about how
     bytes are writing into the file. Please find the attachment.


With regards,
Prabhu B S


On 07/20/2010 02:31 PM, Sandeep Prakash wrote:
> Plz provide the logs as follows:
>
> gst-launch --gst-debug=GST_CAPS:5,GST_ELEMENT_*:1<rest of pipeline>
>
> Also provide the logs where the fps is changing from 30 to 60.
>
> Regards,
> Sandeep
>    

--

Regards,
Prabhulinga Swamy B S



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

gstlog.txt (3M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Duplicates frames in h264 stream

Prabhulinga Swamy B S
In reply to this post by Sandeep Prakash
Hi all,
     The problem with duplicate frames is solved.

     It was the mistake on sender side. The h264 streaming application
was sending
     AUD packet which is of 6 bytes with every h264 frame. This AUD
packet is
     parsed by 'h264parse' and a frame if size 6 bytes was written into
the video file.

     After enabling the GST_DEBUG=4, I came to know the bytes written
into the file.
     After  analyzing that output, I discovered this problem.

      I thank you for your support.


On 07/20/2010 02:31 PM, Sandeep Prakash wrote:
> Plz provide the logs as follows:
>
> gst-launch --gst-debug=GST_CAPS:5,GST_ELEMENT_*:1<rest of pipeline>
>
> Also provide the logs where the fps is changing from 30 to 60.
>
> Regards,
> Sandeep
>    

--

Regards,
Prabhulinga Swamy B S



------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel