boatbod / op25

Fork of osmocom OP25 by boatbod
323 stars 99 forks source link

Audio dropout #170

Closed gcurtis79 closed 1 year ago

gcurtis79 commented 1 year ago

I've been using your fork for a couple years now, and recently started having issues with "audio closing". I have 2 raspberry pi units streaming to Broadcastify with darkice, and only one of them seems to have this issue.

Sometimes it will work properly for hours, sometimes only minutes, but this is the log from rx.py. if I need to get more info, let me know.

streaming server url="http://audio3.broadcastify.com:80/########.m3u"
using ALSA sound system
audio device: loop1
Listening on 127.0.0.1:23466
python version detected: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Allocating 15 zero-copy buffers
audio closing
boatbod commented 1 year ago

Seeing an "audio closing" message out of the blue means that the sockaudio thread encountered an error and decided to quit.  There's a number of places the error could occur, and unfortunately right now none produce any logging to give us a hint.  As soon as I get an opportunity I'll add some additional debug and we can do more troubleshooting.

On 1/25/23 17:29, gcurtis79 wrote:

I've been using your fork for a couple years now, and recently started having issues with "audio closing". I have 2 raspberry pi units streaming to Broadcastify with darkice, and only one of them seems to have this issue.

Sometimes it will work properly for hours, sometimes only minutes, but this is the log from rx.py. if I need to get more info, let me know.

|streaming server url="https://u27784101.ct.sendgrid.net/ls/click?upn=pSJ4L3HHcp2qXjCK8kR7oRWCz4EaCYwHGSJOWHX7V3Sxb8NyFAo1vnmWesm2-2F3A4fAvLk5ic2VIsQePnyYrtBA-3D-3D688v_U31jt5HgHBh7k3Grc5s4lww71C9Zgn5vz1fW2bICVV3tE1rLcXoOdgo1S4jinQjeToS9-2FWhVBf-2BUoCQjUW1-2FeBAN5wNseOAlEKjyeDq09A4VeKqP3yUgzG4-2BouAYWMoKypMWH2IsgdaGzeHFEnWTovJhnhJeo68QVfeLfmEOLw28DZ9Xe8dB657s9TZoYnJBsDPa5QQBGi8VF2LOGsqgtexXzhRqauRpOUqLi5w6jyGRq-2BzlUUxYdQHFR94k2M547qX-2FP54izuWxdZGGTp8xGQ-3D-3D using ALSA sound system audio device: loop1 Listening on 127.0.0.1:23466 python version detected: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] Allocating 15 zero-copy buffers audio closing |

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAMjRs7qKQ2zyO1iLZtDqlHZQ-3D-3Dk2XV_U31jt5HgHBh7k3Grc5s4lww71C9Zgn5vz1fW2bICVV3tE1rLcXoOdgo1S4jinQjeToS9-2FWhVBf-2BUoCQjUW1-2FeBAN5wNseOAlEKjyeDq09A4VeKqP3yUgzG4-2BouAYWMoKZe3NTk62kPlD9xwuKu2CecpCfrhzdpom4F818QCQuImReS1DkH9r4y8lOo7jX2BbzlLiyfJOXLdfY88b4RPh73eQyFkYkDE54ieSmIuz2zNjGroG3MbkI0ac35O2H5xDOvKKGHUmIsHGYDt3R3IebA-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTEe-2FtY-2Fc5gY8rIJM0W2IdRgjXQmxhgAZsjbRz-2FVO6Q8UCktWfiBhfh82hlVuh5U2ojw-3D-3Dg6Qz_U31jt5HgHBh7k3Grc5s4lww71C9Zgn5vz1fW2bICVV3tE1rLcXoOdgo1S4jinQjeToS9-2FWhVBf-2BUoCQjUW1-2FeBAN5wNseOAlEKjyeDq09A4VeKqP3yUgzG4-2BouAYWMoKqIjlbmY9fMhvHurWAKC5167qAZUvvAO0ebUkW4tLTTpVUQswEsPub3m6ivh00MTUWUaz-2FdPmHXD0edKSXkUZW7fEg-2BmdyEs4VUFcjJJV7ve84fzFuQWEF0hpGFGJ0COCJxdGXsYIAbuE1wBxDiYd6g-3D-3D. You are receiving this because you are subscribed to this thread.Message ID: @.***>

