
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
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 (63)
-
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" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (10541)
-
Conversion Rate Optimisation Statistics for 2024 and Beyond
21 novembre 2023, par Erin — Analytics Tips -
ffmpeg : videos before and after conversion aren't the same length
16 juillet 2012, par KoyotI have a set of .mov videos which require conversion to .mp4 format. I'm using ffmpeg and running this command :
ffmpeg -i Banking.mov -vsync -async -sameq -ac 1 -ab 64k -ar 44100 Banking.mp4
There is a slight difference between input and output video in time length (00:03:35.407 and 00:03:35.582). And here's the catch - I'm storing time cue set at precise times in a file which is used by a program to point at specific scenes. The 0.1 second difference causes it to point at wrong scenes, therefore making the cue set useless. Is there any possibility to preserve exactly the same time in different format ?
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice BellardMac OSX universal build for ffmpegX
configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
libavutil version: 49.0.0
libavcodec version: 51.9.0
libavformat version: 50.4.0
built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5597b8]negative ctts, ignoring
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Banking.mov':
Duration: 00:03:35.6, start: 0.000000, bitrate: 1400 kb/s
Stream #0.0(eng): Audio: pcm_s16be, 24000 Hz, stereo, 768 kb/s
Stream #0.1(eng), 29.97 fps(r): Video: h264, yuv420p, 720x480
Output #0, mp4, to 'Banking.mp4':
Stream #0.0, 29.97 fps(c): Video: mpeg4, yuv420p, 720x480, q=2-31, 200 kb/s
Stream #0.1: Audio: aac, 44100 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
frame= 6461 q=0.0 Lsize= 53181kB time=215.3 bitrate=2023.3kbits/s
video:51437kB audio:1618kB global headers:0kB muxing overhead 0.237816% -
FFMPEG Pipeline Crash [closed]
17 août 2023, par Badgio10177I instantiate an ffmpeg pipeline within C++. No frames get streamed to the RTSP server and the pipeline crashes unexpectedly.


I have the following code :


#include <iostream>
#include <typeinfo>
#include "opencvmex.hpp"
#include 
#include 
#include "mex.h"
#include 
#include 
#include // Windows API for process enumeration
#include <opencv2></opencv2>core.hpp>

// Global variables
FILE* openPipeLine = NULL;

//////////////////////////////////////////////////////////////////////////////
// Exit function to execute when the mex function is cleared.
//////////////////////////////////////////////////////////////////////////////
void exitFcn()
{
 fflush(openPipeLine); // Clear out the pipeline.
 _pclose(openPipeLine); //Close the pipeline.
}

///////////////////////////////////////////////////////////////////////////
// Main entry point to a MEX function
///////////////////////////////////////////////////////////////////////////
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], int frameWidth, int frameHeight)
{
 // Use the appropriate namespace for OpenCV functions
 using namespace cv;

 Ptr<mat> inputFrame = ocvMxArrayToImage_uint8(prhs[0], true);
 Mat processedFrame = *inputFrame;

 // Check if FFMPEG process has been started
 if (!openPipeLine)
 {
 openPipeLine = _popen("ffmpeg -f rawvideo -r 10 -video_size 1280x720 -pixel_format bgr24 -i pipe: -vcodec libx264 -crf 25 -pix_fmt yuv420p -f rtsp rtsp://192.168.0.2:8554/mystream 2> log.txt", "wb");
 }

 // Write the frame data to the pipeline
 fwrite(processedFrame.data, 1, frameWidth * frameHeight * 3, openPipeLine);
 mexAtExit(exitFcn);
}



</mat></typeinfo></iostream>


The function is a Matlab Mex function. What is interesting is that there are certain times when the stream works and some times it just crashes. The log file for the ffmpeg process is the following :


ffmpeg version 2023-08-14-git-c704901324-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 16.101 / 58. 16.101
 libavcodec 60. 23.100 / 60. 23.100
 libavformat 60. 10.100 / 60. 10.100
 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 11.100 / 9. 11.100
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
Input #0, rawvideo, from 'pipe:':
 Duration: N/A, start: 0.000000, bitrate: 221184 kb/s
 Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 221184 kb/s, 10 tbr, 10 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
[libx264 @ 0000027964ad6300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
[libx264 @ 0000027964ad6300] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0000027964ad6300] 264 - core 164 r3107 a8b68eb - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=22 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, rtsp, to 'rtsp://192.168.0.2:8554/mystream':
 Metadata:
 encoder : Lavf60.10.100
 Stream #0:0: Video: h264, yuv420p(tv, progressive), 1280x720, q=2-31, 10 fps, 90k tbn
 Metadata:
 encoder : Lavc60.23.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A 
[vost#0:0/libx264 @ 0000027964ad5f00] Error submitting a packet to the muxer: Broken pipe
[out#0/rtsp @ 0000027964abdf00] Error muxing a packet
frame= 1 fps=0.1 q=27.0 size=N/A time=-00:00:00.10 bitrate=N/A speed=N/A 
[out#0/rtsp @ 0000027964abdf00] video:146kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 1 fps=0.0 q=-1.0 Lsize=N/A time=00:00:06.50 bitrate=N/A speed=0.32x 
[libx264 @ 0000027964ad6300] frame I:1 Avg QP:26.79 size:148574
[libx264 @ 0000027964ad6300] frame P:17 Avg QP:21.66 size: 23672
[libx264 @ 0000027964ad6300] frame B:50 Avg QP:28.20 size: 3276
[libx264 @ 0000027964ad6300] consecutive B-frames: 1.5% 0.0% 4.4% 94.1%
[libx264 @ 0000027964ad6300] mb I I16..4: 1.1% 53.0% 45.9%
[libx264 @ 0000027964ad6300] mb P I16..4: 1.8% 9.3% 1.2% P16..4: 29.5% 10.2% 14.0% 0.0% 0.0% skip:34.0%
[libx264 @ 0000027964ad6300] mb B I16..4: 0.1% 0.5% 0.0% B16..8: 21.1% 3.3% 1.3% direct: 2.0% skip:71.7% L0:50.9% L1:46.2% BI: 2.9%
[libx264 @ 0000027964ad6300] 8x8 transform intra:68.9% inter:94.3%
[libx264 @ 0000027964ad6300] coded y,uvDC,uvAC intra: 78.9% 70.2% 26.1% inter: 10.9% 8.9% 1.7%
[libx264 @ 0000027964ad6300] i16 v,h,dc,p: 31% 36% 32% 1%
[libx264 @ 0000027964ad6300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 22% 40% 4% 2% 2% 3% 2% 10%
[libx264 @ 0000027964ad6300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 32% 8% 4% 4% 4% 6% 4% 9%
[libx264 @ 0000027964ad6300] i8c dc,h,v,p: 35% 36% 24% 5%
[libx264 @ 0000027964ad6300] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000027964ad6300] ref P L0: 60.0% 17.6% 9.3% 13.1%
[libx264 @ 0000027964ad6300] ref B L0: 73.1% 20.1% 6.8%
[libx264 @ 0000027964ad6300] ref B L1: 88.0% 12.0%
[libx264 @ 0000027964ad6300] kb/s:840.93
Conversion failed!




Are there any parameters in my pipeline that are causing the process to crash ?