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

Ubuntu 18.04 and baresip #4

Open
alexlansovich opened this issue Jul 4, 2023 · 8 comments
Open

Ubuntu 18.04 and baresip #4

alexlansovich opened this issue Jul 4, 2023 · 8 comments

Comments

@alexlansovich
Copy link

Hello.

FFmpeg 3.3.4 compiled and working with
sudo ffmpeg -f v4l2 -channel 0 -video_size 640x480 -i /dev/video0 -pix_fmt nv12 -t 15 -r 30 -c:v cedrus264 test4_640x480.mp4
But when compile Baresip - a get error. I think this is because old version of ffmpeg.
Log eror is here https://gist.github.com/alexlansovich/e02b15a377b622a31bf81df4fec5f1cd
Can you make FFmpeg for the 4 or 5 or 6 version?

@avafinger
Copy link
Owner

I don't know much about baresip. Do you get an error with ffmpeg version 4.x standalone or while running baresip?

@alexlansovich
Copy link
Author

I am getting error when compile baresip. Baresip is using ffmpeg libraries.

wget -O re.v3.2.0.tar.gz https://github.com/baresip/re/archive/refs/tags/v3.2.0.zip
unzip re.v3.2.0.tar.gz
cd re-3.2.0
cmake -B build
cmake --build build -j4
sudo cmake --install build
sudo ldconfig

wget -O baresip.v3.2.0.tar.gz https://github.com/baresip/baresip/archive/refs/tags/v3.2.0.zip
unzip baresip.v3.2.0.tar.gz
cd baresip-3.2.0

cmake -B build
cmake --build build -j4 <- at this stage
sudo cmake --install build

@avafinger
Copy link
Owner

I am getting error when compile baresip

With my 3.3.4, ok.

I would like to know if you run THAT v4 (that compiles with baresip) works standalone. Does it?

@alexlansovich
Copy link
Author

Yes. v4 working standalone and with baresip.
But with baresip v4 have segfault after second sip video call.

@avafinger
Copy link
Owner

segfault after second sip video call.

Looks like the problem is in the baresip. Maybe baresip is not closing properly in the first instance.
I would suggest you insert some debugging into v4 (ffmpeg) close, like cedrus264_close and also in the memory release, and compare the standalone with baresip info.

If i have enough time i may try this but i can't promise (i also need to set up a similar environment).

@avafinger
Copy link
Owner

avafinger commented Jul 5, 2023

In v4 should be ve_close() and cedrus264_close as well

@alexlansovich
Copy link
Author

Hello. We have add some code and now baresip dont coredump after 3 call.
But we have another problem - when sip clients connect to PBX - only one can see video.
First client call to second - first get this error.
If Second clal to first - Second getting this eror. Other codec dont get erorr - but no 30 fps(
Can be this problem in cedrus coder?

Erorr:
07:51:55.-632514560|avcodec: decode: avcodec_send_packet error, packet=12732 bytes, ret=-1094995529 (Invalid data found when processing input)
07:51:55.-1093701140|video: H264 decode error (seq=26815, 1220 bytes): Bad message [74]
07:51:56.-632514560|avcodec: decode: avcodec_send_packet error, packet=12573 bytes, ret=-1094995529 (Invalid data found when processing input)
07:51:56.-1093701140|video: H264 decode error (seq=26826, 1061 bytes): Bad message [74]
07:51:56.-632514560|avcodec: decode: avcodec_send_packet error, packet=12315 bytes, ret=-1094995529 (Invalid data found when processing input)
07:51:56.-1093701140|video: H264 decode error (seq=26837, 803 bytes): Bad message [74]

@avafinger
Copy link
Owner

avafinger commented Aug 24, 2023

Can be this problem in cedrus coder?

Sorry, i haven't gone this far with cedrus, so i really don't know. I don't have any experience with baresip to suggest something really useful to try, but perhaps the code is multithreaded (or calling a second instance) and this can break the encoder or decoder?

Try saving the stream to a file at each endpoint so you can analyze the content.

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

2 participants