boatbod commented 1 year ago

I just noticed that you are streaming via Darkice, which I really don't recommend especially on an RPi. Suggest you switch over to liquidsoap and see how that goes. There's some basic instructions in the ~/op25/README-rpi3-liquidsoap file

gcurtis79 commented 1 year ago

I've tried liquid soap before, and ran into issues. I tried again just now, and I'm getting an error.

I created sara.liq only changing my icecast parameters for broadcastify settings, and after running sara.liq I get:

[dynamic.loader:3] Could not find dynamic module for fdkaac encoder.

And sara.liq exits.

I can't find a package to satisfy this.

gcurtis79 commented 1 year ago

Looks like I think I got it. While testing, I uninstalled liquidsoap through apt, and installed it with opam. This fixed the fdkaac issue, but it still closed. I commented out the line: out (input) And it started working.

Thank you.

boatbod commented 1 year ago

You probably do have to turn off local default audio output, especially if you're on a RPI and the default is trying to use Pulse Audio which typically isn't running during a headless boot.

On 1/26/23 03:11, gcurtis79 wrote:

Looks like I think I got it. While testing, I uninstalled liquidsoap through apt, and installed it with opam. This fixed the fdkaac issue, but it still closed. I commented out the line: |out (input)| And it started working.

Thank you.

— Reply to this email directly, view it on GitHub https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlQPRmtf9ULvEn-2FPlJ0wsbnfkS6Kl3JONNIYAVkDW-2FxAMdds5PUEBdWdY9S32RH0C4vZcQWrVLMBcLrgm-2FctFzoE-3DJv3u_U31jt5HgHBh7k3Grc5s4l2rwwBf0-2Bce30KPLoNjLu1FEANWXBFR7j5KPlUpCbrUsdUBcpikpzUXuKcmcHhTwANob-2BcSxjntl9AvlzJ7guY1yM5KLmXYGP0vux7YTJakANyVKk60HPwJnsr4-2BWxebYL2038iWwAojxsuWOmZ5uLAs9w-2BGOmPkoqdtQRcIPu7o-2FoT7EzFcoDoruIrUiucmXg86DfzLwLqSXDvzdJvyjkR2RtV6VWDYmzrLSNfU6F-2FQj1j-2B-2FGn3g1Mxf15htxrRzg-3D-3D, or unsubscribe https://u27784101.ct.sendgrid.net/ls/click?upn=aRgFq9XRJ4-2F-2B-2B6dqJgaVlThKVtke1jgecVWr5YV2DBEpfYGgjnAoQWi69Sc301gEgMm1Rixh8I0DqQOQlmiTERTYBCgHuimuovaSP-2BDWSw7N4wCyVp9u7oP82K19lMOMgCzG59lGHGFo9tcD7ZqZEA-3D-3DYD7X_U31jt5HgHBh7k3Grc5s4l2rwwBf0-2Bce30KPLoNjLu1FEANWXBFR7j5KPlUpCbrUsdUBcpikpzUXuKcmcHhTwANob-2BcSxjntl9AvlzJ7guY1yM5KLmXYGP0vux7YTJakAevqJSLq7Ze-2BDnOHjiK1nsS6EWNZKinTZuI6LaIx0WLJB6lpKeOtnoSK78qctpdSN7a1h6E24uimt9y49Jpiy2CQp1Qo0dAR3hjyDz22n8LSuf-2BFj2YC8UTNBjBWq55URdbOhMk-2FR4PBTNhqe-2FTqVKA-3D-3D. You are receiving this because you commented.Message ID: @.***>

gcurtis79 commented 1 year ago

I might test doing just that on my other setup if it starts having issues, but the fix I ended up with was this from another project that has similar errors:

sudo apt install opam screen
opam init
opam depext taglib mad lame ffmpeg vorbis cry samplerate ocurl liquidsoap fdkaac alsa
opam install taglib mad lame ffmpeg vorbis cry samplerate ocurl liquidsoap fdkaac alsa

I'm not sure why it was trying to use aac in the first place, unless the stream from op25 originates as aac. But this and turning off local audio solved my issue.

I appreciate the quick responses. You can consider this issue closed as far as I'm concerned.