
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (64)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (8830)
-
Unable to find correct bash syntax for comparing numbers
17 octobre 2024, par kaliPart of a long script I'm simply trying to compare two numbers, one is constant and the other one is retrieved via
ffprobe
(The 474 in the error messages is the height found by ffprobe)

CURRENT_RES=$(ffprobe -v quiet -select_streams v:0 -show_entries stream=height -of csv=s=x:p=0 "${fn}")
 if [[ $CURRENT_RES -gt 1080 ]]; then
 echo "leaving preset normal"
 SLOW_PRESET=("" "")
 else
 echo "setting preset to slow"
 SLOW_PRESET=(-preset slow)
 fi;



produces :


/usr/local/bin/startScreen.sh: line 95: [[: 474

474: syntax error in expression (error token is "474")
setting preset to slow



I also tried arithmetic operators like :


if (($CURRENT_RES>1080)); then
 echo "leaving preset normal"
 SLOW_PRESET=("" "")
 else
 echo "setting preset to slow"
 SLOW_PRESET=(-preset slow)
 fi;



got a slightly different, but essentially same error message like :


/usr/local/bin/startScreen.sh: line 95: ((: 474

474>1080: syntax error in expression (error token is "474>1080")
setting preset to slow



What's even more baffling is there 15 lines below this block there is another comparison which works perfectly fine !


if [[ $CURRENT_RES -gt $CONVERT_HEIGHT ]]; then



I thought may be the inline written 1080 number is confusing the if expression so I tried assigning 1080 to variable and reusing it, which changed nothing.


edit : (dropping this here in case someone else falls into same mistake)
following up on Shawn's advice from comments using
cat -v
showed 474 was repeated twice.
For debugging purposes ran :

ffprobe -v quiet -select_streams v:0 -show_entries stream=height -of json "filename.mp4"



to find this weird format :


{
 "programs": [
 {
 "streams": [
 {
 "height": 472
 }
 ]
 }
 ],
 "streams": [
 {
 "height": 472
 }
 ]
}



finally changed the ffprobe command to :


CURRENT_RES=$(ffprobe -v quiet -select_streams v:0 -show_entries stream=height -of json "${fn}" | jq .streams[0].height)



to resolve the issue.


-
Is there a way to open a batch file at a certain line using a command prompt window
14 août 2024, par Voidmaster01Im testing a batch file that Im still in the process of making and I want to open it at line 6 instead of line 1 since ive already run that part of the code. it takes a couple of minutes to run it since im using ffmpeg.


this is the first area of the code


1 @Echo off
2 set /p IPath=Enter the Path of the file you wish to remux from (use "Copy as path" option and keep the Quotations): 
3 set /P M=what is the first letter of the path of your new file?(do not include the semicolon(:))
4 set /p NewPath=Enter the Path you wish to remux to (must be path minus the directory BUT do not use Quotations for this)(I also recommend using a single folder to hold the files while remuxing them before sending them to their separate folders):
5 ffmpeg -i %IPath% -c copy -map 0 "%M%:\%NewPath%"
6 goto :Premiere &:: This command takes inputs from the previous lines and sets up to remux files
7
8 :Premiere &:: this command line starts the preferred editor and waits 30 seconds to allow it to start
9 set /p EDITOR=Enter the .exe file for your prefered editor should look like: 'Adobe Premiere Pro.exe':
10 start "" "%EDITOR%"
11 echo Starting Process. . . Please Wait
12 timeout /t 30
13 tasklist | find /I "%EDITOR%" &:: The next couple of lines test for the editor to see if it opened or not
14 if errorlevel 1 (
15 echo could not start process 
16 goto :FailEditor
17 ) Else (
18 echo Process completed, next question--->
19 goto :choice
20 )



so instead of starting at line 1 i would like to start at line 6 to bypass the longest section of the code.


Im thinking its something along the lines of


Start M:\REMUX.bat at line 6


however
AT
is a command to tell a time to start the batch file so im not sure

-
"Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning
23 juillet 2024, par goldieFor a captcha solver I need to use FFmpeg on Windows 10. Warning when running the code for the first time :


C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
 warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)



Running the script anyway while it required ffprobe I got :


C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
 warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
Traceback (most recent call last):
 File "D:\Scripts\captcha\main.py", line 164, in <module>
 main()
 File "D:\Scripts\captcha\main.py", line 155, in main
 captchaSolver()
 File "D:\Scripts\captcha\main.py", line 106, in captchaSolver
 sound = pydub.AudioSegment.from_mp3(
 File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\audio_segment.py", line 796, in from_mp3
 return cls.from_file(file, 'mp3', parameters=parameters)
 File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\audio_segment.py", line 728, in from_file
 info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
 File "C:\Users\user\AppData\Roaming\Python\Python310\site-packages\pydub\utils.py", line 274, in mediainfo_json
 res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
 File "C:\Program Files\Python310\lib\subprocess.py", line 966, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "C:\Program Files\Python310\lib\subprocess.py", line 1435, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
</module>


I tried downloading it manually, editing environment variables, pasting them in the same folder as the script and installing with pip. FFmpeg works however my script doesn't.