Played Slowly

Problem

The audio or the video files are played slowly or even suspended.

Solution

It may become when display or audio play is slower than video/audio decoder. Be always use queue plugin as buffer before alsasink and kmssink.
  • For H.264, try the following:
    • The following code block provides an example of setting the audio format manually.
      gst-launch-1.0 -v filesrc location=640_360_h264_aac.mkv ! matroskademux name=demux demux.audio_0 ! aacparse ! avdec_aac ! audioconvert ! audioresample ! queue ! alsasink device=hw:0,1 demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! videoscale ! video/x-raw,width=800,height=480,format=NV12 ! queue ! kmssink driver-name=starfive force-modesetting=1 plane-id=74 connector-id=118
    • The following code block provides an example of using the decodebin plug-in to identify audio format automatically.
      gst-launch-1.0 -v filesrc location=640_360_h264_aac.mkv ! matroskademux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! queue ! alsasink device=hw:0,1 demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! videoscale ! video/x-raw,width=800,height=480,format=NV12 ! queue ! kmssink driver-name=starfive force-modesetting=1 plane-id=74 connector-id=118
  • For H.265, try the following:
    • The following code block provides an example of setting the audio format manually.
      gst-launch-1.0 -v filesrc location=640_360_h265_aac.mkv ! matroskademux name=demux demux.audio_0 ! aacparse ! avdec_aac ! audioconvert ! audioresample ! queue ! alsasink device=hw:0,1 demux.video_0 ! queue ! h265parse ! omxh265dec ! videoconvert ! videoscale ! video/x-raw,width=800,height=480,format=I420 ! queue ! kmssink driver-name=starfive force-modesetting=1 plane-id=74 connector-id=118
    • The following code block provides an example of using the decodebin plug-in to identify audio format automatically.
      gst-launch-1.0 -v filesrc location=640_360_h265_aac.mkv ! matroskademux name=demux demux.audio_0 ! decodebin ! audioconvert ! audioresample ! queue ! alsasink device=hw:0,1 demux.video_0 ! queue ! h265parse ! omxh265dec ! videoconvert ! videoscale ! video/x-raw,width=800,height=480,format=NV12 ! queue ! kmssink driver-name=starfive force-modesetting=1 plane-id=74 connector-id=118