Play an alarm #67

Open
opened 2025-02-20 16:12:27 +01:00 by Benjamin_Loison · 10 comments

Possibly locally but produced by a remote server connected to by ssh -X.

Possibly locally but produced by a remote server connected to by `ssh -X`.
Author
Owner
[Benjamin-Loison/android_packages_apps_DeskClock/issues/8](https://github.com/Benjamin-Loison/android_packages_apps_DeskClock/issues/8) would help.
Author
Owner
ffplay -nodisp alarm.opus 
Output:
ffplay version 5.1.6-0+deb12u1 Copyright (c) 2003-2024 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, ogg, from 'alarm.opus':  0KB vq=    0KB sq=    0B f=0/0   
  Duration: 00:00:25.91, start: 0.007500, bitrate: 91 kb/s
  Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp
    Metadata:
      encoder         : Lavf59.27.100

Source: the Super User comment 1728787

In case I moved away a bit of my speaker, looping would be nice, even if I am still awake to know that there is something I should pay attention for and that's why I set up an alarm for.

```bash ffplay -nodisp alarm.opus ``` <details> <summary>Output:</summary> ``` ffplay version 5.1.6-0+deb12u1 Copyright (c) 2003-2024 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 Input #0, ogg, from 'alarm.opus': 0KB vq= 0KB sq= 0B f=0/0 Duration: 00:00:25.91, start: 0.007500, bitrate: 91 kb/s Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp Metadata: encoder : Lavf59.27.100 ``` </details> Source: [the Super User comment 1728787](https://superuser.com/questions/921853/playing-opus-files-under-ubuntu#comment1728787_922985) In case I moved away a bit of my speaker, looping would be nice, even if I am still awake to know that there is something I should pay attention for and that's why I set up an alarm for.
Author
Owner

DuckDuckGo search ffplay loop.

DuckDuckGo search *ffplay loop*.
Author
Owner

Could just while [ true ] but then need the command to stop at audio end, which does not seem to be the case for ffplay.

Could just `while [ true ]` but then need the command to stop at audio end, which does not seem to be the case for `ffplay`.
Author
Owner

Adding -loop 0 works fine, source: the Unix Stack Exchange question 773117.

Adding `-loop 0` works fine, source: [the Unix Stack Exchange question 773117](https://unix.stackexchange.com/q/773117).
Author
Owner

No matter -nodisp or not and -X the audio is not transmitted with ssh.

No matter `-nodisp` or not and `-X` the audio is not transmitted with `ssh`.
Author
Owner

RDP is an alternative.

RDP is an alternative.
Author
Owner
[Benjamin_Loison/openssh/issues/64](https://salsa.debian.org/Benjamin_Loison/openssh/-/issues/64) would help.
Author
Owner

Can run another terminal with a fallback alarm if the SSH connection is stuck or the program takes more time than expected. However, using a single terminal would be nice and if the command end alarm is played, it would be nice to automatically disable the fallback one.

Can run another terminal with a fallback alarm if the SSH connection is stuck or the program takes more time than expected. However, using a single terminal would be nice and if the command end alarm is played, it would be nice to automatically disable the fallback one.
Author
Owner

Should pay attention to turn back on audio if it was off, preferably should increase the alarm audio along time. If no audio is playing during all alarm audio, then could modify the global sound directly maybe.

Should pay attention to turn back on audio if it was off, preferably should increase the alarm audio along time. If no audio is playing during all alarm audio, then could modify the global sound directly maybe.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/linux#67
No description provided.