
Recherche avancée
Autres articles (82)
-
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 ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (9411)
-
FFMPEG decoding too slow (avcodec_send_packet() / avcodec_receive_frame())
14 décembre 2022, par DannyI'm using ffmpeg libraries to decode, scale, and re-encode video within an MPEG transport stream. I've just recompiled from source to v3.3.2 and changed from the old avcodec_decode_video2() API to the new send/receive API.



Both the old and new APIs decode the video very slowly.



25 fps video = 1 frame every 40ms. However, I see 70 to 120ms per frame to decode. This is a file translator so need it to run faster than real time.



The code outline is below. Anyone have any ideas on how to improve the decoding speed ? There are other posts about the deprecated
avcodec_decode_video2()
being slow ; none of those were resolved. The new API doesn't run any faster...


gettimeofday(&tv1, NULL);
int rc = av_read_frame(pFormatContext, pESPacket);
gettimeofday(&tv2, NULL);

int ret = avcodec_send_packet(pDecoderContext, pESPacket);
if (ret < 0)
 continue;

ret = avcodec_receive_frame(pDecoderContext, pFrameDec);
if (ret != 0)
{
 printf("avcodec_receive_frame error: %d\n", ret);
 continue;
}
gettimeofday(&tv3, 0);

u_long twoMinusOne = (tv2.tv_sec - tv1.tv_sec) * 1000000 + tv2.tv_usec - tv1.tv_usec;
u_long threeMinusTwo = (tv3.tv_sec - tv2.tv_sec) * 1000000 + tv3.tv_usec - tv2.tv_usec;

size_t pktSize = mPacketQueue.getTsPktListSize();
printf(" DECODE ReadFrame %lu usec, DecodeVideo %lu usec. mTsPacketList %u items\n", twoMinusOne, threeMinusTwo, pktSize);

transcodeFrame(pFrameDec);

// Scale and re-encode //
-- call avscale to downsample
-- call avcodec_encode_video2() to encode




Some Output



DECODE ReadFrame 6 usec, DecodeVideo 154273 usec.
Dump mpFrameEnc with DateTime: 
 AVFrame Info frame 720 X 406. PTS = 305700353 PKT_PTS = 305700353 Linesize[0]=720. Linesize[1]=360. Linesize[2]=360. 
Time taken to ENCODE video frame = 3685 usec. Scaling time 4 usec

DECODE ReadFrame 8 usec, DecodeVideo 128203 usec.
Time taken to ENCODE video frame = 3724 usec. Scaling time 3 usec

DECODE ReadFrame 8 usec, DecodeVideo 69321 usec.
Time taken to ENCODE video frame = 3577 usec. Scaling time 3 usec




FFMPEG Version



Tests running on core2 duo 3.2 GHz, 32-bit Centos 6.



bin/ffmpeg
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
 built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
 configuration: --prefix=/mnt/swdevel/DVStor/source_build/ext/ffmpeg-build --libdir=/mnt/swdevel/DVStor/source_build/ext/ffmpeg-build/lib3p_build --shlibdir=/mnt/swdevel/DVStor/source_build/ext/ffmpeg-build/lib3p_build --disable-static --enable-shared --disable-cuda --disable-cuvid --disable-nvenc --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include/libx264
 libavutil 55. 58.100 / 55. 58.100
 libavcodec 57. 89.100 / 57. 89.100
 libavformat 57. 71.100 / 57. 71.100
 libavdevice 57. 6.100 / 57. 6.100
 libavfilter 6. 82.100 / 6. 82.100
 libswscale 4. 6.100 / 4. 6.100
 libswresample 2. 7.100 / 2. 7.100
 libpostproc 54. 5.100 / 54. 5.100
Hyper fast Audio and Video encoder



-
ffmpeg cannot generate thumbnail
8 mai 2018, par rabbitIn Windows to make a thumbnail with
ffmpeg
I use :./ffmpeg -i 1.mp4 -ss 00:00:01 -f image2 1.jpg
or :
./ffmpeg -ss 00:00:01 -i 1.mp4 -f image2 1.jpg
But none can generate a thumbnail, it displays :
ffmpeg -i input.mp4 -ss 1 -frames:v 1 output.jpg
ffmpeg version N-91013-g8007a86363 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.1 (GCC) 20180406
configuration:
libavutil 56. 18.100 / 56. 18.100
libavcodec 58. 19.101 / 58. 19.101
libavformat 58. 13.102 / 58. 13.102
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 21.100 / 7. 21.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
creation_time : 2017-01-11T08:30:55.000000Z
encoder : My MP4Box GUI 0.6.0.6 /my-mp4box-gui.zymichost.com>
Duration: 00:03:27.93, start: 0.000000, bitrate: 9345 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2560x1440 [SAR 1:1 DAR 16:9], 9216 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
Metadata:
creation_time : 2016-10-14T14:16:02.000000Z
handler_name : videoplayback.mp4
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
creation_time : 2017-01-11T08:30:56.000000Z
handler_name : videoplayback (1).m4a
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x55ad99ffe1c0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'output.jpg':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
encoder : Lavf58.13.102
Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
Metadata:
creation_time : 2016-10-14T14:16:02.000000Z
handler_name : videoplayback.mp4
encoder : Lavc58.19.101 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)and I find that the video which encoder is
My MP4Box GUI 0.6.0.6 /my-mp4box-gui.zymichost.com>
the
ffmpeg
cannot generate thumbnail. And how can I generate the thumbnail ? -
FFmpeg ogg - Invalid data found when processing input
28 juillet 2017, par EarinorI am trying to change the framerate of a Video of mine. Below there is the example Input and the Output. I Built ffmpeg myself and I’m pretty sure I miss the right decoder/demuxer but I have no Idea what I need. I thought —enable-libtheora would be enough to enable, muxers, demuxers, encoder and decoder, but apperently there is somehting missing. Does anybody have an idea about this ?
I have inserted path-to-ffmpeg to make this shorter, the Path itself is okay, so no worries about that.
*path-to-ffmpeg*\ffmpeg>ffmpeg -i Video.ogg -filter "minterpolate='fps=60'" out.ogg
ffmpeg version 3.3.git Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project)
configuration: --disable-encoders --disable-decoder=hevc --disable-decoder=raw
video --disable-decoder=ac3 --disable-decoder=flac --disable-decoder=ffwavesynth
--disable-decoder=libcelt --disable-decoder=libgsm --disable-decoder=libilbc --
disable-decoder=libopus --disable-decoder=dvbsub --disable-decoder=dvdsub --disa
ble-hwaccels --disable-parsers --disable-bsfs --disable-protocols --disable-inde
vs --disable-outdevs --disable-devices --disable-filters --disable-muxers --disa
ble-demuxers --enable-muxer=ogg --enable-zlib --enable-libtheora --enable-libvor
bis --enable-shared --enable-encoder=libtheora --enable-encoder=libvorbis --enab
le-demuxer=image2 --enable-filter=framerate --enable-protocol=file --enable-filt
er=minterpolate --enable-filter=scale
libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 85.100 / 6. 85.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
Video.ogg: Invalid data found when processing input