pd:purrneo
Différences
Ci-dessous, les différences entre deux révisions de la page.
— | pd:purrneo [2024/02/09 17:10] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ==== script purrr des pieds à la tête ==== | ||
+ | cas debian stretch sur noyau 4 | ||
+ | < | ||
+ | cd / | ||
+ | ## install dependances | ||
+ | echo 'flex automake tcl8.5-dev tk8.5-dev tcl-dev tk-dev libtool tkpng tclxapian bison fakeroot libnss3 libgconf2-4 python-tk byacc subversion git python-dev libasound2-dev libjack-jackd2-dev libasound2-plugins qjackctl libfftw3-dev libvorbis-dev libbluetooth-dev ubuntustudio-audio-plugins libmp3lame-dev libspeex-dev libgsl0-dev portaudio19-dev libgl1-mesa-dev | ||
+ | for i in `cat dep` | ||
+ | do | ||
+ | apt install -y $i | ||
+ | done | ||
+ | # si Gem nous interesse | ||
+ | sudo apt-get install bison flex automake libasound2-dev libjack-jackd2-dev | ||
+ | libtool libbluetooth-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev | ||
+ | libmagick++-dev libftgl-dev libgmerlin-dev libgmerlin-avdec-dev | ||
+ | libavifile-0.7-dev libmpeg3-dev libquicktime-dev libv4l-dev libraw1394-dev | ||
+ | libdc1394-22-dev libfftw3-dev libvorbis-dev ladspa-sdk dssi-dev tap-plugins | ||
+ | invada-studio-plugins-ladspa blepvco swh-plugins mcp-plugins cmt blop | ||
+ | liblilv-dev omins rev-plugins dssi-utils vco-plugins wah-plugins | ||
+ | fil-plugins mda-lv2 libmp3lame-dev libspeex-dev libgsl-dev portaudio19-dev | ||
+ | liblua5.3-dev python-dev libsmpeg0 libjpeg-turbo8 flite1-dev libgsm1-dev | ||
+ | libgtk2.0-dev git libstk0-dev libsndobj-dev libfluidsynth-dev | ||
+ | fluid-soundfont-gm byacc | ||
+ | ## install partie gpio | ||
+ | cd /usr/src | ||
+ | ##git clone https:// | ||
+ | wget http:// | ||
+ | mv fetch*wiringnp.tar.gz wiringnp.tar.gz | ||
+ | tar xvf wiringnp.tar.gz | ||
+ | cd WiringNP | ||
+ | ./build clean | ||
+ | ./build static | ||
+ | |||
+ | # purrr | ||
+ | cd /usr/src | ||
+ | git clone https:// | ||
+ | cd purr-data/ | ||
+ | mv wiringPi wiringPi.PI | ||
+ | cp -a / | ||
+ | |||
+ | #ajout -fPIC pour nos ARM | ||
+ | cd / | ||
+ | sed -i ./ | ||
+ | # modif dependance rsp | ||
+ | cd / | ||
+ | sed -i packages/ | ||
+ | cd / | ||
+ | ./ | ||
+ | |||
+ | # pb avec Gem et pkgconfig a resoudre (ln -s / | ||
+ | #dans / | ||
+ | # -mv -f $(DESTDIR)$(libpddir)/ | ||
+ | |||
+ | # quand tout est ok on devrait avoir un pd...deb dans / | ||
+ | |||
+ | cd / | ||
+ | tar cvfz ../ | ||
+ | |||
+ | # pour l' | ||
+ | cd / | ||
+ | tar xvf / | ||
+ | </ | ||
+ | |||
+ | === ouverture du mixer audio et des entrée uart,i2c etc === | ||
+ | Dans le cas noyau 4 mettre dans le fichier / | ||
+ | < | ||
+ | armbianEnv.txt | ||
+ | verbosity=1 | ||
+ | logo=disabled | ||
+ | console=both | ||
+ | disp_mode=1920x1080p60 | ||
+ | overlay_prefix=sun8i-h3 | ||
+ | overlays=usbhost1 usbhost2 analog-codec i2c0 pps-gpio spi-spidev uart1 uart2 | ||
+ | rootdev=UUID=a9473195-8c3d-4340-99fa-36e07f900eda | ||
+ | rootfstype=ext4 | ||
+ | usbstoragequirks=0x2537: | ||
+ | </ | ||
+ | rebooter pour la prise en compte | ||
+ | |||
+ | < | ||
+ | apt install fluxbox xterm tightvncserver xfonts-base x11-xserver-utils | ||
+ | su pi | ||
+ | vncpasswd | ||
+ | vncserver # une fois pour pouvoir fixer le fichier .vnc/ | ||
+ | </ | ||
+ | |||
+ | === Patch et objets Purr === | ||
+ | l' | ||
+ | * http:// | ||
+ | * objet mp3cast de unauthorized | ||
+ | * http:// | ||
+ | |||
+ | Il pourrait y avoir un gestionnaire genre webradio du style https:// | ||
+ | |||
+ | |||
+ | Un qui fonctionne ffmpeg | ||
+ | - : modprobe snd-aloop pcm_substreams=2 | ||
+ | - : .asoundrc < | ||
+ | # .asoundrc | ||
+ | pcm.multi { | ||
+ | type route; | ||
+ | slave.pcm { | ||
+ | type multi; | ||
+ | slaves.a.pcm " | ||
+ | slaves.b.pcm " | ||
+ | slaves.a.channels 2; | ||
+ | slaves.b.channels 2; | ||
+ | bindings.0.slave a; | ||
+ | bindings.0.channel 0; | ||
+ | bindings.1.slave a; | ||
+ | bindings.1.channel 1; | ||
+ | bindings.2.slave b; | ||
+ | bindings.2.channel 0; | ||
+ | bindings.3.slave b; | ||
+ | bindings.3.channel 1; | ||
+ | } | ||
+ | |||
+ | ttable.0.0 1; | ||
+ | ttable.1.1 1; | ||
+ | ttable.0.2 1; | ||
+ | ttable.1.3 1; | ||
+ | } | ||
+ | |||
+ | pcm.!default { | ||
+ | type plug | ||
+ | slave.pcm " | ||
+ | } | ||
+ | |||
+ | ctl.!default { | ||
+ | type hw | ||
+ | card 0 | ||
+ | } | ||
+ | |||
+ | pcm.output { | ||
+ | type hw | ||
+ | card 0 | ||
+ | rate 44100 | ||
+ | periods 128 | ||
+ | period_time 0 | ||
+ | period_size 1024 # must be power of 2 | ||
+ | buffer_size 8192 | ||
+ | } | ||
+ | pcm.loopin { | ||
+ | type plug | ||
+ | rate 44100 | ||
+ | periods 128 | ||
+ | period_time 0 | ||
+ | period_size 1024 # must be power of 2 | ||
+ | buffer_size 8192 | ||
+ | |||
+ | slave.pcm " | ||
+ | } | ||
+ | pcm.loopout { | ||
+ | type plug | ||
+ | rate 44100 | ||
+ | periods 128 | ||
+ | period_time 0 | ||
+ | period_size 1024 # must be power of 2 | ||
+ | buffer_size 8192 | ||
+ | slave.pcm " | ||
+ | } | ||
+ | </ | ||
+ | {{ : | ||
+ | |||
+ | apt install ffmpeg | ||
+ | |||
+ | avec serveur , ici local | ||
+ | - ffserver -f ffserver.conf # avec server.conf | ||
+ | - ffmpeg -f alsa -ac 2 -i hw: | ||
+ | - mplayer http:// | ||
+ | |||
+ | server.conf: | ||
+ | < | ||
+ | # Port on which the server is listening. You must select a different | ||
+ | # port from your standard HTTP web server if it is running on the same | ||
+ | # computer. | ||
+ | HTTPPort 8090 | ||
+ | |||
+ | # Address on which the server is bound. Only useful if you have | ||
+ | # several network interfaces. | ||
+ | HTTPBindAddress 0.0.0.0 | ||
+ | |||
+ | # Number of simultaneous HTTP connections that can be handled. It has | ||
+ | # to be defined *before* the MaxClients parameter, since it defines the | ||
+ | # MaxClients maximum limit. | ||
+ | MaxHTTPConnections 200 | ||
+ | |||
+ | # Number of simultaneous requests that can be handled. Since FFServer | ||
+ | # is very fast, it is more likely that you will want to leave this high | ||
+ | # and use MaxBandwidth, | ||
+ | MaxClients 100 | ||
+ | |||
+ | # This the maximum amount of kbit/sec that you are prepared to | ||
+ | # consume when streaming to clients. | ||
+ | MaxBandwidth 1000 | ||
+ | |||
+ | # Access log file (uses standard Apache log file format) | ||
+ | # ' | ||
+ | CustomLog - | ||
+ | |||
+ | # Suppress that if you want to launch ffserver as a daemon. | ||
+ | #NoDaemon | ||
+ | ################################################################## | ||
+ | # Definition of the live feeds. Each live feed contains one video | ||
+ | # and/or audio sequence coming from an ffmpeg encoder or another | ||
+ | # ffserver. This sequence may be encoded simultaneously with several | ||
+ | # codecs at several resolutions. | ||
+ | |||
+ | <Feed feed1.ffm> | ||
+ | # You must use ' | ||
+ | # example, you can type: | ||
+ | # | ||
+ | # ffmpeg http:// | ||
+ | |||
+ | # ffserver can also do time shifting. It means that it can stream any | ||
+ | # previously recorded live stream. The request should contain: | ||
+ | # " | ||
+ | # a path where the feed is stored on disk. You also specify the | ||
+ | # maximum size of the feed, where zero means unlimited. Default: | ||
+ | # File=/ | ||
+ | File / | ||
+ | FileMaxSize 200K | ||
+ | |||
+ | # You could specify | ||
+ | # ReadOnlyFile / | ||
+ | # This marks the file as readonly and it will not be deleted or updated. | ||
+ | |||
+ | # Specify launch in order to start ffmpeg automatically. | ||
+ | # First ffmpeg must be defined with an appropriate path if needed, | ||
+ | # after that options can follow, but avoid adding the http:// field | ||
+ | #Launch ffmpeg | ||
+ | |||
+ | # Only allow connections from localhost to the feed. | ||
+ | #ACL allow 127.0.0.1 | ||
+ | |||
+ | </ | ||
+ | ################################################################## | ||
+ | # Now you can define each stream which will be generated from the | ||
+ | # original audio and video stream. Each format has a filename (here | ||
+ | # ' | ||
+ | # request containing this filename. | ||
+ | # MP3 audio | ||
+ | <Stream stream.mp3> | ||
+ | Feed feed1.ffm | ||
+ | Format mp2 | ||
+ | AudioCodec libmp3lame | ||
+ | AudioBitRate 128 | ||
+ | AudioChannels 2 | ||
+ | AudioSampleRate 44100 | ||
+ | NoVideo | ||
+ | </ | ||
+ | # Ogg Vorbis audio | ||
+ | #<Stream test.ogg> | ||
+ | #Feed feed1.ffm | ||
+ | #Format ogg | ||
+ | #AudioCodec libvorbis | ||
+ | #Title " | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | #NoVideo | ||
+ | #</ | ||
+ | |||
+ | ################################################################## | ||
+ | # Special streams | ||
+ | |||
+ | # Server status | ||
+ | |||
+ | <Stream stat.html> | ||
+ | Format status | ||
+ | |||
+ | # Only allow local people to get the status | ||
+ | ACL allow localhost | ||
+ | ACL allow 192.168.2.0 192.168.2.255 | ||
+ | |||
+ | #FaviconURL http:// | ||
+ | </ | ||
+ | # Redirect index.html to the appropriate site | ||
+ | < | ||
+ | URL http:// | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | directe sans serveur (mais sans trop de gain en ressource): | ||
+ | |||
+ | - fmpeg -f alsa -ac 2 -i hw: | ||
+ | - sur le client | ||
+ | - avec mplayer stream.sdp | ||
+ | - faire un fchier texte stream.sdp < | ||
+ | o=- 0 0 IN IP4 clientip | ||
+ | c=IN IP4 clientip | ||
+ | m=audio 6000 RTP/AVP 14 | ||
+ | </ | ||
+ | |||
+ | acces par fluxbox, pensez vncpasswd et vncserver | ||
+ | < | ||
+ | apt install fluxbox xterm tightvncserver xfonts-base x11-xserver-utils | ||
+ | </ |