Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codec/capture issues when working with video files for RMS.StartCapture #421

Open
MaadhyamRana opened this issue Sep 12, 2024 · 0 comments

Comments

@MaadhyamRana
Copy link
Contributor

MaadhyamRana commented Sep 12, 2024

This issue occurs on the prerelease branch, with RMS.StartCapture.
When using the -i (input) flag with a video file:

python -m RMS.StartCapture -i ~/Downloads/CAEUA3_20240713_052714_473898.mkv

Issues occur when working with either media backend (cv2 or gst - options found in the .config file)


For gstreamer, the following is output in the shell:

0:00:00.017080707 15242 0x555e087c5240 ERROR           GST_PIPELINE gst/parse/grammar.y:570:gst_parse_element_make: no element "avdec_h264"
0:00:00.017106770 15242 0x555e087c5240 ERROR           GST_PIPELINE gst/parse/grammar.y:1264:priv_gst_parse_yyparse: link has no sink [source=@0x555e087c74b0]
0:00:00.017644186 15242 0x555e087c5240 ERROR           GST_PIPELINE gst/parse/grammar.y:1264:priv_gst_parse_yyparse: link has no source [sink=@0x555e087da910]
Process BufferedCapture-3:
Traceback (most recent call last):
  File "/home/mrana/anaconda3/envs/rms/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/mrana/RMS/RMS/BufferedCapture.py", line 915, in run
    while not self.exit.is_set() and not self.initVideoDevice():
                                         ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mrana/RMS/RMS/BufferedCapture.py", line 661, in initVideoDevice
    self.device = GstVideoFile(self.video_file, decoder=self.config.gst_decoder,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mrana/RMS/RMS/Routines/GstreamerCapture.py", line 213, in __init__
    self.initStream()
  File "/home/mrana/RMS/RMS/Routines/GstreamerCapture.py", line 243, in initStream
    self.device = self.createGSTDevice()
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mrana/RMS/RMS/Routines/GstreamerCapture.py", line 229, in createGSTDevice
    self.pipeline = Gst.parse_launch(pipeline_str)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: gst_parse_error: no element "avdec_h264" (1)

And then if the config is set to use cv2, instead of the above error, BufferedCapture loops on the following:

2024/09/12 12:27:04-INFO-BufferedCapture-line:916 - Waiting for the video device to be connect...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant