
Advanced search
Medias (91)
-
Collections - Formulaire de création rapide
19 February 2013, by
Updated: February 2013
Language: français
Type: Picture
-
Les Miserables
4 June 2012, by
Updated: February 2013
Language: English
Type: Text
-
Ne pas afficher certaines informations : page d’accueil
23 November 2011, by
Updated: November 2011
Language: français
Type: Picture
-
The Great Big Beautiful Tomorrow
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 October 2011, by
Updated: October 2011
Language: English
Type: Text
-
Rennes Emotion Map 2010-11
19 October 2011, by
Updated: July 2013
Language: français
Type: Text
Other articles (74)
-
Organiser par catégorie
17 May 2013, byDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Création définitive du canal
12 March 2010, byLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
Le profil des utilisateurs
12 April 2011, byChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
On other websites (5931)
-
Making a timelapse by drag and drop - A rebuild of an old script using ImageMagick
14 August 2019, by cursor_majorI have written an apple script previously to automate a task I do in my work many times.
I shoot Raw + JPG in camera, copy to hard drive.
I then drag named and dated folder eg. "2019_08_14_CAM_A_CARD_01" on to an automator app and it divides the files in to folders "NEF" and "JPG" respectively.
I then drag the appropriate "JPG" folder onto my Timelapse app and it runs the image sequence process in QT7 and then saves the file with the parent folder name in the grandparent folder. This keeps things super organised for when I want to re link to the original RAW files.
[code below]
It is a 2 step process and works well for my needs, however, Apple are going to be resigning Quicktime 7 Pro so my app has a foreseeable end of life.
I want to take this opportunity to refine and improve the process using terminal and ImageMagick.
I have managed to work some code that runs well in terminal, but I have to navigate to the folder first then run a script. It doesn’t do the file renaming and doesn’t save in the right place.
Also, when I try and run the simple script in an automator ’App’ it throws up errors even before trying to add anything clever with the file naming.
Later, once I have recreated my timelapse. maker app I want to get clever with more of ImageMagicks commands and overlay a small super of the original frame name in the corner so I can expedite my reconnecting workflow.
I’m sorry, I’m a photographer not a coder but I’ve been bashing my head trying to work this out and I’ve hit a brick wall.
File Sorter
repeat with d in dd
do shell script "d=" & d's POSIX path's quoted form & "
cd \"$d\" || exit
mkdir -p {MOV,JPG,NEF,CR2}
find . -type f -depth 1 -iname '*.mov' -print0 | xargs -0 -J % mv % MOV
find . -type f -depth 1 -iname '*.cr2' -print0 | xargs -0 -J % mv % CR2
find . -type f -depth 1 -iname '*.jpg' -print0 | xargs -0 -J % mv % JPG
find . -type f -depth 1 -iname '*.nef' -print0 | xargs -0 -J % mv % NEF
for folder in `ls`;
do if [ `ls $folder | wc -l` == 0 ]; then
rmdir $folder;
fi; done;
"
end repeat
end open```
Timelapse Compiler
```on run {input, parameters}
repeat with d in input
set d to d's contents
tell application "Finder"
set seq1 to (d's file 1 as alias)
set dparent to d's container as alias
set mov to "" & dparent & (dparent's name) & ".mov"
end tell
tell application "QuickTime Player 7"
activate
open image sequence seq1 frames per second 25
tell document 1
with timeout of 500 seconds
save self contained in file mov
end timeout
quit
end tell
end tell
end repeat
return input
end run```
Current code that runs from within Terminal after I have navigated to folder of JPGs
```ffmpeg -r 25 -f image2 -pattern_type glob -i '*.JPG' -codec:v prores_ks -profile:v 0 imagemagick_TL_Test_01.mov``` -
ffmpeg doesn't work when the script is launched by cron - No protocol specified, Cannot open display :0.0
14 January 2024, by 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"


-
ffmpeg command running stand alone but not from a linux script
31 May 2016, by user1490563i made a simple script that breaks a flv file into multiple parts, convert them all to .mp4 individually and then merge all of them to form a final mp4 file. i did this to save time and convert large files in parallel.
however, i am stuck because the command that normally run on command line for ffmpeg, dont run via script.
I am kind of stuck here and will like to have some assistance.
#!/bin/bash
#sleep 5
filenametmp=$1;
filename=`echo "$filenametmp" | awk '{split($0,a,"."); print a[1]}'`
echo $filename
output="$filename-output"
filenamewithoutpath=`echo "$output" | awk '{split($0,a,"/"); print a[4]}'`
echo $output $filenamewithoutpath
/usr/bin/ffmpeg -i $filenametmp -c copy -map 0 -segment_time $2 -f segment $output%01d.flv
#sleep 10
#echo "/bin/ls -lrt /root/storage/ | /bin/grep $filenamewithoutpath | /usr/bin/wc -l"
filecounttmp=`/bin/ls -lrt /opt/storage/ | /bin/grep $filenamewithoutpath | /usr/bin/wc -l`
filecount=`expr $filecounttmp - 1`
echo $filecount
for i in `seq 0 $filecount`
do
suffix=`expr 0000 + $i`
filenametoconvert="$output$suffix.flv"
convertedfilename="$output$suffix.mp4"
echo $filenametoconvert
/usr/bin/ffmpeg -i $filenametoconvert -c:v libx264 -crf 23 -preset medium -vsync 1 -r 25 -c:a aac -strict -2 -b:a 64k -ar 44100 -ac 1 $convertedfilename > /dev/null 2>&1 &
done
sleep 5
concatstring=""
for j in `seq 0 $filecount`
do
suffix=`expr 0000 + $j`
convertedfilenamemp4="$output$suffix.mp4"
#concatstring=`concat:$concatstring|$convertedfilenamemp4`
echo "file" $convertedfilenamemp4 >> $filename.txt
#ffmpeg -i concat:"$concatstring" -codec copy $filename.mp4
#ffmpeg -f concat -i $filename.txt -c copy $filename.mp4
done
echo $concatstring
ffmpeg -f concat -i $filename.txt -c copy $filename.mp4
rm $output*
rm $filename.txtfollowing is how to run this on any flv file
./ff.sh /opt/storage/tttttssssssssss_573f5b1cd473202daf2bf694.flv 20
Any help will be appreciated and any input required will be given.
I am on Ubuntu 14.04 LTS version. Standard installation of ffmpeg.