
Recherche avancée
Autres articles (16)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (4310)
-
How to add day suffix[st,nd,rd,th] in timestamp's date in ffmpeg command ? [duplicate]
16 décembre 2019, par Milan TejaniThis question already has an answer here :
I am using this command to add time stamp in video :
ffmpeg -y -i input.mp4 -vf "drawtext=fontfile=roboto.ttf:fontsize=36:fontcolor=yellow:text='%{pts\:gmtime\:1575526882\:%d %b, %Y %I\\\:%M %p}'" -preset ultrafast -f mp4 output.mp4
this command generate date & time :
05 Dec, 2019 06:21 AM
but i want to add day suffix after day in date like this :
05th Dec, 2019 06:21 AM
//like 1st,2nd,3rd,4th,5th.... etc
what changes i have to do to achieve this ?
-
syncing a video file with audio using ffmpeg is returning a video without audio
31 juillet 2019, par abboodWhen I attempt to sync a .mov video with an .m4a audio file using ffmpeg like so
ffmpeg -ss 00:00:2 -i test.m4a -i test.mov -c:v copy -c:a aac -strict experimental output.mp4
it works like a charm. But right now I’ve recorded a usability test video using adobe XD, and it returned an .mp4 (MPEG-4) video and I manually recorded the audio using quicktimre returning a .m4a audio file.
Trying to merge them using ffmpeg is returning a video without any audio :
ffmpeg -i video.mp4 -i audio.m4a -c:v copy -c:a aac -strict experimental output.mp4
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2019-07-31T14:43:18.000000Z
com.apple.quicktime.make: Apple
com.apple.quicktime.model: MacBookPro15,1
com.apple.quicktime.software: Mac OS X 10.14.5 (18F203)
com.apple.quicktime.creationdate: 2019-07-31T17:43:17+0300
Duration: 00:03:46.05, start: 0.000000, bitrate: 498 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 374x812 [SAR 1:1 DAR 187:406], 390 kb/s, 60 fps, 60 tbr, 6k tbn, 12k tbc (default)
Metadata:
creation_time : 2019-07-31T14:43:18.000000Z
handler_name : Core Media Video
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, stereo, fltp, 0 kb/s (default)
Metadata:
creation_time : 2019-07-31T14:43:18.000000Z
handler_name : Core Media Audio
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'audio.m4a':
Metadata:
major_brand : M4A
minor_version : 0
compatible_brands: M4A mp42isom
creation_time : 2019-07-31T14:47:26.000000Z
iTunSMPB : 00000000 00000840 00000000 00000000009DFBC0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Duration: 00:03:54.78, start: 0.047891, bitrate: 225 kb/s
Stream #1:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 224 kb/s (default)
Metadata:
creation_time : 2019-07-31T14:47:26.000000Z
handler_name : Core Media Audio
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0x7fb5a4806a00] Too many bits 16384.000000 > 12288 per frame requested, clamping to max
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
com.apple.quicktime.creationdate: 2019-07-31T17:43:17+0300
com.apple.quicktime.make: Apple
com.apple.quicktime.model: MacBookPro15,1
com.apple.quicktime.software: Mac OS X 10.14.5 (18F203)
encoder : Lavf58.20.100
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 374x812 [SAR 1:1 DAR 187:406], q=2-31, 390 kb/s, 60 fps, 60 tbr, 12k tbn, 6k tbc (default)
Metadata:
creation_time : 2019-07-31T14:43:18.000000Z
handler_name : Core Media Video
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, stereo, fltp, 96 kb/s (default)
Metadata:
creation_time : 2019-07-31T14:43:18.000000Z
handler_name : Core Media Audio
encoder : Lavc58.35.100 aac
frame=13563 fps=0.0 q=-1.0 Lsize= 10903kB time=00:03:46.08 bitrate= 395.1kbits/s speed= 916x
video:10699kB audio:10kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.805767%How can I get around this limitation ?
-
avformat_open_input crash using ffmpeg on android
2 octobre 2019, par Timmy KI am writing an Android app to capture audio streams from a USB device using ffmpeg, and mux them into an m4a file. I then open the recording file to read back the audio data. The app works fine on Samsung S8 (Android 8.0) and S9 (Android 9.0). On a Moto G5+ (Android 8.1), however the app crashes inside avformat_open_input() when I try to open the recording file ; but if I restart the app and it reads the same file with the same code, it works without crashing.
I thought maybe that I hadn’t closed the recording file properly ; or there was maybe a race condition : trying to read the file before it was written. However I have established that av_write_trailer() is called successfully and avio_closep() is called successfully before the call to avformat_open_input. I also established that the length of the file is the same just before the call to avformat_open_input() in the crash case as it is in the non-crash case.
The code that finishes the recording :
// AVFormatContext *mAvFormatContext
// ...
int ret = av_write_trailer(mAvFormatContext);
if ( ret != 0 )
{
__android_log_print(ANDROID_LOG_DEBUG, "MyTag", "failed to write trailer %s", av_err2str( ret ) );
goto fail;
}
ret = avio_close( mAvFormatContext->pb );
if ( ret < 0 )
{
__android_log_print(ANDROID_LOG_DEBUG, "MyTag", "failed to avio_close %s", av_err2str( ret ) );
goto fail;
}
avformat_free_context(mAvFormatContext);The call that causes a crash immediately after the above code, on a Moto 5G+ (but not Samsung S8/S9) :
mAvFormatContext = nullptr;
if ( (ret = avformat_open_input( &mAvFormatContext, filePath, 0, 0)) < 0 )
{
__android_log_print(ANDROID_LOG_DEBUG, "MyTag++", "Could not open input file '%s' error %s ", filePath, av_err2str(ret) );
cleanup();
return false;
}Also, when the call to avformat_open_input() does not crash, there is no output in logcat from within that call. However, I’ve noticed that in the crash case there is output of what seems to be corrupted data :
2019-09-02 09:39:14.105 19999-19999/fm.x.y D/AudioEngine: Opening '@�7���-d��@�7�' for
2019-09-02 09:39:14.106 19999-19999/fm.x.y D/AudioEngine: Setting default whitelist '<��'
2019-09-02 09:39:14.106 19999-19999/fm.x.y D/AudioEngine: Probing ���d score:-1828887548 size:-1093138844
2019-09-02 09:39:14.106 19999-19999/fm.x.y D/AudioEngine: Format ��� probed with size=-1093138756 and score=-1093138748
(crash occurs)Any advice on what to look into further to investigate this problem ? Is there something I am missing when cleaning up the muxing state before I try to open the recording file for demuxing ? For simplicity I have not included the freeing of codec contexts, AVFrames and AVPackets.