0

hello folks i have a mkv that want to convert to mp4, ogg and webm

i tried following pipipeline but got stuck

gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
qtmux name=mp4 ! filesink location=output.mp4 \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! x264enc ! progressreport update-freq=1 ! mp4.  \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg. 

output

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
progressreport2 (00:00:01): 0 seconds
progressreport2 (00:00:02): 0 seconds
progressreport0 (00:00:02): 0 seconds

from what i am seeing there is a problem with the queues, bc its only recognizing 2 and should have 3 of them moreover if i remove one queue, from the pipeline, seems to be working just fine

ie

gst-launch-1.0 filesrc location=output.mkv ! matroskademux name=demux demux.video_0 ! jpegparse ! jpegdec ! tee name=vo \
oggmux name=ogg ! filesink location=output.ogg \
webmmux name=webm ! filesink location=output.webm \
vo. ! queue ! videoconvert ! vp8enc ! progressreport update-freq=1 ! webm. \
vo. ! queue ! videoconvert ! theoraenc ! progressreport update-freq=1 ! ogg. 

output

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
progressreport1 (00:00:01): 0 seconds
progressreport0 (00:00:02): 0 seconds
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
progressreport1 (00:00:02): 0 seconds
progressreport1 (00:00:03): 0 seconds
progressreport1 (00:00:04): 0 seconds
progressreport1 (00:00:05): 0 seconds
progressreport1 (00:00:06): 0 seconds
progressreport0 (00:00:08): 0 seconds
progressreport1 (00:00:09): 0 seconds

please advice

regards

1 Answers1

1

x264enc by default has a latency higher than the default queue sizes causing your pipeline to stall. (It has to consume more data than it currently gets to actually create an output buffer. That way the pipeline will never finish pre-roll).

Two options:

  • increase buffer size of the queue sizes for all queues.
  • use x264enc tune=zerolatency for your encoder.
Florian Zwoch
  • 6,764
  • 2
  • 12
  • 21
  • Hello, thx for your answer, re: option 1 ( increase buffer size) u mean to increase max-size-buffers value of the queue ? regards – Sebastian Marcet Jul 14 '18 at 12:38
  • 1
    Yes. Better all of them. I think it would be enough to increase it for all other paths than the x264enc, but to be sure increase all of them. Also note that queues have 3 different values to limit queues - time, samples and size. And whatever limit is hit first blocks the queue. – Florian Zwoch Jul 14 '18 at 19:05