marom
marom

Reputation: 5230

Pipeline does not complete transition from READY to PAUSED

I am working with a pipeline that should play a file and, at the same time, produce a scaled version for other purposes (hence the appsink).

The pipeline is the following:

gst-launch-1.0.exe filesrc location=a.mp4 ! decodebin ! tee name=fork 
   fork. ! queue ! videoconvert ! autovideosink 
   fork. ! queue ! videoconvert ! videoscale ! video/x-raw,format=I420,width=320,height=180 ! x264enc ! appsink

and does not completes the transition from READY to PAUSED. It completes the transition (and then plays correctly by moving to PLAYING) if I do one of the following:

  1. Remove one of the two branches exiting from tee (so x264enc alone works)
  2. Remove the x264enc element from the branch heading to appsink.

Here there is a graph with a pipeline very close to the one above that shows the same problem. The 'guilty' element is the appsink that is still in the READY->PAUSED transition, but I cannot see any reason for that. By the way if I remove the x264enc from the appsink branch it works!

Why? Pipeline

Upvotes: 2

Views: 932

Answers (1)

Florian Zwoch
Florian Zwoch

Reputation: 7393

Try the option tune=zerolatency for the x264enc element. Alternatively increase the queue sizes after the tee. The reason for this is that x264enc in its default configuration has a higher latency than the default queue size. E.g. it consumes more than the other queue path can hold before it produces any data. So the two branches deadlock each other and cannot preroll.

Upvotes: 2

Related Questions