Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including
Stack Overflow
, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this community
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Hi I'm trying to transcode a
hevc
stream to
h264
using
ffmpeg
$ ffmpeg -c:v hevc_v4l2m2m -i video.mkv -c:v h264_v4l2m2m -c:a aac out.mp4
I want to
ffmpeg
to explicitly decode the input
hevc
video using
hevc_v4l2m2m
API, and later encode the video to
h264 codec
using
h264_v4l2m2m
API.
However when I do this,
ffmpeg
throws the following error:
[hevc_v4l2m2m @ 0x556a56fcb0] Could not find a valid device
[hevc_v4l2m2m @ 0x556a56fcb0] can't configure decoder
Stream mapping: Stream #0:0 -> #0:0 (hevc (hevc_v4l2m2m) -> h264 (h264_v4l2m2m))
Stream #0:1 -> #0:1 (copy) Error while opening decoder for input stream #0:0 : Invalid argument
Any pointers on what I'm doing wrong?
–
–
–
–
Are you sure that all streams are encoded in h265? Also check that your device supports h265 decoding in both hard and software. You might want to try
ffmpeg -i video.mkv -c:v h264_v4l2m2m -c:a copy out.mp4
to check if h264 hardware encoding is possible. You could could always resort to software de-/encoding with
ffmpeg -i video.mkv -c:v libx264 -c:a copy out.mkv