x264enc -> appsink motion issues

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

x264enc -> appsink motion issues

yatinla
I have a need to use a 3rd party RTP stack with Gstreamer for sending H.264.  I have a pipeline that has x264enc sourcing to appsink and I am able to send the RTP packets and decode them.  However, the motion in the decoded video is strange. Imagine an object moving smoothly across the screen such as in the videotestsrc bouncing ball test pattern.  Instead of moving smoothly it moves forward and then backwards a bit and repeats that motion.  Sort of like a 3 steps forward and 1 step back.  So it completes all the motion but with this jerky progress.  

What can cause this?  I imagine I must set some caps on appsink or something but I'm a newbie to GStreamer and haven't found an answer yet.

Thanks,

Mike

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

AW: x264enc -> appsink motion issues

Thornton, Keith

Hi,

It sounds to me like a timer problem to me. X286enc will probably not output the frames in presentation timestamp order. If you do any timestamp manipulation, this may result in your backward movements

Grüße

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Mike T.
Gesendet: Dienstag, 28. Februar 2017 03:01
An: [hidden email]
Betreff: x264enc -> appsink motion issues

 

I have a need to use a 3rd party RTP stack with Gstreamer for sending H.264.  I have a pipeline that has x264enc sourcing to appsink and I am able to send the RTP packets and decode them.  However, the motion in the decoded video is strange. Imagine an object moving smoothly across the screen such as in the videotestsrc bouncing ball test pattern.  Instead of moving smoothly it moves forward and then backwards a bit and repeats that motion.  Sort of like a 3 steps forward and 1 step back.  So it completes all the motion but with this jerky progress.  

 

What can cause this?  I imagine I must set some caps on appsink or something but I'm a newbie to GStreamer and haven't found an answer yet.

 

Thanks,

 

Mike


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

Re: AW: x264enc -> appsink motion issues

yatinla
Thornton, Keith wrote
Hi,
It sounds to me like a timer problem to me. X286enc will probably not output the frames in presentation timestamp order. If you do any timestamp manipulation, this may result in your backward movements
Grüße
This is sounding promising.  But I'm not quite sure I understand how to deal with it.  It sounds like x264enc includes a timestamp somehow?  I man how would I know how to set the timestamp for outgoing RTP packets if x264enc is not providing them in order?  
Reply | Threaded
Open this post in threaded view
|

Re: AW: x264enc -> appsink motion issues

yatinla
yatinla wrote
Thornton, Keith wrote
Hi,
It sounds to me like a timer problem to me. X286enc will probably not output the frames in presentation timestamp order. If you do any timestamp manipulation, this may result in your backward movements
Grüße
This is sounding promising.  But I'm not quite sure I understand how to deal with it.  It sounds like x264enc includes a timestamp somehow?  I man how would I know how to set the timestamp for outgoing RTP packets if x264enc is not providing them in order?
Well, this was quite unexpected.  I tried setting "tune" parameter to 0x00000004 "zero-latency" and that solved the weird motion problem.  It did not, however, reduce the latency which I thought when I had once tried it before it did.  But I have some other options being set like "threads" to 1 (thought maybe the weird motion was a threading issue) and "speed-preset" to 3 "veryfast" which I did to try to solve the latency.

I was also surprised to find that setting "speed-preset" to 3 seemed to improve the video quality.  I guess that could only make sense if the default were even faster like "superfast" or "ultrafast".


Reply | Threaded
Open this post in threaded view
|

AW: AW: x264enc -> appsink motion issues

Thornton, Keith
In reply to this post by yatinla
X264enc probably outputs the frames in decode order. If you send them in this order, the decoder should decode them and then write the presentation timestamp.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von yatinla
Gesendet: Dienstag, 28. Februar 2017 23:05
An: [hidden email]
Betreff: Re: AW: x264enc -> appsink motion issues

Thornton, Keith wrote
> Hi,
> It sounds to me like a timer problem to me. X286enc will probably not
> output the frames in presentation timestamp order. If you do any
> timestamp manipulation, this may result in your backward movements
> Grüße

This is sounding promising.  But I'm not quite sure I understand how to deal with it.  It sounds like x264enc includes a timestamp somehow?  I man how would I know how to set the timestamp for outgoing RTP packets if x264enc is not providing them in order?  




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/x264enc-appsink-motion-issues-tp4682040p4682055.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: AW: x264enc -> appsink motion issues

Thornton, Keith
In reply to this post by yatinla
Setting zero-latency probably turns off the use of b-frames which are the out of order frames which when played in the wrong order might appear to be jumping back.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von yatinla
Gesendet: Dienstag, 28. Februar 2017 23:41
An: [hidden email]
Betreff: Re: AW: x264enc -> appsink motion issues

yatinla wrote

>
> Thornton, Keith wrote
>> Hi,
>> It sounds to me like a timer problem to me. X286enc will probably not
>> output the frames in presentation timestamp order. If you do any
>> timestamp manipulation, this may result in your backward movements
>> Grüße
> This is sounding promising.  But I'm not quite sure I understand how
> to deal with it.  It sounds like x264enc includes a timestamp somehow?  
> I man how would I know how to set the timestamp for outgoing RTP
> packets if x264enc is not providing them in order?

Well, this was quite unexpected.  I tried setting "tune" parameter to
0x00000004 "zero-latency" and that solved the weird motion problem.  It did not, however, reduce the latency which I thought when I had once tried it before it did.  But I have some other options being set like "threads" to 1 (thought maybe the weird motion was a threading issue) and "speed-preset" to
3 "veryfast" which I did to try to solve the latency.

I was also surprised to find that setting "speed-preset" to 3 seemed to improve the video quality.  I guess that could only make sense if the default were even faster like "superfast" or "ultrafast".






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/x264enc-appsink-motion-issues-tp4682040p4682056.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel