
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (91)
-
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. -
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 (...)
Sur d’autres sites (6899)
-
FFMPEG Concat Videos with audio on some and not others
8 novembre 2022, par JacobI am rendering video from a camcorder with its perspective audio. I am then concatenating several of the rendered video files together to make one video file. The problem I am having is that some videos will need audio and some will not, depending on the user's preference. If all of the videos need audio or all of the videos do not need audio, all works well. However, if audio is selected on some and not others, I have problems. For example, if I have three videos that need to be concatenated, the first has audio, the second does not have audio and third does have audio, then the final rendered file plays the audio of the third video on the second video and no audio on the third.


Below is the parameters for rendering each video file with audio :


parameters = "-y -i " + frames[0].VideoPath + " -f lavfi -t " + frames[1].TimeCode.TotalSeconds + @" -i anullsrc -filter_complex " + '"' + "[0:v]trim=" + frames[0].TimeCode.TotalSeconds + ":" + frames[1].TimeCode.TotalSeconds +
 @", setpts=PTS-STARTPTS[trimedv0];[0:a]atrim=" + frames[0].TimeCode.TotalSeconds + ":" + frames[1].TimeCode.TotalSeconds + @", asetpts=PTS-STARTPTS[a];[trimedv0]yadif," + orientation + @"setsar=1/1, eq=contrast=1:brightness=0, drawtext=text=\'%{pts\:localtime\:" + ToUnixTimestamp(frames[0].FrameTime) +
 @"\:'" + CurrentDisplayDateFormat.DateOutputFormat + @"'}\'" + @":fontfile=\'Fonts/" + font.FirstOrDefault() + @"\':fontcolor=" + fontColor + ":x=" + DATEXOFF +
 ":y=" + DATEYOFF + " -th:fontsize=" + tempFont +
 @":box=1:boxcolor=" + boxColor + @"@" + opacity + @", drawtext=text=\'%{pts\:localtime\:" + ToUnixTimestamp(frames[0].FrameTime) + @"\:'" + CurrentDisplayDateFormat.TimeOutputFormat + @"'}\'" + @":fontfile=\'Fonts/" + font.FirstOrDefault() + @"\':fontcolor=" + fontColor +
 ":x=" + TIMEXOFF + ":y=" + TIMEYOFF +
 " -th:fontsize=" + tempFont + @":box=1:boxcolor=" + boxColor + @"@" + opacity + '"' + " -sn -map [a] -shortest -ac 2 -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 -pix_fmt yuv420p -f mpegts -c:a aac " +
 vidPath + @"\v" + outputFile.ToString() + ".TMP";



Below is the parameters without audio :


parameters = "-y -i " + frames[0].VideoPath + " -filter_complex " + '"' + "[0:v] trim=" + frames[0].TimeCode.TotalSeconds + ":" + frames[1].TimeCode.TotalSeconds +
 @", setpts=PTS-STARTPTS[trimedv0];[trimedv0]yadif," + orientation + @"setsar=1/1, eq=contrast=1:brightness=0, drawtext=text=\'%{pts\:localtime\:" + ToUnixTimestamp(frames[0].FrameTime) +
 @"\:'" + CurrentDisplayDateFormat.DateOutputFormat + @"'}\'" + @":fontfile =\'Fonts/" + font.FirstOrDefault() + @"\':fontcolor=" + fontColor + ":x=" + DATEXOFF +
 ":y=" + DATEYOFF + " -th:fontsize=" + tempFont +
 @":box=1:boxcolor=" + boxColor + @"@" + opacity + @", drawtext=text=\'%{pts\:localtime\:" + ToUnixTimestamp(frames[0].FrameTime) + @"\:'" + CurrentDisplayDateFormat.TimeOutputFormat + @"'}\'" + @":fontfile =\'Fonts/" + font.FirstOrDefault() + @"\':fontcolor=" + fontColor +
 ":x=" + TIMEXOFF + ":y=" + TIMEYOFF +
 " -th:fontsize=" + tempFont + @":box=1:boxcolor=" + boxColor + @"@" + opacity + '"' + " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " +
 @"-pix_fmt yuv420p -f mpegts " + vidPath + @"\v" + outputFile.ToString() + ".TMP";



Below is the parameters to concatenate the video files to one file :


string parameters = "-probesize 100M -analyzeduration 100M -i concat:" + '"' + concatString + '"' + @" -c:v copy " + ExportOptions.CompleteDestinationPath;



 



-
How to apply 2 filters drawtext and drawbox using FFMPEG
9 juillet 2017, par user6972I’m having problems combining filters. I’m trying to take video from the camera, apply a timer on it and also overlay a box in the center. I can put a time code (local time and pts) using the -vf drawtext command no problems :
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \
-vf "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
text='%{localtime} %{pts\:hms}': fontcolor=white: fontsize=24: box=1: \
boxcolor=black@0.8: boxborderw=5: x=0: y=0" -vcodec libx264 \
-preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4Then I have one that draws a small box using drawbox :
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 \
-filter_complex " drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": \
-vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4I assumed I could combine these with the filter_complex switch and separate them using the semicolon like this
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='%{localtime} %{pts\:hms}': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.8;drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": -vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4
But it fails to find the input stream on the second filter :
Input #0, video4linux2,v4l2, from ’/dev/video0’ :
Duration : N/A, start : 10651.720690, bitrate : N/A
Stream #0:0 : Video : mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_drawbox_1
I tried to direct it to [0] like this :
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex " \
drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
text='%{localtime} %{pts\:hms}': fontcolor=white: fontsize=24: box=1: \
boxcolor=black@0.8;[0] drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1": \
-vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4But it fails to put the box on the output.
So I tried to split streams like this
ffmpeg -f video4linux2 -input_format mjpeg -s 1280x720 -i /dev/video0 -filter_complex " \
split [main][tmp];\
[main] drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: \
text='%{localtime} %{pts\:hms}': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.8 [tmp];\
[main] drawbox=x=iw/2:y=0:w=10:h=ih:color=red@0.1 [tmp2]; [tmp][tmp2] overlay": \
-vcodec libx264 -preset ultrafast -f mp4 -pix_fmt yuv420p -y output.mp4But my build doesn’t have the overlay filter complied with it. At this point I decided to stop and ask if I’m making this harder than it should be. The end result is I just want a timer and a box drawn on the video. Is there a better way or a formatting trick to do this ?
Thanks
-
Overlaying text on video with required angle using FFMPEG
24 septembre 2017, par Harsha VardhanI am trying to overlay some text on video using ffmpeg. I am able to overlay text by the bellow command.
ffmpeg -i input1.mp4 -filter_complex "[0:v]transpose=2[anticlockwiserotated];[anticlockwiserotated]drawtext=fontfile=../../public/fonts/Roboto-Regular-webfont.ttf: text='Test Text':x=100: y=50: fontsize=36: fontcolor=white:[textapplied];[textapplied]transpose=1" output_video.mp4
It is allowing me to overlay horizontally or vertically only.
But I want to append it with some angle like 45 degrees.
For that if I modify the command as
ffmpeg -i input1.mp4 -filter_complex "[0:v]rotate=45*PI/180[anticlockwiserotated];[anticlockwiserotated]drawtext=fontfile=../../public/fonts/Roboto-Regular-webfont.ttf: text='Test Text':x=100: y=50: fontsize=36: fontcolor=white:[textapplied];[textapplied]rotate=315*PI/180" output_video.mp4
By this I am getting overlay video as :
Because in this first I am rotating video to 45 degrees, appending text and bringing it back to original position. So I am loosing borders.
Please suggest me the best way to overlay text with required angle on video.
Thanks in advance.