Changeset 3096


Ignore:
Timestamp:
Feb 1, 2013, 4:18:23 PM (7 years ago)
Author:
roux
Message:

commit new encoder oublié ; fix record live thx to kerneis

Location:
cpc/trunk/live
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/live/FV/parse_FV.pl

    r2642 r3096  
    8080    }
    8181    $times .= ' - '.sprintf('%02d', $hour).'H'.sprintf('%02d', $min);
    82   } elsif ($line =~ /^(janvier|fevrier|février|fÉvrier|mars|avril|mai|juin|juillet|aout|août|aoÛt|sept|octo|nov|dec|déc|dÉc)(em)?(bre)?(\s+\d{2,4})?$/i) {
     82  } elsif ($line =~ /^(janvier|fevrier|f.+vrier|mars|avril|mai|juin|juillet|aout|août|aoÛt|sept|octo|nov|dec|déc|dÉc)(em)?(bre)?(\s+\d{2,4})?$/i) {
    8383    update_mois();
    8484  } elsif ($line =~ /^(lun|mar|mercre|jeu|vendre|same)di\s(\d+)/i) {
  • cpc/trunk/live/an_live_record.sh

    r2354 r3096  
    1 #!/bin/bash
     1#!/bin/bash -e
    22
    33cd /home/roux/dev/cpc/live
     
    99#rm seance.asp
    1010
     11mkdir -p Seance
    1112wget http://www.assemblee-nationale.tv/ahp/xml/config.xml -O url.tmp
    12 source=rtmp://`grep ".live." url.tmp | tail -n 1 | sed 's/^.*name="//' | sed 's/" path=.*$//'`/live
     13source=http://`grep ".live." url.tmp | tail -n 1 | sed 's/^.*name="//' | sed 's/" protocol=.*$//'`/live
    1314wget http://www.assemblee-nationale.tv/js/direct.js -O url.tmp
    14 id=`grep IDA url.tmp | tail -n 1 | sed 's/^[^I]*IDA_/IDA_/' | sed 's/", "IDA_.*$//'`
     15id=`grep streamNamesHttp url.tmp | head -n 1 | sed 's/.*Array( "//' | sed 's/", .*$//'`
    1516rm url.tmp
    1617
  • cpc/trunk/live/an_live_record_day.sh

    r2474 r3096  
    1 #!/bin/bash
     1#!/bin/bash -e
    22
    33cd /home/roux/live-AN
     
    55date_today=`date +%y%m%d`
    66
     7mkdir -p Seance
     8
    79if ( grep $date_today calendrier > /dev/null ); then
    8   debut=`grep $date_today calendrier | tail -n 1 | sed 's/^[0-9]\+ -[ 0\-]\+//' | sed 's/H.*$//'`
     10  debut=`grep $date_today calendrier | head -n 1 | sed 's/^[0-9]\+ -[ 0\-]\+//' | sed 's/H.*$//'`
    911  while [[ $(date +%k) -lt $(($debut - 1)) ]]; do
    1012    sleep 1800
     
    1214  while [[ $(date +%k) -gt 8 || $(date +%k) -lt 7 ]]; do
    1315    wget http://www.assemblee-nationale.tv/ahp/xml/config.xml -O url.tmp
    14     source=rtmp://`grep ".live." url.tmp | tail -n 1 | sed 's/^.*name="//' | sed 's/" path=.*$//'`/live
     16#    source=rtmp://`grep ".live." url.tmp | tail -n 1 | sed 's/^.*name="//' | sed 's/" path=.*$//'`/live
     17    source=http://`grep ".live." url.tmp | tail -n 1 | sed 's/^.*name="//' | sed 's/" protocol=.*$//'`
    1518    wget http://www.assemblee-nationale.tv/js/direct.js -O url.tmp
    16     id=`grep IDA url.tmp | tail -n 1 | sed 's/^[^I]*IDA_/IDA_/' | sed 's/", "IDA_.*$//'`
     19#    id=`grep IDA url.tmp | tail -n 1 | sed 's/^[^I]*IDA_/IDA_/' | sed 's/", "IDA_.*$//'`
     20    id=`grep streamNamesHttp url.tmp | head -n 1 | sed 's/.*Array( "//' | sed 's/", .*$//'`
    1721    rm url.tmp
    1822    date_today=`date +%y%m%d`
     
    2024    file="Seance/AN-${date_today}-${time}.flv"
    2125    echo "flvstreamer -vr ${source}/${id} -o $file"
    22     flvstreamer -vr ${source}/${id} --timeout 25 -o $file
    23     if [[ "`ls -l $file | awk '{print $5}'`" -eq "13" ]]; then
     26#    flvstreamer -vr ${source}/${id} --timeout 25 -o $file
     27    mplayer -dumpstream ${source}/${id} -dumpfile $file
     28    testres=`ls -l $file | awk '{print $5}'`
     29    if [[ "$testres" -eq "13" ]] || [[ "$testres" -eq "0" ]] ; then
    2430      rm -f $file
    2531    else
    26       bash reencode_n_archive.sh Seance/AN-${date_today}-${time}.flv &
     32       nice -n 15 bash vidConvert.sh $file >> /tmp/logencode-AN &
     33#       nice -n 15 bash reencode_n_archive.sh $file >> /tmp/logencode-AN &
    2734    fi
    2835  done
  • cpc/trunk/live/reencode_n_archive.sh

    r2474 r3096  
    55
    66if [ ! -f "$file" ]; then
    7   echo "" >> /tmp/logencode-AN
    8   date >> /tmp/logencode-AN
    9   echo "ERROR: Cannot encode missing file $file" >> /tmp/logencode-AN
    10   echo "" >> /tmp/logencode-AN
     7  echo ""
     8  date
     9  echo "ERROR: Cannot encode missing file $file"
     10  echo ""
    1111  exit
    1212fi
     
    1616done
    1717
    18 echo "" >> /tmp/logencode-AN
    19 date >> /tmp/logencode-AN
    20 echo "mencoder $file -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:v4mv:mbd=2:trell -forceidx -noskip -oac mp3lame -lameopts cbr:br=64 -msglevel all=4 -o $output" >> /tmp/logencode-AN
     18echo ""
     19date
     20echo "mencoder $file -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:v4mv:mbd=2:trell -forceidx -noskip -oac mp3lame -lameopts cbr:br=64 -msglevel all=4 -o $output"
    2121
    22 mencoder $file -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:v4mv:mbd=2:trell -forceidx -noskip -oac mp3lame -lameopts cbr:br=64 -msglevel all=4 -o $output >> /tmp/logencode-AN 2>&1
     22mencoder $file -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:v4mv:mbd=2:trell -forceidx -noskip -oac mp3lame -lameopts cbr:br=64 -msglevel all=4 -o $output 2>&1
    2323
    2424mv $output Seance/encoded/
Note: See TracChangeset for help on using the changeset viewer.