viseron: modularized :: line 352, in get_codec :: KeyError: 'hevc'
Added another camera. The stream from the camera has the video Codec MPEG-H Part2/HVEC (H.265) with the audio Codec PCM ALAW
For the recorder I used codec: h265
I’m getting this error:
ERROR:root:Uncaught thread exception
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/src/viseron/components/ffmpeg/camera.py", line 232, in read_frames
self.stream.start_pipe()
File "/src/viseron/components/ffmpeg/stream.py", line 474, in start_pipe
self._logger.debug(f"FFmpeg decoder command: {' '.join(self.build_command())}")
File "/src/viseron/components/ffmpeg/stream.py", line 433, in build_command
stream_input_command = self.stream_command(
File "/src/viseron/components/ffmpeg/stream.py", line 370, in stream_command
+ self.get_codec(stream_config, stream_codec)
File "/src/viseron/components/ffmpeg/stream.py", line 352, in get_codec
return ["-c:v", codec_map[stream_codec]]
KeyError: 'hevc'
I removed codec: h265 and still get the error.
Suggestions?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
It’s a bug in the new implementation, will fix soon.
But you should be able to work around it by putting
codec: hevc_cuvidfor the camera config (not the recorder)