logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
utilisateurs:slyfox:scripts:info-video6clone [15/10/2015 09:51]
Slyfox
utilisateurs:slyfox:scripts:info-video6clone [15/10/2015 10:09]
Slyfox [Info-video6clone]
Ligne 1: Ligne 1:
 ====== Info-video6clone ====== ====== Info-video6clone ======
  
-<note important>​En cours de développement</​note>​ 
  
-<note tip>Paquet à installer+===== Paquet à installer ​=====
-YAD: [[https://​packages.debian.org/​sid/​amd64/​yad/​download]] +
-mediainfo: apt-get install mediainfo  +
-mediainfo-gui (optionnel):​ apt-get install meediainfo-gui</​note>​+
  
 +==== mplayer ====
 +<code root>​apt-get install mplayer</​code>​
  
-<​code ​user>#! /bin/bash+==== mencoder ==== 
 +<​code ​root>apt-get install mencoder<​/code>
  
-inFichier=$(yad --file --multiple --width="​700"​ --height="​500" ​--separator="​\n" ​--center --filename="​/home/​$USER/​Bureau/"​)+==== alsa-utils et alsamixer (?) ==== 
 +<code root>apt-get install alsa-utils alsamixer<​/code>
  
-# modification de l'IFS pour qu'il passe en saut de ligne +===== Script 1===== 
-old_IFS=${IFS} IFS=$'​\n'​+<code user>#! /bin/bash
  
-for i in ${inFichier} +mencoder tv:// -tv driver=v4l2:​norm=PAL:​audiorate=44100:​immediatemode=0:​forceaudio:​alsa:​adevice=hw.1,​0:​device=/​dev/​video1:​input=1 ​ -ovc copy -oac copy -o /home/$USER/​Bureau/​video_VHS.avi</​code>​
-do+
  
-infoVideo=$(awk ' 
-BEGIN{FS=":"​} 
-$2==""​ {section=$0} 
  
-section~/​General/​ && /^Complete name {2,}/ {printf "​\nChemin video: %s" ,$2} +===== Script ​2===== 
-section~/General&& /^Format {2,}/ {printf "\n%s %s " ,​section,​$2} +<code user>#​! ​/bin/bash 
-section~/General&& /^File size {2,}{printf "%s " ,$2} +mplayer tv:// -tv driver=v4l2:​norm=PAL:​audiorate=44100:​immediatemode=0:​forceaudio:​alsa:​adevice=hw.1,0:device=/dev/video1:​input=1 -vf pp=lb</code>
-section~/General&& /^Duration {2,}/ {printf "%s " ,$2} +
-section~/​General/​ && /^Overall bit rate {2,}/ {printf "​%s"​ ,$2}+
  
-section~/​Video/​ && /^ID {2,}/ {printf "\n%s ID: %s " ,​section,​$2} 
-section~/​Video/​ && /^Format {2,}/ {printf "%s " ,$2} 
-section~/​Video/​ && /^Format profile ​ {2,}/ {printf "%s " ,$2} 
-section~/​Video/​ && /^Bit rate {2,​}|^Nominal bit rate {2,}/ {printf "%s " ,$2} 
-section~/​Video/​ && /^Frame rate {2,}/ {printf "​%s"​ ,​$2;​ligne=$0;​} 
  
-section~/​Video/​ && /^Frame rate {2,}/ {gsub(/ fps/,"",​$0);​gsub(/​ /,"",​$0);​fps=$2} +===== Script 3===== 
-section~/​Video/​ && /^Bit rate {2,​}|^Nominal bit rate {2,}/ {gsub(/ Kbps/,"",​$0);​gsub(/​ /,"",​$0);​rate=$2} +<code user>#​! ​/bin/bash 
-section~/​Video/​ && /^Width {2,}/ {gsub(/​pixels/,"",​$0);​gsub(/​ /,"",​$0);​width=$2} +nice --10 mencoder tv:// -tv driver=v4l2:norm=PAL:audiorate=44100:immediatemode=0:forceaudio:alsa:​adevice=hw.1,0:device=/dev/video1:​input=1 ​-ovc lavc -lavcopts vcodec=mjpeg:​aspect=4/​3 ​-aspect 4:3 -noautoexpand ​-oac pcm  ​-o /home/$USER/​Bureau/​video_VHS.avi</​code>​
-section~/​Video/​ && /^Height {2,}/ {gsub(/​pixels/,"",​$0);​gsub(/​ /,"",​$0);​height=$2;} +
- +
-section~/Audio&& /^ID {2,}/ {printf "\n%s ID: %s " ,​section,​$2} +
-section~/​Audio/​ && /^Format {2,}/ {printf "%s " ,$2} +
-section~/​Audio/​ && /^Bit rate  {2,​}|^Nominal bit rate {2,}/ {printf "%s " ,$2} +
-section~/​Audio/​ && /​^Language ​ {2,}/ {printf "​%s"​ ,$2} +
- +
-section~/​Text/​ && /^ID {2,}/ {printf "\n%s ID%s" ,​section,​$2} +
-section~/Text&& /^Format {2,}/ {printf "%s " ,$2} +
-section~/​Text/​ && /​^Language ​ {2,}/ {printf "%s " ,$2} +
-section~/​Text/​ && /​^Title ​ {2,}/ {printf "%s " ,$2} +
- +
-END {printf "​\n\nrate%s fps%s width%s height%s\nBit/​image%.2f" ​,rate,​fps,​width,​height,​(rate*1024/fps/(width*height))} +
- +
-' <<<​ "​$(mediainfo "​$i"​)"​) +
- +
-echo "​$infoVideo"​ +
- +
-yad --info --center ​--text "$infoVideo"​ +
- +
-[[ $? -eq 1 ]] && exit +
- +
- +
- +
-# remise en place de l'​IFS +
-IFS=${old_IFS} +
- +
-done +
- +
-echo</​code>​+
  
  

Pied de page des forums

Propulsé par FluxBB