website logo
Auteur
avatar
Pseudaxos

Forum » » Logiciels » » SMtube problème


Posté : 15-01-2017 11:33 icone du post

Et depuis SMTube.ini qui est comme suit : 

<MPLAYER>APPDIR:Mplayer
><MPLAYER_OPTIONS>
<CONSOLE>0/400/640/400
<F FPLAY>APPDIR:ffplay
<FFPLAY_OPTIONS>-infbuf
<FF MPEG>APPDIR:ffmpeg
<FFMPEG_OPTIONS>-b:a 128k
<FFMPEG_OUTPUT_TYPE>MP3
<DOWNLOADER>Amiga/ Download/Download
<DOWNLOADER_OPTIONS>DEST
<DOWNLO ADER_DEFAULT_EXTENSION>MP4
<DOWNLOADER_DEFAULT_PATH>Amiga/Vi deos
<DEBUG>ON
WAIT ON
SECONDS 10
  
 
**** Examples ****  
 
Optimisations from K-L (compatible with MUI-MPlayer Overlay and SDL-MPlayer)
("MPLAYER_OPTIONS = -cache 8192 -cache-min 20 -autoq 100 -autosync 30")
 
Optimisations from K-L (compatible with MUI-MPlayer NON-Overlay)
MPLAYER = APPDIR:MPlayer
MPLAYER_OPTIONS = -vo comp -cache 8192 -cache-min 20 -autoq 100 -autosync 30
 
For LiveForIt Altivec Mplayer with Radeon HD
MPLAYER = APPDIR:MPlayer
("MPLAYER_OPTIONS = -vo comp -ao sdl  -cache 8192 -cache-min 20"))


J'ai ceci en fenêtre console de sortie :

URL =  http://r1---sn-hpa7znel.googlevideo.com/videoplayback?quality=medium& key=yt6&ratebypass=yes&lmt=1399786719966937&mm=31&ipbits=0& sparams=dur,id,initcwndbps,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,nh,pl,ratebypass ,source,upn,expire&upn=eRHXwquXX_k&id=o-AKgoUekfIV7SPJ11VBs7sKtVVhcu_Ax ZWX_Uqceb3rSa&mv=m&dur=600.142&source=youtube&ms=au&mime=vi deo/mp4&initcwndbps=610000&mn=sn-hpa7znel&ip=86.253.196.68&nh=I gpwcjA0Lm1pbDAxKgkxMjcuMC4wLjE&signature=2DB10FC8EA7D1746765DC61B7DBCB55F09 B53CDD.E1EA19E923527049ECD76BE040AE5E9E017E49D8&pl=16&mt=1484475944& ;itag=18&expire=1484497755
YouTube video
LiveForIt-MPlayer-6.5.7 SVN-r37230-snapshot-1.1.1 (C) 2000-2014 MPlayer Team

Playing http://r1---sn-hpa7znel.googlevideo.com/videoplayback?quality=medi um&key=yt6&ratebypass=yes&lmt=1399786719966937&mm=31&ipbits =0&sparams=dur,id,initcwndbps,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,nh,pl,rat ebypass,source,upn,expire&upn=eRHXwquXX_k&id=o-AKgoUekfIV7SPJ11VBs7sKtV Vhcu_AxZWX_Uqceb3rSa&mv=m&dur=600.142&source=youtube&ms=au& mime=video/mp4&initcwndbps=610000&mn=sn-hpa7znel&ip=86.253.196.68&a mp;nh=IgpwcjA0Lm1pbDAxKgkxMjcuMC4wLjE&signature=2DB10FC8EA7D1746765DC61B7DB CB55F09B53CDD.E1EA19E923527049ECD76BE040AE5E9E017E49D8&pl=16&mt=1484475 944&itag=18&expire=1484497755.
Resolving r1---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r1---sn-hpa7znel.googlevideo.com[173.194.165.6]: 80...
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...

Cache size set to 320 KBytes
Cache fill: 18.01% (59021 bytes)   

