0

I have a .webm video captured through a web browser. Using ffmpeg, I want to trim it into its first 30s without re-encoding and quality degradation. But I have issues doing it and ffmpeg complains about it.

What is the problem? How can I address it?

ffmpeg -i video.webm -to 30 -c copy out.webm

Error:

[webm @ 0000014ea3249a00] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
6
  • 1
    WebRTC saves even H264 to webm which is not compatible. Save to mkv.
    – Gyan
    Commented Sep 22, 2022 at 4:02
  • Would it work to save to .mp4? Any issues? It works for me though.
    – angel_30
    Commented Sep 22, 2022 at 14:45
  • Depends on the codecs.
    – Gyan
    Commented Sep 22, 2022 at 16:08
  • AVC video and Opus audio.
    – angel_30
    Commented Sep 22, 2022 at 16:37
  • 1
    AVC is fine Opus is not commonly accepted in MP4. Transcode audio to AAC.
    – Gyan
    Commented Sep 23, 2022 at 4:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.