opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.95k stars 55.62k forks source link

Videocapture samples cleanup cpp #25349

Open gursimarsingh opened 1 month ago

gursimarsingh commented 1 month ago

Cleanup: #25006 Following videocapture cpp samples have been combined to videocapture_with_audio.cpp:

videocapture_basic.cpp videocapture_audio.cpp videocapture_microphone.cpp videocapture_starter.cpp videocapture_image_sequence.cpp videocapture_camera.cpp

videocapture_basic.cpp has been moved snippets folder and references in documentation have been updated accordingly

videowriter_basic.cpp has been renamed to videowriter.cpp, with new options to specify codec, fps and resolution for the user

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

asmorkalov commented 1 month ago

Still get "core dumped" after:

./bin/example_cpp_videocapture_with_audio --wt
Extracting audio samples from default device...
[ WARN:0@0.089] global cap_gstreamer.cpp:2840 handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0@0.091] global cap_gstreamer.cpp:1698 open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@0.091] global cap_gstreamer.cpp:1173 isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Audio Data Depth: <invalid depth>
Audio Samples Per Second: -1
Total Audio Channels: -1
Total Audio Streams: -1
terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_default_append
asmorkalov commented 1 month ago

@mshabunin could you take a look on audio part?

asmorkalov commented 3 weeks ago

@mshabunin Please take a look again.