libavformat version 56.36.100 (internal)
libavformat file format detected.
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...
AmigaOS4.1 Bug select() don't reset or set errno value
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...
AmigaOS4.1 Bug select() don't reset or set errno value
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...
AmigaOS4.1 Bug select() don't reset or set errno value
AmigaOS4.1 Bug select() don't reset or set errno value
AmigaOS4.1 Bug select() don't reset or set errno value
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...
AmigaOS4.1 Bug select() don't reset or set errno value
Resolving r17---sn-hpa7znel.googlevideo.com for AF_INET...
Connecting to server r17---sn-hpa7znel.googlevideo.com[173.194.165.22]: 80...
AmigaOS4.1 Bug select() don't reset or set errno value
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  450x360  24bpp  25.000 fps  409.8 kbps (50.0 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2014-05-10 05:38:36
VO: [comp_yuv2] Welcome man !.
gfx_nodri = 0
gfx_novsync = 0
benchmark = 0
vsync is enabled = 1
=================================================================== =======
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.41.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
============================================================== ============
======================================================== ==================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatbe, 96.0 kbit/3.40% (ratio: 11999->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
============================================================= =============
Not supported audio format 0000001c
  Endian: BE
  Signed: Yes
  Float: Yes
  Bits: 32
  Special Type: 0
Using Format AF_FORMAT_S16_BE
AO: [ahi_dev2] 44100Hz 2ch s16be (2 bytes per sample)
Starting playback...
libmpcodecs/vd.c:mpcodecs_config_vo:d
Movie-Asp ect is 1.25:1 - prescaling to correct movie aspect.
VO: [comp_yuv2] 450x360 => 450x360 Planar YV12 
screen w 1920 h 1080 aspect 1.78:1
VO: Disabling blanker


Ah oui, y'a aussi le Play.rexx qui est :

/* REXX */
parse arg type url

CONFIG_FILE = "ENVARC:SMTube.ini"

/* DON'T MODIFY BELOW THESE LINES */
/* ALL SETTINGS ARE NOW IN THE CONFIG_FILE */

/* DON'T MODIFY BELOW THESE LINES */
/* ALL SETTINGS ARE NOW IN THE CONFIG_FILE */

/* DON'T MODIFY BELOW THESE LINES */
/* ALL SETTINGS ARE NOW IN THE CONFIG_FILE */

/* DON'T MODIFY BELOW THESE LINES */
/* ALL SETTINGS ARE NOW IN THE CONFIG_FILE */


/* Create the Config file is inexistant */
PRAGMA('W','NULL') /* supprime les fenetres Requester en cas d'inexistence du repertoire ci-dessous */
if EXISTS(CONFIG_FILE) = 0,
then do
call Create_Config()
end
PRAGMA('W','WORKBENCH') /* reactive les requester Workbench */

/* read Config parameters */
call Read_Config() 

/* for SDL-MPlayer 4.2.4 complaining about a HTTP: assign at startup */
ADDRESS COMMAND "ASSIGN http: RAM:"

if type = "file", /* pour lire les vidéos déjà téléchargées */
then do
url = strip(url)
url = right(url,length(url)-1)
A = pos("/",url)
if A > 0,
then do
  url = OVERLAY(':',url,A)
end

url = INSERT('"',url)
url = INSERT('"',url,length(url))

end

iv> type = substr(url,lastpos(".",url)+1,3)
type = TRANSLATE(type)

if DEBUG = ON, 
then do
/* console open for debug log */
call close STDOUT
open(STDOUT, 'con:'CONSOLE'/smTube AmigaOS4 console/CLOSE',W) 

say "URL = "url

if (type ~= "M3U"),
then do
say "YouTube video"
ADDRESS COMMAND MPLAYER MPLAYER_OPTIONS url
end
else do
say "YouTube live stream"
say "Waiting for ffplay..."
ADDRESS COMMAND FFPLAY FFPLAY_OPTIONS url
end

SAY " "
SAY "-------------------------  smTube AmigaOS4  -------------------------"
SAY " "
SAY "If you encounter playback problems, check MPlayer option (MPLAYER_OPTIONS = " ") in Amiga\PlayVideo.rexx."
SAY " "
SAY "Streaming seems to work only with MUI-Mplayer (MPlayer UNKNOWN-4.4.3 (C) 2000-2010 MPlayer Team)"
SAY "or SDL MPlayer SVN-r32561-snapshot-4.2.4"
SAY " "
SAY "This DEBUG console can be turned OFF in Amiga\PlayVideo.rexx (DEBUG = OFF)."
SAY " "

   
if wait = ON, 
then do
SAY "Waiting "SECONDS" seconds before to close this debug window..."
SAY " "
SAY "Wait seconds can be modified in Amiga\PlayVideo.rexx (SECONDS = x)"
SAY " "
SAY "Wait time can be turned OFF in Amiga\PlayVideo.rexx (WAIT = OFF)"
SAY " "
SAY "----------------------------------------------------------------------"
< div> ADDRESS COMMAND "WAIT "SECONDS
end
else do
SAY "----------------------------------------------------------------------"
< div> end

call close STDOUT
end
else do
/* no debug output */
if (type ~= "M3U"),
then do
ADDRESS COMMAND MPLAYER MPLAYER_OPTIONS url ">NIL: *>NIL:"
end
else do
ADDRESS COMMAND FFPLAY FFPLAY_OPTIONS url
end
end




EXIT

Create_C onfig:
OPEN('SMTUBEPARMS',CONFIG_FILE,'W')
call writeln(SMTUBEPARMS, "<MPLAYER>APPDIR:MPlayer")
call writeln(SMTUBEPARMS, "<MPLAYER_OPTIONS>")
call writeln(SMTUBEPARMS, "<CONSOLE>0/400/640/400")
call writeln(SMTUBEPARMS, "<FFPLAY>APPDIR:ffplay")
call writeln(SMTUBEPARMS, "<FFPLAY_OPTIONS>-infbuf")
call writeln(SMTUBEPARMS, "<FFMPEG>APPDIR:ffmpeg")
call writeln(SMTUBEPARMS, "<FFMPEG_OPTIONS>-b:a 128k")
call writeln(SMTUBEPARMS, "<FFMPEG_OUTPUT_TYPE>MP3")
call writeln(SMTUBEPARMS, "<DOWNLOADER>Amiga/Download/Download")
call writeln(SMTUBEPARMS, "<DOWNLOADER_OPTIONS>DEST")
call writeln(SMTUBEPARMS, "<DOWNLOADER_DEFAULT_EXTENSION>MP4")
call writeln(SMTUBEPARMS, "<DOWNLOADER_DEFAULT_PATH>Amiga/Videos")
call writeln(SMTUBEPARMS, "<DEBUG>ON")
call writeln(SMTUBEPARMS, "<WAIT>OFF")
call writeln(SMTUBEPARMS, "<SECONDS>3")
call writeln(SMTUBEPARMS, "  ")
call writeln(SMTUBEPARMS, " ")
call writeln(SMTUBEPARMS, "**** Examples ****  ")
call writeln(SMTUBEPARMS, " ")
call writeln(SMTUBEPARMS, "Optimisations from K-L (compatible with MUI-MPlayer Overlay and SDL-MPlayer)")
call writeln(SMTUBEPARMS, "MPLAYER_OPTIONS = -cache 8192 -cache-min 20 -autoq 100 -autosync 30")
call writeln(SMTUBEPARMS, " ")
call writeln(SMTUBEPARMS, "Optimisations from K-L (compatible with MUI-MPlayer NON-Overlay)")
call writeln(SMTUBEPARMS, "MPLAYER_OPTIONS = -vo cgx_wpa -cache-min 20 -autoq 100 -autosync 30") 
call writeln(SMTUBEPARMS, " ")
call writeln(SMTUBEPARMS, "For LiveForIt Altivec Mplayer with Radeon HD")
call writeln(SMTUBEPARMS, "MPLAYER = APPDIR:MPlayer-altivec")
call writeln(SMTUBEPARMS, "MPLAYER_OPTIONS = -vo comp -ao sdl  -cache 8192 -cache-min 20 ")
CLOSE('SMTUBEPARMS')

corps = '"A default settings file has been created in *n*n'CONFIG_FILE'*n*nPlease update it accordingly to your system"'
commande = "RequestChoice SMTube "corps" OK type=warning >NIL:"
ADDRESS COMMAND commande

ADDRESS COMMAND "APPDIR:NotePad "CONFIG_FILE

return

Read_Config: iv>
if  (OPEN('SMTUBEPARMS',CONFIG_FILE,'R')) = 1, 
then do

i = 0
do while ~eof(SMTUBEPARMS)
i = i + 1 

ligne.i = readln(SMTUBEPARMS)

Mot1 = substr(ligne.i,1,pos(">",ligne.i))

if Mot1 = "<MPLAYER>", 
then do
debut_parm = pos(">",ligne.i,1)
MPLAYER = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<MPLAYER_OPTIONS>", 
then do
debut_parm = pos(">",ligne.i,1)
MPLAYER_OPTIONS = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<CONSOLE>", 
then do
debut_parm = pos(">",ligne.i,1)
CONSOLE = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<FFPLAY>", 
then do
debut_parm = pos(">",ligne.i,1)
FFPLAY = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<FFPLAY_OPTIONS>", 
then do
debut_parm = pos(">",ligne.i,1)
FFPLAY_OPTIONS = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<FFMPEG>", 
then do
debut_parm = pos(">",ligne.i,1)
FFMPEG = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<FFMPEG_OPTIONS>", 
then do
debut_parm = pos(">",ligne.i,1)
FFMPEG_OPTIONS = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<FFMPEG_OUTPUT_TYPE>", 
then do
debut_parm = pos(">",ligne.i,1)
FFMPEG_OUTPUT_TYPE = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DOWNLOADER>", 
then do
debut_parm = pos(">",ligne.i,1)
DOWNLOADER = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DOWNLOADER_OPTIONS>", 
then do
debut_parm = pos(">",ligne.i,1)
DOWNLOADER_OPTIONS = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DOWNLOADER_DEFAULT_EXTENSION>", 
then do
debut_parm = pos(">",ligne.i,1)
DOWNLOADER_DEFAULT_EXTENSION = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DOWNLOADER_DEFAULT_PATH>", 
then do
debut_parm = pos(">",ligne.i,1)
DOWNLOADER_DEFAULT_PATH = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DOWNLOADER_CONSOLE>", 
then do
debut_parm = pos(">",ligne.i,1)
DOWNLOADER_CONSOLE = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<DEBUG>", 
then do
debut_parm = pos(">",ligne.i,1)
DEBUG = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<WAIT>", 
then do
debut_parm = pos(">",ligne.i,1)
WAIT = substr(ligne.i,debut_parm + 1) 
end
if Mot1 = "<SECONDS>", 
then do
debut_parm = pos(">",ligne.i,1)
SECONDS = substr(ligne.i,debut_parm + 1) 
end
end
CLOSE('SMTUBEPARMS')
end
return 

EXIT >


Voili voilou.... Moi, j'en perds mon latin avec tous ces fichiers de configs... 


Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=2344&forum=4