
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (101)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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. -
Le profil des utilisateurs
12 avril 2011, parChaque 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 (...)
Sur d’autres sites (10321)
-
FFmpeg command works in terminal but gives an error in php code
21 mai 2021, par RiderUse this command :


ffmpeg -i lecture.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8



It works.


$path = '1/';
 $inputFile = 'lecture.mp4';
 $filePath = 'filename.m3u8';
 $commandOutput = exec ('/opt/ffmpeg/ffmpeg -I '.$path .$inputFile. ' -Codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls'.$path .$filePath);



Using this PHP code I get the error :
At least one output file must be specified


What is causing this error ?


-
Execute multiple commands in background from terminal & redirecting output
9 octobre 2016, par GuernicaI’m running ffmpeg via an exec command from php. I need to wait for the command to finish executing and run another command to call a php script.
I need the output to be redirected to text files.
This i have accomplished with the following code but it wont execute in the background. PHP hangs until the script has finished executing.
exec("ffmpeg -i INPUTFILE -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -strict -2 OUTPUTFILE -hide_banner 1> /tmp/1.txt 2>/tmp/1.txt && php PATH_TO_PHP_SCRIPT/complete.php id=11 1> /tmp/11.txt 2> /tmp/11.txt &");
Any help would be greatly appreciated.
EDIT : I’ve got the required functionality by calling my original php containing the above code from another php containing
exec("php convert.php id=".$id." 1> /tmp/".$id."_error.txt 2>/tmp/".$id."_error.txt &");
I would rather leave this question open to find a more elegant solution or information as to why my original code at the top doesn’t function in the way i would expect.
-
Mac terminal command to list files and sort by date to use in ffmpeg
22 septembre 2020, par JeffI am using a gopro to film a bunch of videos. I want to then take those videos directly from the SD card folder and concatenate them into a single video (bypass an editor) by using FFMPEG.


I'm currently able to stitch together "chaptered" videos with the following example command on my Mac (10.13) :


ffmpeg -f concat -safe 0 -i <(for f in /sdcardfolder/100GOPRO/GH*488.MP4; do echo "file '$f'"; done) -c copy /folder/video.mp4


The reason for this is that the ffmpeg command requires a text file that looks like this :




file '/folder/GH016992.MP4'


file '/folder/GH036990.MP4'


...



The real command is this, which generates the list of files in the right format with
file
in front of each one and can be embedded into theffmpeg
command :

for f in /Volumes/GoPro8/DCIM/100GOPRO/GH0*71*.MP4; do echo "file '$f'"; done


I want to add 2 changes to this :


- 

-
List the files in date order (ascending) : I want the list of files to be in date order. But I can't figure out how to add a
-sort
or something to thefor f in
command.

-
Allow a more robust set of file matching/filtering : Right now I can add basic regex like
GH*488.MP4
or, with chapters which increments the first number, something likeGH0[123]488.MP4
would work to just get the first few. But when I change it to be more flexible likeGH0[0-9]71[0-9][0-9].MP4
- which would be necessary to match all files that were recorded yesterday, but nothing before then, the command doesn't like this regex. It seems to only accept a*
.







I looked at a few examples like https://opensource.com/article/19/6/how-write-loop-bash but there wasn't much more than just listing files.


This boils down to a terminal command and isn't really related to FFMPEG but I hope it's helpful context.


I imagined it would be something like this, but this definitely doesn't work :


for f in (find /Volumes/GoPro8/DCIM/100GOPRO/GH0[0-9]71[0-9][0-9].MP4 -type f | sort); do echo "file '$f'"; done


I'd appreciate any help ! Thanks !


Update


It looks like sorting isn't easy with Mac tools so I gave up and wrote a much simpler Ruby script that could execute everything for me. This is not really an answer to my question above but it is a solution.


Here I can easily write the text file necessary for ffmpeg and I can also filter files with a regex on the name, filter for a particular date, and size. Then, via the script, simply execute the ffmpeg command with args to concat files. I can also have it immediately resample the file to compress it (gopro videos are giant and I'm ok with a much lower bitrate if I want to save raw footage).


I got lucky with this
Dir.entries
in Ruby - it seems to automatically sort by date ? I don't know how to sort it otherwise.

PATH = '/Volumes/GoPro8/DCIM/100GOPRO/'
NEW_FILENAME = '/folder/new-file.mp4'
video_list = '/folder/ffmpeg-list.txt'

# create the text file
File.delete(video_list) if File.exist?(video_list)
i = 1
Dir.entries(PATH).each do |f|
 d = File.mtime(PATH + f)
 size = File.size(PATH + f)
 if f.match(/GH0.*.MP4/) && d.to_s.match(/2020-07-30/) && size.to_i < 1000000000
 puts "#{i}\t#{f}\t#{d}\t#{size}"
 File.write(video_list, "file #{PATH + f}\n", mode: "a")
 i= i+1
 end
end

command = "ffmpeg -f concat -safe 0 -i #{video_list} -c copy #{NEW_FILENAME}"

puts "executing concatenate..."
puts command
system(command)



-