Comments (10)
if you are using /dev/video0 maybe it is better to use V4L2 module.
how does your $HOME/.baresip/config look like ?
from baresip.
it's not the big deal for config
the benfit is baresip support gstreamer I want try logitech c920 (which is H.264 encode camera support gstreamer) for the video stream without need decode to raw and compress in H.264 which directly go through RTP if possible
# Video
video_source v4l2,/dev/video0
#video_source gst_video,vidcodec
#video_display x11,nil
#video_source avformat,/tmp/foo.mp4
video_size 640x480
video_bitrate 500000
video_fps 25
# AVT - Audio/Video Transport
rtp_tos 184
#rtp_ports 10000-20000
#rtp_bandwidth 512-1024 # [kbit/s]
rtcp_enable yes
rtcp_mux no
jitter_buffer_delay 5-10 # frames
rtp_stats no
# Network
#dns_server 10.0.0.1:53
#net_interface eth0
# BFCP
#bfcp_proto udp
#------------------------------------------------------------------------------
# Modules
module_path /usr/local/lib/baresip/modules
# UI Modules
module stdio.so
#module cons.so
#module evdev.so
#module httpd.so
# Audio codec Modules (in order)
#module opus.so
#module silk.so
#module amr.so
#module g7221.so
#module g722.so
#module g726.so
module g711.so
#module gsm.so
#module l16.so
#module speex.so
#module bv32.so
# Audio filter Modules (in encoding order)
module vumeter.so
#module sndfile.so
#module speex_aec.so
#module speex_pp.so
#module webrtc_aec.so
#module plc.so
# Audio driver Modules
module alsa.so
#module portaudio.so
# Video codec Modules (in order)
module avcodec.so
module avformat.so
module fakevideo.so
#module vpx.so
# Video filter Modules (in encoding order)
#module selfview.so
from baresip.
I also have a C920 camera here, would like to try to implement a V4L2
driver for and extract H.264 packets ..
from baresip.
try this gst-launch-1.0 -v -e uvch264src device=/dev/video1 name=src auto-start=true src.vfsrc ! queue ! video/x-raw,format=(string)YUY2,width=320,height=240,framerate=10/1 ! xvimagesink sync=false src.vidsrc ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! avdec_h264 ! xvimagesink sync=false
from baresip.
FWIW it would be nice to use both streams from the device: h264 stream for sending video data and uncompressed stream for selfview. It's a pity I don't have any hardware with similar capabilities.
from baresip.
I have created a new module called "v4l2_codec"
this module uses the V4L2-api on Linux to read H.264-encoded frames from /dev/video0
and packetize them via H.264. It has been tested on Debian Linux and with
the Logitech C920 camera.
Please check the README for how to use it.
from baresip.
wow awesome!!!!
from baresip.
Thanks for v4l2_codec, I've tried it and it works.
One thing to be careful about is order of "module" lines.
For example, I use module avcodec for decoding, but avcodec can both encode and decode.
So if you put "module avcodec.so" before "module v4l2_codec" in your config, then you won't get the hardware encoding, you will get the avcodec software decoding.
Latency over wifi is not great, 5-6 seconds? but not sure whether to blame encoding.
from baresip.
BTW I would also like to use v4l2_codec with the camera module of a raspberry pi. It has hardware encoding AND decoding of h264. However v4l2_codec is not presently working for the camera module, even though the v4l2 driver for the camera module supports the hardware encoding.
(Also, my testing with the C920 was on the raspberry pi.)
from baresip.
thanks for the feedback, closing this issue for now.
If you want to contribute, you are welcome to write a small HOWTO on the Baresip WIKI-page
(or another place).
from baresip.
Related Issues (20)
- webrtc demo cant display video on chrome 122.0.6261.58 version HOT 5
- Writing custom modules to interface with baresip?
- Can not receive method NOTIFY when connecting to wss server HOT 2
- Multiple outgoing calls, only sending audio when one is accepted HOT 8
- May I ask how to set the sampling rate of saved audio files to 16000, with a default of 8000
- answered call has video even when not asked for HOT 18
- Thread Sanitizer warning for `test_call_tcp` for the stream->tx object HOT 2
- inreq_allowed is missing from Wiki and if not allowed produced incorrect negative response HOT 10
- Baresip gets stuck related to "audio: rtp timestamp wraps backwards" since 3.9.0 HOT 6
- Add ;inreq_allowed to addr-params
- Restore backwards compatibility by accepting MESSAGE requests by default
- netroam module HOT 2
- How do I get my client to support TLS 1.0? HOT 1
- ci: broken sanitizers
- support webrtc data-channel
- test: test_message failed but is marked as success HOT 2
- 3.11.0 build failure on enum tls_resume_mode and -Wpedantic on OpenBSD HOT 1
- connect a linphone account with baresip HOT 2
- SHA-256 support in baresip HOT 3
- srtp: heap-use-after-free rekeying test bug HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baresip.