Skip to main content

StreamingSound

StreamingSound

  • aplay -L
  • hw:X,Y --> X is the card number, while Y is the device number.

  • USB 마이크 자동 선택하기 
    micHw=`pactl list | grep -A 7 'device.bus = "usb"' | grep 'hw'`
    hwString=`echo ${micHw#*:} | cut -c 1`
    echo -e "\n Mic HW = [$hwString]"
    
    
    
    echo -e '\n##### START CCTV #####'
    cd /home/hyunsu/webcam
    nohup python3 /home/hyunsu/webcam/serverUsb.py &
    
    echo -e '\n##### START BROD SOUND #####'
    nohup cvlc -vvv alsa://plughw:$hwString --sout '#transcode{acodec=mp3,ab=64,channels=1}:standard{access=http,dst=0.0.0.0:8080/out.mp3}' 1> /dev/null 2>&1 &
    
    

  • 안방은 plughw:1 꼬꼬락은 plughw:2

    echo '##### START BROD SOUND #####'
    nohup cvlc -vvv alsa://plughw:2 --sout '#transcode{acodec=mp3,ab=64,channels=1}:standard{access=http,dst=0.0.0.0:9999/out.mp3}' 1> /dev/null 2>&1 & 
  •       <audio autoplay controls> 
            <source src="http://localhost:9999/out.mp3" type="audio/mp3"> 
          </audio>