
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (57)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (5986)
-
How to burn in subtitles onto a webm video with ffmpeg ?
7 mai 2014, par IcanFLYI am trying to set up a livestream with ffserver and ffmpeg. The problem is I am using webm, and I need to burn in subtitles, which are located in a mkv. I am not quite sure how to do this, but here is my ffmpeg config (ffstream.sh) that I am using :
#Livestream script for FFMpeg/FFServer
FPS=24 # Stream FPS.
GOP=48 # GOP Should be double of FPS.
THREADS=4 # How many threads.
DEADLINE=realtime # Speed preset, realtime is fastest.
FRAMELAG=16 # How many frames to seek ahead (max 25)
QMAX=52 # More = less quality.
QMIN=10 # Less = more quality.
VBITRATE=1M # Target Bitrate.
BITRATE=3000k # Bitrate.
AUDIBR=48k # Audio Bitrate.
SERVER=<myserver>:8090/feed.ffm # Server stream endpoint.
LOGLEVEL=verbose # Logging verbosity level.
for f in $@; do ffmpeg -re -i $f\
-vf subtitles=$f\
-g $GOP -loglevel $LOGLEVEL\
-c:v:0 libvpx -threads $THREADS -b:v $BITRATE -vb $VBITRATE -bufsize $BITRATE\
-qmax $QMAX -qmin $QMIN -deadline $DEADLINE -lag-in-frames $FRAMELAG\
-c:a libvorbis -b:a $AUDIBR\
"http://$SERVER"
done
</myserver>Everything connects fine and I can get audio and video to play, however I cannot seem to get the subtitles to show up. Here is my output (I quit out of it) :
Stream mapping:
Stream #0:1 -> #0:0 (flac -> libvorbis)
Stream #0:0 -> #0:1 (h264 -> libvpx)
Press [q] to stop, [?] for help
[output stream 0:0 @ 0x1e77dc0] 100 buffers queued in output stream 0:0, something may be wrong.
frame= 232 fps= 23 q=0.0 Lsize= 816kB time=00:00:09.67 bitrate= 690.8kbits/s
video:758kB audio:41kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 2.113806%
Input file #0 (<file>.mkv):
Input stream #0:0 (video): 242 packets read (3343775 bytes); 242 frames decoded;
Input stream #0:1 (audio): 118 packets read (391060 bytes); 118 frames decoded (483328 samples);
Input stream #0:2 (audio): 8 packets read (20480 bytes);
Input stream #0:3 (subtitle): 1 packets read (182 bytes);
Input stream #0:4 (subtitle): 1 packets read (52 bytes);
Input stream #0:5 (attachment): 0 packets read (0 bytes);
Total: 370 packets (3755549 bytes) demuxed
Output file #0 (http://<myserver>/feed.ffm):
Output stream #0:0 (audio): 3233 frames encoded (206912 samples); 406 packets muxed (41937 bytes);
Output stream #0:1 (video): 232 frames encoded; 232 packets muxed (776350 bytes);
Total: 638 packets (818287 bytes) muxed
Received signal 2: terminating.
</myserver></file>Also here is my ffserver config, not sure if there is something in here stopping the subtitles from showing up :
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
<feed>
File /path/to/folder/tmp/feed.ffm
FileMaxSize 100M
#Allow localhost
ACL allow 127.0.0.1
ACL allow <myip>
#It might be a good idea to add your stream source here.
</myip></feed>
<stream>
Feed feed.ffm
Format webm
VideoSize hd720 #Must be set here, all input files will be scaled to fit.
AVOptionVideo flags +global_header
AVOptionAudio flags +global_header
StartSendOnKey
</stream>
<stream>
Format status
ACL allow localhost
</stream>
# Redirect index.html to the appropriate site
<redirect>
URL http://<myserver>
</myserver></redirect>Any help on how to do this, would be grateful.
-
How to fix this script - recursive ffmpeg encoding
15 août 2019, par Gabriel LuzI’ve downloaded some videos from my course and I think they are too big. I need to reencode them to something better and smaller.
The problem is I made the script but it saves the file in the first folder. I want the output files inside the same folder as the input files. For example :Folder 1
- script.sh
Folder 2
- file1.mp4
- file1.new
Folder 3
- file2.mp4
- file2.newI’ve tried using the for loop only, and it was working actually but I couldn’t encode the files recursively. This wouldn’t work. Using find solved the problem, but now the output files are all in the same directory, which is the same directory where the script is located (working directory).
IFS=$'\n'; set -f
for i in $(find . -name '*.mp4'); do
if ($width > 600) && ($width < 800); then
echo "$i is a 720p video. Let's encode it to VP9."
notify-send Shrinker "Beginning encoding filename "$i""
ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1280x720 -b:v 1800k \
-minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
-quality good -crf 32 -c:v libvpx-vp9 -c:a libopus \
-pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1280x720 -b:v 1800k \
-minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
-quality good -crf 32 -c:v libvpx-vp9 -c:a libopus \
-pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
elif ($width > 800) && ($width < 1081) && ($fps < 31.000); then
echo "$i is a 1080p video with 30fps or maybe less. Let's encode it to VP9."
ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 1800k \
-minrate 900k -maxrate 2610k -tile-columns 2 -g 240 -threads 8 \
-quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
-pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 1800k \
-minrate 900k -maxrate 2610k -tile-columns 4 -g 240 -threads 8 \
-quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
-pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
notify-send Shrinker "Beginning encoding filename "$i""
elif ($width > 800) && ($width < 1081) && ($fps > 49.000); then
echo "$i is a 1080p video with 50fps or maybe more. Let's encode it to VP9."
ffmpeg -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 3000k \
-minrate 1500k -maxrate 4350k -tile-columns 2 -g 240 -threads 8 \
-quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
-pass 1 -speed 4 "$(basename "${i/.mp4}")".webm && \
ffmpeg -y -i "$i" -vf mpdecimate,setpts=N/FRAME_RATE/TB -vf scale=1920x1080 -b:v 3000k \
-minrate 1500k -maxrate 4350k -tile-columns 4 -g 240 -threads 8 \
-quality good -crf 31 -c:v libvpx-vp9 -c:a libopus \
-pass 2 -speed 4 -y "$(basename "${i/.mp4}")".webm
notify-send Shrinker "Beginning encoding filename "$i""
else
echo "no file found"
fi
doneMy script finds every file and encodes them BUT the output files are saved into folder 1. It should save on folder 2 and folder 3.
I get this:
Folder 1
- script.sh
- file1.webm
- file2.webm
Folder 2
- file1.mp4
Folder 3
- file2.mp4
I want this:
Folder 1
- script.sh
Folder 2
- file1.mp4
- file1.webm
Folder 3
- file2.mp4
- file2.webm -
ffmpeg background worker runs in debug but not in application
2 novembre 2019, par PurgitoriaMy application has a function of taking captured images and using an FFmpeg background worker to stitch these into a time-lapse video. The GUI has some simple options for video quality and for the source folder and output file. I had an older version of my application written in VB.NET and that worked without issue but I am rewriting in C# as it supports additional capture and filter capability in the image processing but am having real trouble figuring out what is wrong with this function.
I have tried relocating FFmpeg to different locations just in case it was a permissions issue but that had no effect and I also tried to put the function in a "try" with a message box to output any exceptions but I got different errors that prevented me from compiling the code. When I run the application from within VS 2015 in the debugging tool the function works just fine and it will create a video from a collection of still images but when I build and install the application it does not work at all and I cannot see what is causing it to fail. In the options for ffmpeg I used the -report to output a log of what happens in the background worker and in debug, it creates this log but from the application, it does not so I presume it is not even running ffmpeg and going straight to the completed stage of the function.
Function startConversion()
CheckForIllegalCrossThreadCalls = False
Dim quality As Integer = trbQuality.Value
Dim input As String = tbFolderOpen.Text
Dim output As String = tbFolderSave.Text
Dim exepath As String = Application.StartupPath + "\\bin\ffmpeg.exe"
input = input & "\SCAImg_%1d.bmp"
input = Chr(34) & input & Chr(34)
output = Chr(34) & output & Chr(34)
Dim sr As StreamReader
Dim ffmpegOutput As String
' all parameters required to run the process
proc.StartInfo.UseShellExecute = False
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.RedirectStandardError = True
proc.StartInfo.FileName = exepath
proc.StartInfo.Arguments = "-framerate 25 -start_number 0 -pattern_type sequence -framerate 10 -i " & input & " -r 10 -c:v libx264 -preset slow -crf " & quality & " " & output
proc.Start()
lblInfo.Text = "Conversion in progress... Please wait..."
sr = proc.StandardError 'standard error is used by ffmpeg
btnMakeVideo.Enabled = False
Do
ffmpegOutput = sr.ReadLine
tbProgress.Text = ffmpegOutput
Loop Until proc.HasExited And ffmpegOutput = Nothing Or ffmpegOutput = ""
tbProgress.Text = "Finished !"
lblInfo.Text = "Completed!"
MsgBox("Completed!", MsgBoxStyle.Exclamation)
btnMakeVideo.Enabled = True
Return 0
End FunctionI checked the application folder and it does contain a subfolder \bin withe the ffmpeg.exe located within the folder so I then used cmd to run an instance of the installed ffmpeg from the application folder and it seemed to be throwing out permissions errors :
Failed to open report "ffmpeg-20191101-191452.log" : Permission denied
Failed to set value ’1’ for option ’report’ : Permission denied
Error parsing global options : Permission deniedThis seems then like it is certainly a permissions problem but where I am not sure. I did not run into this error when using VB.NET so I am wondering where I am going wrong now. I thought perhaps it would just be a write permission in the application folder so I the removed the -report and ran ffmpeg again using cmd from my application folder and it then gave the error
C :\Users\CEAstro\Pictures\AnytimeCap : Permission denied
Am I missing something really obvious in my code or is there something more fundamental I have wrong in my setup ?
I should also add that I tried running ffmpeg via cmd from a copy that was manually placed elsewhere (i used the same file) and that actually worked. For some reason, it seems like it just will not work from wherever my application installs it.