Help Center> Video On Demand> FAQs> Media Processing> Why Is the Video Duration Different from That Displayed in the Player After Video Transcoding or Segmentation?
Updated on 2022-10-24 GMT+08:00

Why Is the Video Duration Different from That Displayed in the Player After Video Transcoding or Segmentation?

The video duration includes the container duration, audio and video stream duration, and playback duration after decoding. If these values are different, the displayed duration varies with players.

You can run FFmpeg commands to view the duration of each value.

  • To obtain the container duration, run the following command:
    ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -i example.mp4
  • To obtain the audio and video stream duration, run the following command:
    ffprobe.exe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 example.mp4
  • To obtain the playback duration of a decoded file, run the following command:
    ffmpeg -i example.mp4  -f null -

Media Processing FAQs

more