Torna indietro   Hardware Upgrade Forum > Software > Linux, Unix, OS alternativi

Recensione Samsung Galaxy S26+: sfida l'Ultra, ma ha senso di esistere?
Recensione Samsung Galaxy S26+: sfida l'Ultra, ma ha senso di esistere?
Equilibrio e potenza definiscono il Samsung Galaxy S26+, un flagship che sfida la variante Ultra e la fascia alta del mercato con il primo processore mobile a 2nm. Pur mantenendo l'hardware fotografico precedente, lo smartphone brilla per un display QHD+ da 6,7 pollici d'eccellenza, privo però del trattamento antiriflesso dell'Ultra, e per prestazioni molto elevate. Completano il quadro la ricarica wireless a 20W e, soprattutto, un supporto software settennale
Zeekr X e 7X provate: prezzi, autonomia fino a 615 km e ricarica in 13 minuti
Zeekr X e 7X provate: prezzi, autonomia fino a 615 km e ricarica in 13 minuti
Zeekr sbarca ufficialmente in Italia con tre modelli elettrici premium, X, 7X e 001, distribuiti da Jameel Motors su una rete di 52 punti vendita già attivi. La Zeekr X parte da 39.900 euro, la 7X da 54.100: piattaforma a 800V, chip Snapdragon di ultima generazione, ricarica ultraveloce e un'autonomia dichiarata fino a 615 km WLTP. Le prime consegne sono previste a metà aprile
Marathon: arriva il Fortnite hardcore
Marathon: arriva il Fortnite hardcore
Marathon è il titolo multiplayer competitivo del momento. Ecco quali sono le caratteristiche di gioco principali, insieme alle nostre prime considerazioni dopo qualche "run" nell'extraction shooter di Bungie
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 30-01-2009, 14:10   #1
gurutech
Senior Member
 
L'Avatar di gurutech
 
Iscritto dal: Jun 2000
Città: S.Giuliano (MI)
Messaggi: 1047
catturare uno stream audio su hard disk

Ciao,
oggi ho scritto questo, magari serve a qualcuno! si basa su mplayer e lame
e vi permette di salvare una Internet radio su hard disk

Codice:
#!/bin/bash

#    grab-radio - this script will grab an audio stream to your hard disk
#
#    Copyright (C) 2009  Gianluca 'gurutech' Mascolo [email protected]
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.


#Requirements: mplayer, lame, standard GNU/Linux tools (bash, ps, sleep, date, ... and so on)

#when this scripts finish, you will have
#radioXXXX.mp3
#radioYYYY.mp3
#...
#stored in the output directory

MPPID=0
CURDIR="$PWD"
#change to dir where do you want to save streams
cd /home/gmascolo/downloads
RADIOURL="http://67.212.179.138:8300/"
#divide raw streams in 204800Kbytes (200MB) trunks
MAXSTREAMSIZE=204800

spawnmp ()
{
 mplayer -really-quiet -ao pcm:waveheader:file=radio.wav -vo null -vc dummy "$RADIOURL" 2> /dev/null &
 sleep 1
 MPPID=$(jobs -l  | grep radio.wav | awk '{print $2}' | grep -v "^$MPPID$" )
 return $MPPID
}

STIME=$(date +%s)
ETIME=$STIME
ELAPSED=$((ETIME-STIME))


 #Stop after 4000 seconds elapsed
 while ( [ $ELAPSED -lt 4000 ] ); do {
    clear
    MPISDEAD=0
    STREAMSIZE=0
    OLDSIZE=-1
    spawnmp
    while ( [ $MPISDEAD -eq 0 ] && [ $STREAMSIZE -lt $MAXSTREAMSIZE ] ); do {
    clear
    date
    echo $ETIME
    echo "Mplayer running in background with PID=$MPPID"
    sleep 5
    STREAMSIZE=$(du -sk radio.wav | awk '{print $1}')
    [ $OLDSIZE -lt $STREAMSIZE ] || kill $MPPID
    OLDSIZE=$STREAMSIZE
    MPISDEAD=0
    ps --pid $MPPID h &> /dev/null || MPISDEAD=1
    echo $MPISDEAD
 }
 done
 ETIME=$(date +%s)
 [ $MPISDEAD -eq 0 ] && kill $MPPID
 du -sk radio.wav
 rm -f grabbed.wav
 mv radio.wav grabbed.wav
 lame -S grabbed.wav radio$ETIME.mp3 &
 ELAPSED=$((ETIME-STIME))
}
done

rm -f radio.wav
cd "$CURDIR"
__________________
“No te tomes tan en serio la vida, al fin y al cabo no saldrás vivo de ella”
gurutech è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Recensione Samsung Galaxy S26+: sfida l'Ultra, ma ha senso di esistere? Recensione Samsung Galaxy S26+: sfida l'Ultra, m...
Zeekr X e 7X provate: prezzi, autonomia fino a 615 km e ricarica in 13 minuti Zeekr X e 7X provate: prezzi, autonomia fino a 6...
Marathon: arriva il Fortnite hardcore Marathon: arriva il Fortnite hardcore
HP Imagine 2026: abbiamo visto HP IQ all’opera, ecco cosa può (e non può) fare HP Imagine 2026: abbiamo visto HP IQ all’opera, ...
PNY RTX 5080 Slim OC, sembra una Founders Edition ma non lo è PNY RTX 5080 Slim OC, sembra una Founders Editio...
Acer Nitro Blaze 7: la console portatile...
Il caro carburante colpisce Amazon: scat...
I futuri iPhone 18 Pro non saranno dispo...
JBL Tune Buds 2: auricolari Bluetooth co...
Sony cambia: il futuro Xperia 1 potrebbe...
Sempre più utenti di Steam scelgo...
Motorola Edge 70: la serie di mid-range ...
Anche la Switch 2 aumenterà di pr...
Questa sedia ergonomica da ufficio costa...
Il Samsung Galaxy A27 è quasi pronto: il...
Steam Deck 2, i tempi si allungano e, an...
Tesla registra segnali positivi in termi...
Goolge Pixel 9a 128GB a 359€ è un...
C'è un caricatore multiplo da 200...
Sconti, coupon, promo lampo: ecco la top...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 09:00.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v