
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (56)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (10404)
-
Is Google Analytics Accurate ? 6 Important Caveats
8 novembre 2022, par Erin -
ffmpeg doesn't work when the script is launched by cron - No protocol specified, Cannot open display :0.0
14 janvier 2024, par a kffmpeg in my script doesn't work when the script is launched by cron of the root


Error : No protocol specified, Cannot open display :0.0


OS : Ubuntu 20.04


#!/bin/bash
log=/var/log/log2/log2.txt

echo ______________ $(date) >> "$log"
echo "$""DISPLAY" "= " "$DISPLAY" >> "$log" ;
echo whoami ' ' $(whoami) >> "$log" 
echo pwd ' ' $(pwd) >> "$log" 
echo "$""USER" "=" ' ' "$USER" >> "$log"
echo PATH ' ' "$PATH" >> "$log"
echo which ffmpeg ' ' $(which ffmpeg)>> "$log" 
echo whereis ffmpeg ' ' $(whereis ffmpeg) >> "$log" 
echo "\nls -l /bin/* | grep ffmpeg" ' ' >> "$log"
ls -l /usr/bin/* | grep ffmpeg >> "$log"
echo "ls -l /var/log | grep log2" ' '>> "$log"
ls -l /var/log | grep log2 >> "$log"

ffmpeg -y -f x11grab -s 1366x768 -i :0.0 -r 25 /var/log/log2/test.mp4 -loglevel error 2>>"$log" &

echo "pid ffmpeg ""$""!"" = " "$!" >> "$log" 
sleep 5
kill "$!"
echo exit >> "$log"
exit



When Cron (Cron of the root) launches the script, ffmpeg shows the error "No protocol specified, Cannot open display :0.0"


/var/log/log2/log2.txt :


______________ ven. 05 mai 2023 04:10:01 CEST
$DISPLAY = 
whoami root
pwd /root
$USER = 
PATH /usr/bin:/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:09 log2
pid ffmpeg $! = 74590
No protocol specified
[x11grab @ 0x56244aa06740] Cannot open display :0.0, error 1.
:0.0: Input/output error
exit



When I launch the script manually as a not-root user (with sudo), everything work correctly :


______________ ven. 05 mai 2023 04:10:47 CEST
$DISPLAY = :0
whoami root
pwd /home/an
$USER = root
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:09 log2
pid ffmpeg $! = 74618
exit



When I launch the script manually as the root, everything works correctly :


______________ ven. 05 mai 2023 04:11:27 CEST
$DISPLAY = :0
whoami root
pwd /root
$USER = root
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 04:11 log2
pid ffmpeg $! = 74683
exit



When crontab of an ordinary user launches the script, it works correctly :


$DISPLAY = 
whoami an
pwd /home/an
$USER = 
PATH /usr/bin:/bin
which ffmpeg /usr/bin/ffmpeg
whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
ls -l /usr/bin/* | grep ffmpeg 
-rwxr-xr-x 1 root root 284976 mai 18 2022 /usr/bin/ffmpeg
ls -l /var/log | grep log2 
drwxrwxrwx 2 root root 4096 mai 5 05:05 log2
pid ffmpeg $! = 77601
exit



I have tried to put into the script :


export DISPLAY=":0"


export DISPLAY=":0.0"


export DISPLAY=":1"


-
Could not open file v_YoYo_g07_c04.jpeg av_interleaved_write_frame() : Input/output error
26 octobre 2017, par Josephthe purpose of the following code is to extract frames from a list of videos.
To do so l defined in python 3.5 extract_frames function which calls extract_frame function. In this latter a ffmpeg instruction is given to extract the framesdef extract_frames(vidlist,vidDir,outputDir):
f = open(vidlist, 'r')
vids = f.readlines()
f.close()
vids = [video.rstrip() for video in vids]
for vid in vids:
videoName = os.path.join(vidDir,vid.split('.')[0]+".avi")
frameName = os.path.join(outputDir, vid.split('.')[0]+".jpeg")
extract_frame(videoName,frameName)
extract_frames(trainlist01, ucf101_path,training_output)such that :
ucf101_path = "/local/common-data/UCF/UCF-101" # Path to the root dataset
trainlist01="/local/common-data/UCF/ucfTrainTestlist/trainlist01.txt"
training_output = '/local/common-data/UCF/tmp_frames/train/'where trainlist01.txt contains a set of lines as follow (first column the path to the video and the second is the class of the video) :
ApplyEyeMakeup/v_ApplyEyeMakeup_g08_c01.avi 1 .....
And videoname and framename correspond for instance to :
videoname="/local/common-data/UCF/UCF-101/YoYo/v_YoYo_g07_c04.avi"
framename="/local/common-data/UCF/tmp_frames/test/YoYo/v_YoYo_g07_c04.jpeg"The error is returned by the following function
import subprocess
def extract_frame(videoName,frameName):
if not os.path.exists(videoName):
print('%s does not exist!' % videoName)
return False
# call ffmpeg and grab its stderr output
p = subprocess.call('ffmpeg -i %s -r 1 -s qvga -t 1 -f image2 %s' % (videoName,frameName), shell=True)
return pThe error is :
[image2 @ 0x422ff80] Could not open file : /local/common-data/UCF/tmp_frames/train/YoYo/v_YoYo_g25_c05.jpeg
av_interleaved_write_frame() : Input/output errorand the output files training_output where l supposed to get my frames is empty.
files and folders ad subfolders have all right .
What’s wrong with my code ?
EDIT 1
After creating a subfolder YoYo/ in /local/common-data/UCF/tmp_frames/train/ and run again the code l got this new error :
Could not get frame filename number 2 from pattern '/local/common-data/UCF/tmp_frames/train/YoYo/v_YoYo_g25_c05.jpeg' (either set updatefirst or use a pattern like %03d within the filename pattern) av_interleaved_write_frame(): Invalid argument