
Recherche avancée
Médias (1)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (12993)
-
video is always wrong when using cv::videowriter
24 novembre 2017, par 周远远I have written a test code using cv::videowriter, the video is always wrong(undesired color and shape). But the frames were correct when I saved them via cv::imwrite. The system is centos 7, opencv 2.4.5, ffmpeg 2.6.8
thank a lot ![sorry, I cannot publish the test result, the output aaaaa.jpg is a gray image, but the video capture is a color image with green and pink]#include
#include
#include "/usr/include/opencv/cv.h"
#include "/usr/include/opencv/highgui.h"
int main(int, char**)
{
cv::VideoWriter outputVideo;
outputVideo.open("out.avi", CV_FOURCC('M','J','P','G'), 30, cv::Size(400,400), true);
if (!outputVideo.isOpened()){
printf("aaa\n");
}
cv::Mat frame, f1,f2, f3;
char *Frame_buff = (char *)(malloc(400 * 400 * 3));
for(int iii = 0; iii < 400; iii++) {
for(int jjj = 0; jjj < 400; jjj++) {
Frame_buff[jjj * 400 * 3 + iii * 3 + 0] = iii;
Frame_buff[jjj * 400 * 3 + iii * 3 + 1] = iii;
Frame_buff[jjj * 400 * 3 + iii * 3 + 2] = iii;
}
}
frame = cv::Mat(400, 400, CV_8UC3, Frame_buff);
f1 = cv::Mat(400, 400, CV_8UC3, Frame_buff);
cv::imwrite("aaaaa.jpg", f1);
for(int iii = 0; iii < 400; iii++) {
for(int jjj = 0; jjj < 400; jjj++) {
Frame_buff[jjj * 400 * 3 + iii * 3 + 0] = jjj;
Frame_buff[jjj * 400 * 3 + iii * 3 + 1] = jjj;
Frame_buff[jjj * 400 * 3 + iii * 3 + 2] = jjj;
}
}
f2 = cv::Mat(400, 400, CV_8UC3, cv::Scalar(0, 0, 255));
cv::imwrite("bbbb.jpg", f2);
f3 = cv::Mat(400, 400, CV_8UC3, Frame_buff);
cv::imwrite("cccc.jpg", f3);
for(int i = 0; i < 240; i++){
if(i < 80){
printf("ccc");
outputVideo.write(f1);
}
else if(i<160){
printf("bbb");
outputVideo.write(frame);
}
else{
printf("aaa");
outputVideo.write(f2);
}
}
printf("\n");
getchar();
outputVideo.release();
return 0;
} -
ffmpeg add an audio to a video using apad, but duration not exactly same [closed]
27 avril 2023, par RichardI am using ffmpeg to add an audio to a silent video, and the audio is shorter than the video, so I want to add silence to the end of the audio and make sure they have same duration. I use below command


ffmpeg -i video.mp4 -i audio.mp3 -filter_complex "[1:0]apad" -c:v copy -shortest output.mp4



but the output durations are not exactly the same


- 

- Am I making any mistake here ?
- Is there a way to make them exactly same ?






ffprobe -v error -show_entries stream=codec_type,duration,start_pts,start_time -sexagesimal output.mp4
[STREAM]
codec_type=audio
start_pts=0
start_time=0:00:00.000000
duration=0:00:03.621995
[/STREAM]
[STREAM]
codec_type=video
start_pts=0
start_time=0:00:00.000000
duration=0:00:03.640000
[/STREAM]



input file info


▶ ffmpeg -i video.mp4 
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:00:03.64, start: 0.000000, bitrate: 394 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1080x1920, 390 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]


▶ ffmpeg -i audio.mp3 
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mp3, from 'audio.mp3':
 Metadata:
 TCM : A
 TT1 : xxx
 title : yyy
 encoded_by : ProTranscoderTool (Apple MP3 v1
 Duration: 00:00:02.77, start: 0.000000, bitrate: 271 kb/s
 Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 265 kb/s





-
avcodec/encode : Fix check for allowed LJPEG pixel formats
6 avril 2021, par Andreas Rheinhardtavcodec/encode : Fix check for allowed LJPEG pixel formats
The pix_fmts of the LJPEG encoder already contain all supported pixel
formats (including the ones only supported when strictness is unofficial
or less) ; yet the check in ff_encode_preinit() ignored this list in case
strictness is unofficial or less. But the encoder presumed that it is
always applied and blacklists some of the entries in pix_fmts when
strictness is > unofficial. The result is that if one uses an entry not
on that list and sets strictness to unofficial, said entry passes both
checks and this can lead to segfaults lateron (e.g. when using gray).Fix this by removing the exception for LJPEG in ff_encode_preinit().
Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>