Close
Duke shfaqur rezultatin -9 deri 0 prej 3
  1. #1
    Dr
    Anėtarėsuar
    09-06-2003
    Vendndodhja
    ne perendim
    Postime
    338

    ndihme me scriptin

    Ky mesazh per ekspertet, Ardi ip G psh
    Kam bere nje script qe shkarkon live stream nga topalbaniaradio duke perdorur mplayer.
    Problemi qendron se topi nganjehere nuk eshte ne transmetim.
    A ka nai menyre qe ta kondicionosh mplayer live stream qe skripti te mos ekzekutohet nese nuk ka playback:
    psh
    if [ "mplayerplaybacklivestream" = "0" ]; then
    execute folloing
    else
    echo "TAR nuk po punon"
    fi

  2. #2
    [L]{I}[N]{U}[X] Maska e Ardi_Pg_ID
    Anėtarėsuar
    28-01-2003
    Vendndodhja
    New York City Haven on Earth
    Postime
    2,678
    Pa pare skriptin sdi ca te te them po ska te beje fare me mplayer me teper ka te beje me stdin (standart input) qe mund ta kontrollosh me ifup/ifdown po nese ashtu posto scriptin ta shofim me qarte

    Ardi
    Forgiving Islamic Terrorists is Gods Duty, Our Duty Is To arrange the Meeting
    N. H. Schwarzkopf

  3. #3
    Dr
    Anėtarėsuar
    09-06-2003
    Vendndodhja
    ne perendim
    Postime
    338
    ok ardo ky eshte scripti:

    #!/bin/sh -x
    #---------------------------------------------------------------------
    # A very simple script to capture live stream from Top Albania Radio:
    #---------------------------------------------------------------------
    # Most of the variables:
    DATE1=$(date +%d-%B)
    DATE2=$(date +%Y)
    DATE3=$(date +%R)
    STREAM=http://tar.serverroom.us:9078/
    DURATION=30m
    DEST="38.96.148.64"
    MUSIC_DIR=/home/koli/Music/temporary
    BURN_DIR=/home/koli/Music/cd_radio_files
    MP3_FILES=/home/koli/Music/mp3_radio_files
    # For the id3v2 Tags
    AUTHOR="Top Albania Radio"
    ALBUM="morning_show"
    TITLE="wake_up.$DATE1"
    COMMENT="Wake up show"
    #VAR=`ping -s 1 -c 1 $DEST > /dev/null; echo $?`
    #if [ $VAR -eq 0 ]; then
    cd $MUSIC_DIR
    # Download the stream$S and convert it to wave format
    #it needs to have -really-quiet option for cron to execute:
    /usr/bin/mplayer -vc null -really-quiet -format s16le -vo null -ao pcm:fast:waveheader:file=wup.wav "$STREAM" &
    /bin/sleep $DURATION # Length of the program being recorded as background.
    /bin/kill $! # End the most recently backgrounded job = mplayer en
    # Find the best volume adjustment and apply this to the wav file.
    /usr/bin/sox wup.wav -n stat > stats 2>&1 || exit 1
    VOL=$(grep 'Volume' stats | sed 's/^.*[ \t]//')
    /usr/bin/sox -v $VOL wup.wav wup$DATE1.wav || exit 1
    rm wup.wav
    # Convert to mp3
    /usr/bin/lame -S -h -t -V 6 wup$DATE1.wav wup.$DATE1.mp3
    # remove old tags from the resulting captured .mp3
    /usr/bin/id3v2 -D wup.$DATE1.mp3
    #new tags:
    /usr/bin/id3v2 -a "$AUTHOR" \
    -A "$ALBUM" \
    -t "$TITLE" \
    -y "$DATE2" \
    -c "$COMMENT" \
    wup.$DATE1.mp3
    # Clean up:
    /bin/rm stats
    #mv wav file to wav directory
    /bin/mv -f wup$DATE1.wav $BURN_DIR
    #mv mp3 files to mp3 directory
    /bin/mv -f wup.$DATE1.mp3 $MP3_FILES
    #change direct for cd burner
    cd $BURN_DIR
    #change sample rating to cd sample using ch_wave
    /usr/bin/ch_wave -otype riff -F 44100 -o wup_cd.wav -pc FIRST wup$DATE1.wav wup$DATE1.wav
    /bin/rm wup$DATE1.wav
    #burn to cd using cdrecord yet not workimg from cron, wodim -scanbus or wodim --devices
    #to find what cd record in kernel
    /usr/bin/cdrecord -s -pad speed=1 dev=1,0,0 -dao -audio -swab -force wup_cd.wav
    #clean old files
    /bin/rm wup_cd.wav
    #eject cd.
    #/usr/bin/eject

    Sic e shikon u mundova ta beja me ping por problemi qe ndron se mund te kesh ping te suksesshem po jo playback te live stream.

    Flmnderit
    Koli

Regullat e Postimit

  • Ju nuk mund tė hapni tema tė reja.
  • Ju nuk mund tė postoni nė tema.
  • Ju nuk mund tė bashkėngjitni skedarė.
  • Ju nuk mund tė ndryshoni postimet tuaja.
  •