interface graphique pour mplayer et mencoder afin de ne plus avoir à passer par les lignes de commandes
Source / Exemple :
;#Script sous licenceGPL V3 ou superieure
;#Auteur: Chr0nos
;#contact: hisoka2501@free.fr
dialog Wbs.Mtools {
title "Wbs.Mtools"
size -1 -1 350 304
option dbu
tab "MPlayer", 5, 3 1 343 300
box "Cible", 4, 6 16 169 281, tab 5
button "Get list", 3, 135 24 37 12, tab 5
edit "http://mafreebox.fr/freeboxtv/playlist.m3u", 1, 10 25 124 10, tab 5 autohs
list 2, 10 38 162 255, tab 5 size
box "Infos", 7, 177 16 165 41, tab 5
text "Chaine actuele:", 8, 181 30 159 8, tab 5
text "lien rtsp:", 9, 181 41 25 8, tab 5
edit "", 10, 207 39 132 10, tab 5 autohs
box "Actions", 11, 177 112 166 40, group tab 5
text "Destination", 13, 180 124 28 8, tab 5
edit "C:\capture.avi", 14, 209 123 92 10, tab 5 autohs
box "Ligne de commande", 23, 177 57 165 53, group tab 5
button "Parcourir", 25, 303 122 37 12, tab 5
edit "", 24, 180 68 159 10, tab 5 autohs
button "Executer", 12, 301 93 37 12, tab 5
radio "Visioner", 27, 181 80 42 10, group tab 5
radio "Enregistrer", 30, 224 80 41 10, tab 5
radio "Audio et video", 31, 180 136 46 10, group tab 5
radio "Video uniquement", 32, 230 136 55 10, tab 5
radio "Audio uniquement", 33, 287 136 53 10, tab 5
check "Permetre le frameDroping", 77, 267 80 73 10, tab 5
check "Toujours devant", 78, 181 91 50 10, tab 5
tab "Mencoder", 6
box "Destination", 34, 7 44 338 28, tab 6
edit "", 35, 9 28 293 10, tab 6 autohs
button "Parcourir", 36, 304 27 37 12, tab 6
box "Source", 37, 7 18 337 26, tab 6
edit "<fichier>", 38, 9 57 293 10, tab 6 autohs
button "Parcourir", 39, 304 56 37 12, tab 6
box "Configuration du codec video", 42, 7 73 336 51, group tab 6
text "Bitrate en kbps:", 43, 10 86 44 8, tab 6
edit "1000", 44, 56 85 35 10, tab 6 autohs
box "Commande transmise à mencoder", 45, 5 275 338 23, tab 6
edit "", 46, 8 284 293 10, tab 6 autohs
button "Executer", 47, 303 283 37 12, tab 6
box "Configuration du codec audio", 48, 6 126 337 24, tab 6
check "Direct stream copy", 49, 92 85 58 10, tab 6
text "Bitrate en kpbs:", 51, 9 137 42 8, tab 6
edit "128", 52, 53 136 17 10, tab 6 autohs
text "Taille de l'image:", 40, 11 98 43 8, tab 6
edit "720:576", 53, 56 97 34 10, tab 6 autohs
check "Ameliorer la qualitée", 54, 129 137 59 10, tab 6
check "direct stream copy", 50, 72 136 56 10, tab 6
radio "Detecter automatique la taille de l'image", 41, 130 97 107 10, tab 6
radio "Non definie", 63, 240 97 40 10, tab 6
text "Codec à utiliser:", 74, 11 110 42 8, tab 6
list 75, 56 109 34 10, tab 6 size
radio "Spécifier", 76, 92 97 34 10, tab 6
box "Incrustations de sous titres", 26, 6 152 212 83, tab 6
check "Incruster des sous titres", 111, 11 164 70 10, tab 6
edit "Fichier de sous titres", 113, 10 175 161 10, tab 6 autohs autovs
button "Parcourir", 112, 175 173 37 12, tab 6
text "Police des sous titres", 114, 81 187 53 8, tab 6
list 115, 137 187 76 44, tab 6 size
check "Forcer une police", 116, 10 187 63 10, tab 6
check "Forcer la taille de la police", 117, 10 198 74 10, tab 6
edit "3", 118, 88 198 24 10, tab 6 limit 3
box "Autres", 119, 6 236 133 36, tab 6
check "Encodage silencieux", 120, 11 247 61 10, tab 6
box "Utiliser .lst (DVD)", 121, 220 152 121 83, tab 6
button "Selectioner", 122, 224 173 37 12, tab 6
list 123, 223 186 114 46, tab 6 size
edit "", 125, 263 174 74 10, tab 6 autohs autovs
check "Utiliser un .lst", 126, 224 161 46 10, tab 6
box "Option specifiques Xvid", 128, 141 236 200 36, tab 6
check "Cartoon", 129, 146 246 33 10, tab 6
radio "1er passe", 130, 145 257 37 10, tab 6
radio "2eme passe", 131, 186 257 42 10, tab 6
radio "une seulle passe", 132, 229 257 52 10, tab 6
check "Turbo", 133, 297 257 36 10, tab 6
check "Utiliser VBR", 134, 261 243 41 10, tab 6
edit "7", 135, 304 242 17 10, tab 6
text "/ 31", 136, 323 242 15 8, tab 6
tab "Config", 15
box "Chemins", 16, 6 18 339 42, tab 15
text "Emplacement de mplayer", 17, 9 31 74 8, tab 15
edit "", 18, 84 30 220 10, tab 15 autohs
button "Parcourir", 19, 306 27 37 12, tab 15
button "Parcourir", 22, 306 41 37 12, tab 15
edit "", 20, 84 41 220 10, tab 15 autohs
text "Emplacement de mencoder", 21, 9 42 74 8, tab 15
box "Options", 101, 6 60 338 238, tab 15
check "Récuperer la liste des chaines des le lancement du dialog", 102, 11 73 147 10, tab 15
check "Detacher la fenetre de mIRC", 124, 11 84 82 10, tab 15
tab "Outils", 28
box "Source", 29, 6 18 338 30, tab 28
edit "", 55, 10 31 290 10, tab 28 autohs
button "Parcourir", 56, 303 30 37 12, tab 28
box "Commande", 60, 5 274 338 25, tab 28
edit "", 61, 8 283 289 10, tab 28 autohs
button "Executer", 62, 299 282 37 12, tab 28
box "Sortie (audio)", 64, 5 49 338 26, tab 28
box "Reconstuire l'index", 57, 5 105 338 40, tab 28
edit "<fichier>", 65, 61 58 239 10, tab 28
edit "<fichier>", 68, 62 88 237 10, tab 28
edit "<fichier>", 70, 62 119 237 10, tab 28
button "Parcourir", 71, 302 118 37 12, tab 28
button "Parcourir", 69, 302 87 37 12, tab 28
button "Parcourir", 66, 303 57 37 12, tab 28
box "Sortie (Video)", 67, 5 77 338 27, tab 28
radio "Extraire audio", 59, 9 58 50 10, tab 28
radio "Extraire la video", 58, 9 87 50 10, tab 28
radio "Rebuild index", 72, 9 119 50 10, tab 28
check "Force index", 73, 9 130 46 10, tab 28
box "Fusion de video", 137, 5 146 338 98, tab 28
edit "", 138, 9 168 255 10, tab 28 autohs
button "...", 139, 267 167 37 12, tab 28
button "Ajouter", 140, 305 167 35 12, tab 28
list 141, 9 182 330 47, tab 28 size
radio "Fusioner des video", 142, 9 156 58 10, tab 28
text "Fichier de sortie", 143, 10 232 42 8, tab 28
edit "", 144, 54 231 246 10, tab 28 autohs
button "...", 145, 302 230 37 12, tab 28
tab "Lire", 79
box "Fichier", 80, 6 18 336 35, tab 79
edit "", 81, 11 31 288 10, tab 79
button "...", 82, 301 30 37 12, tab 79
box "Parametres", 83, 6 54 336 86, tab 79
text "Moteur de rendu video", 85, 124 67 58 8, tab 79
list 86, 185 66 50 65, tab 79 sort size
text "Moteur de rendu audio", 87, 11 66 58 8, tab 79
list 88, 71 67 50 65, tab 79 sort size
check "Framedroping", 89, 11 111 50 10, tab 79
box "Ligne de commande", 90, 5 272 338 26, tab 79
edit "", 91, 8 283 290 10, tab 79 autohs autovs
button "Lire", 92, 301 282 37 12, tab 79
check "Zoom", 84, 11 101 50 10, tab 79
check "Plein écran", 93, 11 91 50 10, tab 79
check "Pas de cache", 94, 11 81 50 10, tab 79
check "Pas de bordure", 95, 124 79 50 10, tab 79
check "Moteur audio auto", 96, 124 89 57 10, tab 79
check "Moteur video auto", 97, 124 99 59 10, tab 79
check "Rendu direct", 98, 124 109 50 10, tab 79
check "OnTop", 99, 11 121 33 10, tab 79
check "Pas de ratio", 100, 124 120 50 10, tab 79
check "Forcer cache", 103, 237 67 45 10, tab 79
edit "8192", 104, 290 66 34 10, tab 79
text "Ko", 105, 327 67 11 8, tab 79
check "Utiliser .srt", 106, 237 78 40 10, tab 79
button "...", 107, 326 77 14 9, tab 79
edit "", 108, 290 78 34 10, tab 79 autohs autovs
check "Le fichier est une playlist", 127, 237 90 79 10, tab 79
tab "Debug", 109
list 110, 5 18 338 280, tab 109 size
}
on *:unload:{
if ($exists($wbsdir $+ txt\playlist_mtools.txt)) {
echo -s Effacement de $wbsdir $+ txt\playlist_mtools.txt
.rm $wbsdir $+ txt\playlist_mtools.txt
echo -s ok
echo -s Suppression des données de config du script...
var %file = $shortfn($wbsdir $+ txt\config.ini)
remini %file mtools
echo -s ok
}
}
on *:dialog:Wbs.Mtools:*:*:{
if ($devent == init) {
adid 110 Initialisation du dialog...
mdxinit
wbs.mdx.table $dname 2 Chaine:80 Addresse:200
adid 110 Lecture du fichier de config
var %file = $shortfn($wbsdir $+ txt\config.ini)
if ($readini(%file,mtools,url)) odid 1 1 $v1
if ($readini(%file,mtools,mplayer)) odid 18 1 $v1
if ($readini(%file,mtools,mencoder)) odid 20 1 $v1
if ($readini(%file,mtools,output)) odid 14 1 $v1
if ($readini(%file,mtools,rebuild_idx_path)) odid 70 1 $v1
if ($readini(%file,mtools,extract_audio_path)) odid 65 1 $v1
if ($readini(%file,mtools,extract_video_path)) odid 68 1 $v1
if ($readini(%file,mtools,desktop.mode.enable)) cdid 124
if ($readini(%file,mtools,last.read)) odid 81 1 $v1
if ($readini(%file,mtools,getlist.at.start)) {
cdid 102
w.getlist
}
cdid 31,27,96,97,41,54,132,84
bdid 86,88,108,107,113,112,116,115,117,118,53,122,123,125,130,131,133,138,139,140,141,144,145,65,66,68,69,70,71,73
adid 110 Detection des codecs disponibles
var %codecs = xvid;mpeg4;rv10;wmv1;mpeg1video;mjpeg;wmv2;asv1;asv2;ffv1;h263;h263p , %polices = Arial
didtok $dname 115 59 %polices
didtok $dname 75 59 %codecs
var %vo directx;gl;gl2;caca;null;png;yuv4mpeg;jpeg;pnm , %ao = dsound;win32;pcm;null;mpegpes
didtok $dname 86 59 %vo
didtok $dname 88 59 %ao
;wbs.webfileread http://www.mplayerhq.hu/DOCS/man/fr/mplayer.1.txt did -a $dname 29
adid 110 Initialisation ok.
}
elseif ($devent == sclick) {
;adid 110 Click sur ID $did
var %file = $wcfg , %table = wbscfg
if ($did == 3) w.getlist
elseif ($did == 2) {
if (!$did(2).seltext) return
odid 10 1 $getmdx($did(2).seltext,2)
odid 8 1 Chaine actuele: $getmdx($did(2).seltext,1)
w.gencom
}
elseif ($did == 19) writeini %file mtools mplayer $w.browse($dname,18)
elseif ($did == 22) writeini %file mtools mencoder $w.browse($dname,20)
elseif ($did == 25) {
var %path = $w.browse($dname,14,c)
if (!%path) return
writeini %file mtools output %path
w.gencom
}
elseif ($did == 124) {
writeini %file mtools desktop.mode.enable $did(124).state
if ($?!("Redemarer le dialog ?")) {
wbsclose
mtools
}
}
elseif ($did == 56) w.browse $dname 55
;##### partie des outils (radios) DEBUT #####
elseif ($istok(58;59;72;142,$did,59)) {
bdid 138,139,140,141,65,66,68,69,70,71,73,144,145
if ($did(142).state) edid 138,139,140,141,144,145
elseif ($did(59).state) edid 65,66
elseif ($did(58).state) edid 68,69
elseif ($did(72).state) edid 70,71,73
genmencode.tool
}
elseif ($did == 145) {
w.browse $dname 144
genmencode.tool
}
;##### partie des outils (radios) FIN #####
elseif ($did == 139) w.browse $dname 138
elseif ($did == 140) {
if ($did(137)) {
if ($exists($did(138))) adid 141 $did(138)
else w.err erreur: fichier introuvable
}
else w.err erreur: fichier manquant
}
elseif (($did == 36) || ($did == 39)) w.browse $dname $iif($did == 36,35,38) $iif($did == 39,c)
elseif ($did == 26) {
if ($did(18)) writeini %file mtools mplayer $v1
if ($did(20)) writeini %file mtools mencoder $v1
var %tmp = $input(Configuration sauvée,oi)
}
elseif ($did == 102) writeini %file mtools getlist.at.start $did(102).state
elseif (($did == 27) || ($did == 30)) w.gencom
elseif ($did == 12) {
if ($exists($did(18))) {
if ($did(24)) run $did(18) $did(24)
else w.err 03 Aucun parametre
}
else w.err Fichier mplayer.exe introuvable.
}
elseif ($did == 47) {
if ($exists($did(20))) {
if ($did(46)) run $did(20) $did(46)
else w.err Aucun parametre
}
else w.err Fichier mencoder.exe introuvable.
}
elseif ($did == 126) {
$iif($did(126).state,edid,bdid) 122,123,125
$iif($did(126).state,bdid,edid) 35,36
genmencode
}
elseif ($istok(31;32;33;77;78,$did,59)) w.gencom
elseif ($istok(50;49;41;63;54;75;76;123;129,$did,59)) {
if ($did == 49) $iif($did(49).state,bdid,edid) 134,135,44
if ($did(75).seltext == xvid) {
if ($did(76).state) {
udid 76
cdid 63
}
bdid 53,76
}
else edid 53,76
if ($did == 123) odid 35 1 $did(123).seltext
$iif($did(76).state,edid,bdid) 53
genmencode
}
elseif ($istok(111;116;117;120;112;134;49,$did,59)) {
if ($did == 111) {
$iif($did(111).state,edid,bdid) 113,112,115,116,117,118
if (!$did(116).state) bdid 115
if (!$did(117).state) bdid 118
}
elseif ($did == 116) $iif($did(116).state,edid,bdid) 115
elseif ($did == 117) $iif($did(117).state,edid,bdid) 118
elseif ($did == 134) {
if ($did(134).state) {
udid 49
bdid 44
}
else edid 44
}
elseif ($did == 112) w.browse $dname 113
genmencode
}
elseif ($did == 66) writeini %file mtools extract_audio_path $w.browse($dname,65,c)
elseif ($did == 69) writeini %file mtools extract_video_path $w.browse($dname,68,c)
elseif ($did == 71) writeini %file mtools rebuild_idx_path $w.browse($dname,70,c)
elseif ($did == 82) {
var %file $w.browse($dname,81)
if ($istok(.lst;.m3u,$right(%file,4),59)) cdid 127
else udid 127
w.gen.lect.com
}
elseif ($did == 122) {
rdid 123
var %file $shortfn($w.browse)
if ($right(%file,4) != .lst) {
w.err Fichier incorect: .lst requis
return
}
if ((!%file) || (!$exists(%file))) return
odid 125 1 %file
.fopen lst %file
while (!$feof) adid 123 $fread(lst)
.fclose lst
if ($did(123,1)) odid 35 1 $v1
genmencode
}
elseif ($istok(88;86;84;89;93;94;95;96;97;98;99;100;103;106;107;127,$did,59)) {
if ($did == 96) $iif($did(96).state,bdid 88,edid 88)
elseif ($did == 97) $iif($did(97).state,bdid 86,edid 86)
elseif ($did == 103) $iif($did(103).state,bdid,edid) 94
elseif ($did == 94) $iif($did(94).state,bdid,edid) 103,104
elseif ($did == 107) w.browse $dname 108
elseif ($did == 106) $iif($did(106).state,edid,bdid) 107,108
w.gen.lect.com
}
elseif ($did == 92) {
if (!$did(18)) w.err Chemin de mplayer manquant
else {
writeini %file mtools last.read $did(81)
run $did(18) $did(91)
}
}
elseif ($did == 62) {
if (($did(59).state) || ($did(58).state)) {
if ($exists($did(18))) {
if ($did(61)) run $did(18) $did(61)
else w.err 01 Aucun parametre
}
else w.err Fichier mplayer.exe introuvable.
}
else {
if ($exists($did(20))) {
if ($did(61)) run $did(20) $did(61)
else w.err 02 Aucun parametre
}
else w.err Fichier mencoder.exe introuvable.
}
}
}
elseif ($devent == edit) {
if ($did == 14) {
var %file = $shortfn($wbsdir $+ txt\config.ini)
writeini %file mtools loutput $did(14)
w.gencom
writeini %file mtools output $did(14)
}
elseif ($did == 10) w.gencom
elseif ($istok(52;44;53;35;38;118;113;135,$did,59)) genmencode
elseif ($did == 1) writeini $shortfn($wbsdir $+ txt\config.ini) mtools url $did(1)
elseif ($did == 70) genmencode.tool
elseif ($istok(65;68;70;144,$did,59)) genmencode.tool
elseif ($did == 81) w.gen.lect.com
elseif ($istok(104;81;108,$did,59)) w.gen.lect.com
}
}
alias -l w.gencom {
var %file = $wcfg , %ldid = $readini(%file,mtools,loutput)
if ($did(30).state) {
if ($did(31).state) var %option = -dumpstream
elseif ($did(32).state) var %option = -dumpvideo
elseif ($did(33).state) var %option = -dumpaudio
var %params = %params %option -dumpfile $did(14)
}
else var %params = %params $iif($did(78).state,-ontop)
var %params = $did(10) %params $iif($did(77).state,-framedrop)
odid 24 1 %params
}
alias -l genmencode.tool {
var %file = $wcfg
if ($did(72).state) var %param = $iif($did(73).state,-forceidx,-idx) -oac copy -ovc copy -o $did(70) $did(55)
elseif ($did(59).state) var %param = -dumpaudio -dumpfile $did(65) $did(55)
elseif ($did(58).state) var %param = -dumpvideo -dumpfile $did(68) $did(55)
elseif ($did(142).state) {
var %i = 1
while ($did(141,%i)) {
var %param = %param $+(",$v1,")
inc %i
}
var %param = %param -o $+(",$did(144),")
}
odid 61 1 %param
}
alias -l genmencode {
var %file = $wcfg , %param = $+(",$did(35),")
if ($did(126).state) {
unset %param
var %i = 0 , %n = $did(123).lines
while (%i <= %n) {
var %param = %param $+(",$did(123,%i),")
inc %i
}
}
if (!$did(50).state) var %param = $+(%param,$chr(32),-oac mp3lame -lameopts cbr=,$did(52),$iif($did(54).state,:aq=0))
else var %param = $+(%param,$chr(32),-oac copy)
if (!$did(49).state) {
if ($did(75).seltext == xvid) {
;var %param = -ovc xvid preset=standard:fast -xvidencopts pass=1:vhq=4:autoaspect -vf pp=h1/v1/al/dr/tn,hqdn3d
var %param = %param -ovc xvid -xvidencopts $+($iif($did(134).state,fixed_quant= $+ $iif($did(135),$v1,4),bitrate= $+ $did(44)),:me_quality=6:chroma_opt,$iif($did(41).state,:autoaspect),$iif($did(129).state,:cartoon))
}
else {
var %param = $+(%param,$chr(32),-ovc lavc -lavcopts vcodec=,$iif($did(75).seltext,$v1,mpeg4),:vbitrate=,$did(44))
if ($did(41).state) var %param = $+(%param,:autoaspect=1)
elseif ($did(76).state) var %param = $+(%param scale=,$did(53))
var %param = %param
}
}
else var %param = $+(%param,$chr(32),-ovc copy)
var %param = $+(%param,$chr(32),$iif($did(120).state,-quiet),$chr(32),$iif($did(111).state,-sub $+(",$did(113),") $iif($did(117).state,-subfont-text-scale $&
$iif($did(118),$did(118),3)) $iif($did(116).state,-fontconfig -font $iif($did(115).seltext,$did(115).seltext,Arial))),$chr(32),-o $+(",$did(38),"))
odid 46 1 %param
}
alias -l w.browse {
var %config = $wcfg , %file = $sfile($iif($readini(%config,mtools,last.browse.path),$v1,$mircdir))
if (%file) && (($exists(%file)) || ($3 == c)) {
if ($dialog($1).title) did -o $1-2 1 %file
writeini %config mtools last.browse.path $nofile(%file)
return %file
}
}
alias -l w.getlist {
adid 110 Récupération de la liste des chaines...
var %file = $wbsdir $+ txt\playlist_mtools.txt
dll $wdll(hdownload.dll) download $did(1) %file
rdid 2
write -dl1 $shortfn(%file)
adid 110 Ouverture du fichier...
.fopen mtools %file
adid 110 Lecture du fichier
while (!$feof) {
var %item = $fread(mtools)
if ($left(%item,1) == $chr(35)) var %name = $gettok(%item,2-,45) , %url = $null
else var %url = %item
if (%url) adid 2 %name $chr(9) %url
}
.fclose mtools
adid 110 Fichier lu et fermé avec succes
.remove %file
adid 110 Suppresion du fichier temporaire ok
}
alias -l w.gen.lect.com {
var %com = $iif($did(93).state,-fs) $iif($did(99).state,-ontop) $iif($did(100).state,-noaspect) $iif($did(98).state,-dr) $iif($did(84).state,-zoom) $iif($did(89).state,-framedrop) $iif($did(94).state,-nocache) $&
$iif($did(95).state,-noborder) $iif($did(86).seltext && !$did(97).state,-vo $did(86).seltext) $iif($did(88).seltext && !$did(96).state,-ao $did(88).seltext) $&
$iif($did(103).state,-cache $iif($did(104),$int($v1),8192))) $iif($did(106).state,-sub $+(",$did(108),") -subfont-text-scale 3) $iif($did(81),$+($iif($did(127).state,-playlist),$chr(32),",$did(81),"))
odid 91 1 %com %file
}
alias mtools {
var %file = $shortfn($wbsdir $+ txt\config.ini)
dialog $+(-m,$iif($readini(%file,mtools,desktop.mode.enable),-d Wbs.Mtools)) Wbs.Mtools Wbs.Mtools
}
Conclusion :
si vous avez deja mon script "wbs script" supprimez le fichier "alises.mrc" en effet celui ci ne sers qu'a permetre à mon addon de fonctioner sans le wbs script, le conserver serais genant
pour charger le script comencez par les aliases
//load -rs $sfile($mircdir)
(selectionez aliases.mrc)
puis retappez la ligne pour le fichier mtools.mrc
voila amusez vous bien et n'hézitez pas a me faire des suggestions
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.