slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Recorded video file has no duration

Open Xennis opened this issue 1 year ago • 1 comments

Describe the bug

Recording videos have no duration. The video file of a recording can be played but has no duration. This causes trouble with video applications.

My guess is it's due to https://github.com/muaz-khan/RecordRTC/issues/147 . The authors added a way to fix it: https://github.com/muaz-khan/RecordRTC/issues/147#issuecomment-459954869

Minimal reproduction

Steps to reproduce the behavior:

  1. Run slidev --open
  2. Open the slides
  3. Start a recording.
  4. Stop the recording and save the file.
  5. Check if the file has a duration, e.g.
    • open it with VLC player and see the bar shows no proper duration
    • or use in the shell ffprobe -i <my-file-here> -show_entries format=duration -v quiet -of csv="p=0". It will print N/A instead of a duration

Environment

  • Slidev version: 0.49.29
  • Browser: Chrome (128.0.6613.113) and Firefox (125.0.2)
  • OS: Ubuntu

Xennis avatar Aug 31 '24 21:08 Xennis

A manual workaround:

ffmpeg -i my-recording.mp4 -c my-recording-copy.mp4

Xennis avatar Sep 01 '24 16:09 Xennis