HD video - fast playback problem

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

HD video - fast playback problem

cumaniok
Hi,

The application that I'm developing should play the video with x1, x2, x4, x8 and x16 playback rate.
I've trouble when playing HD video with x4 and higher playback rate, specially on slower PC's, got updated frame once in a second or more.
The same files are playing well with VLC  on max 4x playback speed.

Is there a way to improve the pipeline performance?

I'm using GStreamer WinBuilds v0.10.6 from Ossbuild,
to play video application use the following pipeline:
filsesrc location="file/location" ! decodebin2 ! ffmpegcolorspace  ! dshowvideosink



Reply | Threaded
Open this post in threaded view
|

Re: HD video - fast playback problem

pritesh kumar-3
hello,
The only way to achieve above 16x fast forward speeds is to keep seeking on key frames . You have to implement it on your own . 

regards
Pritesh

On Wed, May 23, 2012 at 6:49 PM, cumaniok <[hidden email]> wrote:
Hi,

The application that I'm developing should play the video with x1, x2, x4,
x8 and x16 playback rate.
I've trouble when playing HD video with x4 and higher playback rate,
specially on slower PC's, got updated frame once in a second or more.
The same files are playing well with VLC  on max 4x playback speed.

Is there a way to improve the pipeline performance?

I'm using GStreamer WinBuilds v0.10.6 from Ossbuild,
to play video application use the following pipeline:
filsesrc location="file/location" ! decodebin2 ! ffmpegcolorspace  !
dshowvideosink





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/HD-video-fast-playback-problem-tp4651582.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: HD video - fast playback problem

cumaniok
pritesh kumar-3 wrote
hello,
The only way to achieve above 16x fast forward speeds is to keep seeking on
key frames . You have to implement it on your own .

regards
Pritesh
thanks for the reply,

I'm new by in GStreamer, so maybe I misunderstood your suggestion, can you be more explicit.
I've tried to solve this by seeking to the next position, but frame needs time to be updated, so I got the same frame on the screen even if position has been updated.
I have troubles only with  HD video size, with small size videos everything works fine.

regards.
Reply | Threaded
Open this post in threaded view
|

Re: HD video - fast playback problem

Emile Semmes
Before I assume too much, ie demuxers, etc, make sure your seek type
parameter in either your gst_element_seek() or gst_event_seek_new() call
is GST_SEEK_FLAG_SKIP. Also try or'ing that with GST_SEEK_FLAG_KEY_UNIT
to seek by keyframes. I haven't tried the KEY_UNIT with a rate change,
so test that out first. A GST_SEEK_FLAG_FLUSH may help your slower
computers as well. I typically flush the pipeline on seeks by default.

Your call may look like this:

gst_element_seek( (GstElement *) pipeline, 16.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, .... );

HTH,
Emile

On 5/25/2012 7:02 AM, cumaniok wrote:

> pritesh kumar-3 wrote
>> hello,
>> The only way to achieve above 16x fast forward speeds is to keep seeking
>> on
>> key frames . You have to implement it on your own .
>>
>> regards
>> Pritesh
>>
>>
> thanks for the reply,
>
> I'm new by in GStreamer, so maybe I misunderstood your suggestion, can you
> be more explicit.
> I've tried to solve this by seeking to the next position, but frame needs
> time to be updated, so I got the same frame on the screen even if position
> has been updated.
> I have troubles only with  HD video size, with small size videos everything
> works fine.
>
> regards.
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/HD-video-fast-playback-problem-tp4651582p4654398.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


--
--
Emile Semmes
Owner / Software Consultant
e6 Group, LLC
Office: (630) 376-0626
www.e6group.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: HD video - fast playback problem

cumaniok
I've tried this, but it didn't help much, I still got a frame updated in one or two seconds for playback rate x16.
My file has high resolution: 1920x1080, with h264 codec. I'm developing my application in C#, using .NET bindings, may this be the reason for bad performance when playing with high rate?  

Emile Semmes wrote
Before I assume too much, ie demuxers, etc, make sure your seek type
parameter in either your gst_element_seek() or gst_event_seek_new() call
is GST_SEEK_FLAG_SKIP. Also try or'ing that with GST_SEEK_FLAG_KEY_UNIT
to seek by keyframes. I haven't tried the KEY_UNIT with a rate change,
so test that out first. A GST_SEEK_FLAG_FLUSH may help your slower
computers as well. I typically flush the pipeline on seeks by default.

Your call may look like this:

gst_element_seek( (GstElement *) pipeline, 16.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, .... );

HTH,
Emile
Reply | Threaded
Open this post in threaded view
|

Re: HD video - fast playback problem

Stefan Sauer
On 05/28/2012 08:12 AM, cumaniok wrote:
> I've tried this, but it didn't help much, I still got a frame updated in one
> or two seconds for playback rate x16.
> My file has high resolution: 1920x1080, with h264 codec. I'm developing my
> application in C#, using .NET bindings, may this be the reason for bad
> performance when playing with high rate?  
Can you use a profiler to see where the CPU is spend?

Stefan

>
>
> Emile Semmes wrote
>> Before I assume too much, ie demuxers, etc, make sure your seek type
>> parameter in either your gst_element_seek() or gst_event_seek_new() call
>> is GST_SEEK_FLAG_SKIP. Also try or'ing that with GST_SEEK_FLAG_KEY_UNIT
>> to seek by keyframes. I haven't tried the KEY_UNIT with a rate change,
>> so test that out first. A GST_SEEK_FLAG_FLUSH may help your slower
>> computers as well. I typically flush the pipeline on seeks by default.
>>
>> Your call may look like this:
>>
>> gst_element_seek( (GstElement *) pipeline, 16.0, GST_FORMAT_TIME,
>> GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SKIP, .... );
>>
>> HTH,
>> Emile
>>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/HD-video-fast-playback-problem-tp4651582p4655117.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel