
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (26)
-
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (3659)
-
why does concatting multiple videos renders no audio ?
19 juin 2015, par dd-sAs the title tells, I’m having issues with FFMPEG concat. It’s not really pertinent to the problem, but perhaps helpful to getting me the correct answer.
app/models/event.rb
class Event < ActiveRecord::Base
has_many :videos
endapp/models/video.rb
class Video < ActiveRecord::Base
belongs_to :event
endapp/jobs/video_concatenator_job.rb
class VideoConcatenatorJob < ActiveJob::Base
queue_as :default
attr_reader :event
def perform(event_id)
@event = Event.find event_id
concatenator = VideoConcatenate.new(video_paths, output_name)
concatenator.call
end
private
def output_name
event.id
end
def video_paths
[intro_video.to_s] + event.videos.live.map { |video| video.event_video.download.path }
end
def intro_video
image = annotate_image
`ffmpeg -loop 1 -i "#{image}" -c:v libx264 -t 5 -pix_fmt yuv420p -y -vf scale=320:240 "#{output_name}"`
end
def annotate_image
return event.intro_image.download.path if event.intro_text.blank?
image = MiniMagick::Image.open event.intro_image.download.path
output = Rails.root.join('tmp', 'ffmpeg', 'intro', "#{event.id}.jpg")
image.combine_options do |c|
. . .
c.annotate '0', "#{event.intro_text}"
. . .
end
image.write output.to_s
output
end
endapp/models/video_concatenate.rb
class VideoConcatenate
attr_accessor :input
attr_reader :file_name
def initialize(input, file_name)
@input = input
@file_name = file_name
end
def call
`ffmpeg -i "concat:#{list_transcoder}" -c copy -bsf:a aac_adtstoasc "#{output}"`
end
private
def output
Rails.root.join("tmp", "ffmpeg", "concatenated", file_name)
end
def list_transcoder
output_array = []
# first transcoding them to mpeg transport stream
input.map(&:to_s).each_with_index do |video, index|
stream = finished_video_path("concatenations", "#{file_name}-#{index}.ts")
`ffmpeg -i "#{video}" -y -c copy -bsf:v h264_mp4toannexb -f mpegts "#{stream}"`
output_array << stream
end
output_array.join("|")
end
endSo when the job is performed. It takes an intro_image and intro_text and annotates that image with MiniMagick. It then takes that annotated image and turns it into a 5 second .mp4. Then it takes that annotated intro video and the video files associated with the event, and concatenated them all into one single .mp4.
If I take out
[intro_video.to_s] +
fromVideoConcatenatorJob.video_paths
then the issue doesn’t happen. something must be wrong with my annotated video. Any help is extremely appreciated. -
Issue installing OpenCV 3.0.0 on Ubuntu 14.04
26 septembre 2015, par marcmanI’ve been trying to install OpenCV on a Linux machine running Ubuntu 14.04. I’ve installed all of the dependencies that I have come across in tutorials as well as those listed on the OpenCV site. However, I’m pretty new to Linux and the Linux file system, so I wouldn’t be terribly surprised if these issues are related to the installation location or something.
It appears that I am getting an issue with FFMPEG stuff, but I definitely have it installed
dpkg -s libgtk2.0-0 | grep '^Version'
returns
Version: 2.24.23-0ubuntu1.3
I’m not quite sure what the issue is here. Below is the error printout. Most of the lines are pretty much identical (I’m assuming the same issue is causing each of these errors). Although I posted the whole thing below for completeness, you can probably get at the issue from one or two of the errors as well as the last line. For brevity’s sake, here are a sample of the errors :
...
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:738:67: error: 'PIX_FMT_RGB24' was not declared in this scope
avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:756:17: error: 'PIX_FMT_BGR24' was not declared in this scope
PIX_FMT_BGR24,
^
...
[ 35%] Built target opencv_photo
make: *** [all] Error 2
$The commands immediately preceding the errors were
$ cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON ..
$ make -j4as taken from the tutorial I linked to above.
Entire error printout :
In file included from /usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'void CvCapture_FFMPEG::close()':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:317:36: error: 'avcodec_free_frame' was not declared in this scope
avcodec_free_frame(&picture);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool CvCapture_FFMPEG::open(const char*)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:632:43: error: 'avcodec_alloc_frame' was not declared in this scope
picture = avcodec_alloc_frame();
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:635:41: error: 'PIX_FMT_BGR24' was not declared in this scope
avpicture_get_size( PIX_FMT_BGR24,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool CvCapture_FFMPEG::retrieveFrame(int, unsigned char**, int*, int*, int*, int*)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:738:67: error: 'PIX_FMT_RGB24' was not declared in this scope
avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:756:17: error: 'PIX_FMT_BGR24' was not declared in this scope
PIX_FMT_BGR24,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In function 'AVFrame* icv_alloc_picture_FFMPEG(int, int, int, bool)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1110:35: error: 'avcodec_alloc_frame' was not declared in this scope
picture = avcodec_alloc_frame();
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1113:33: error: 'PixelFormat' was not declared in this scope
size = avpicture_get_size( (PixelFormat) pix_fmt, width, height);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1122:38: error: expected ')' before 'pix_fmt'
(PixelFormat) pix_fmt, width, height);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: At global scope:
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1104:18: warning: unused parameter 'pix_fmt' [-Wunused-parameter]
static AVFrame * icv_alloc_picture_FFMPEG(int pix_fmt, int width, int height, bool alloc)
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In function 'AVStream* icv_add_video_stream_FFMPEG(AVFormatContext*, AVCodecID, int, int, int, double, int)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1230:19: error: 'PixelFormat' was not declared in this scope
c->pix_fmt = (PixelFormat) pixel_format;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1230:32: error: expected ';' before 'pixel_format'
c->pix_fmt = (PixelFormat) pixel_format;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: At global scope:
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1130:18: warning: unused parameter 'pixel_format' [-Wunused-parameter]
static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool CvVideoWriter_FFMPEG::writeFrame(const unsigned char*, int, int, int, int, int)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1405:26: error: 'PIX_FMT_BGR24' was not declared in this scope
if (input_pix_fmt == PIX_FMT_BGR24) {
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1410:31: error: 'PIX_FMT_GRAY8' was not declared in this scope
else if (input_pix_fmt == PIX_FMT_GRAY8) {
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1423:25: error: 'PixelFormat' was not declared in this scope
(PixelFormat)input_pix_fmt, width, height);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1429:59: error: expected ')' before 'input_pix_fmt'
(PixelFormat)input_pix_fmt,
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1447:25: error: 'PixelFormat' was not declared in this scope
(PixelFormat)input_pix_fmt, width, height);
^
In file included from /usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:0:
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool CvVideoWriter_FFMPEG::open(const char*, int, double, int, int, bool)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1604:25: error: 'PIX_FMT_BGR24' was not declared in this scope
input_pix_fmt = PIX_FMT_BGR24;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1607:25: error: 'PIX_FMT_GRAY8' was not declared in this scope
input_pix_fmt = PIX_FMT_GRAY8;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1683:25: error: 'PIX_FMT_YUV422P' was not declared in this scope
codec_pix_fmt = PIX_FMT_YUV422P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1687:25: error: 'PIX_FMT_YUVJ420P' was not declared in this scope
codec_pix_fmt = PIX_FMT_YUVJ420P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1691:42: error: 'PIX_FMT_GRAY8' was not declared in this scope
codec_pix_fmt = input_pix_fmt == PIX_FMT_GRAY8 ||
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1692:42: error: 'PIX_FMT_GRAY16LE' was not declared in this scope
input_pix_fmt == PIX_FMT_GRAY16LE ||
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1693:42: error: 'PIX_FMT_GRAY16BE' was not declared in this scope
input_pix_fmt == PIX_FMT_GRAY16BE ? input_pix_fmt : PIX_FMT_YUV420P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1693:77: error: 'PIX_FMT_YUV420P' was not declared in this scope
input_pix_fmt == PIX_FMT_GRAY16BE ? input_pix_fmt : PIX_FMT_YUV420P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: At global scope:
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1922:119: error: 'PixelFormat' has not been declared
static AVStream* addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1969:134: error: 'PixelFormat' has not been declared
AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format)
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In static member function 'static AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, AVCodecID, int, int, int, double, int)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2047:16: error: invalid conversion from 'int' to 'AVPixelFormat' [-fpermissive]
c->pix_fmt = pixel_format;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool OutputMediaStream_FFMPEG::open(const char*, int, int, double)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2107:5: error: 'PixelFormat' was not declared in this scope
PixelFormat codec_pix_fmt = PIX_FMT_YUV420P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2107:17: error: expected ';' before 'codec_pix_fmt'
PixelFormat codec_pix_fmt = PIX_FMT_YUV420P;
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2111:99: error: 'codec_pix_fmt' was not declared in this scope
video_st_ = addVideoStream(oc_, codec_id, width, height, width * height * bitrate_scale, fps, codec_pix_fmt);
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function 'bool InputMediaStream_FFMPEG::open(const char*, int*, int*, int*, int*)':
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2316:18: error: 'PIX_FMT_YUV420P' was not declared in this scope
case PIX_FMT_YUV420P:
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2320:18: error: 'PIX_FMT_YUV422P' was not declared in this scope
case PIX_FMT_YUV422P:
^
/usr/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:2324:18: error: 'PIX_FMT_YUV444P' was not declared in this scope
case PIX_FMT_YUV444P:
^
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 35%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/align.cpp.o
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 35%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/seamless_cloning_impl.cpp.o
[ 35%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/hdr_common.cpp.o
[ 35%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/opencl_kernels_photo.cpp.o
Linking CXX shared library ../../lib/libopencv_photo.so
[ 35%] Built target opencv_photo
make: *** [all] Error 2Any insight is greatly appreciated !
-
ffmpeg how to trigger color changes based on time
2 janvier 2021, par Plazar99My goal is to modify the color of an image overlay at specific times in a video file.
I use AI to determine the emotion of the subtitles, and change the background color based on emotions.
I've already figured out the subtitle.srt usage, and I know when to trigger which color.
I need a clue on how to do it in ffmpeg.