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 -
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot