
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (67)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (14141)
-
Unable to pass parameters in seconds to FFMpeg afade audio filter
9 septembre 2020, par Anton SerovI'm trying to use afade FFmpeg filter and it does not work as expected. I'm not able to pass its start and duration parameters in seconds.
With this string :



afilter=afade=t=out:st=1:d=0:curve=par




my afade filter starts fading from the very first frame. So I don't have any audio neither on the first nor on any other frames.
But if I set a magic number of 208 as the fade-out start time :



afilter=afade=t=out:st=208:d=0:curve=par




it starts working after 1 second (RMS turns into infinity on fade) :



...
Frame=0.501 Samples=23543 RMS=-35.186275
Frame=0.535 Samples=25014 RMS=-37.393734
Frame=0.568 Samples=26486 RMS=-40.655666
Frame=0.602 Samples=27957 RMS=-38.321899
Frame=0.635 Samples=29429 RMS=-41.370567
Frame=0.669 Samples=30900 RMS=-39.316444
Frame=0.702 Samples=32372 RMS=-27.994545
Frame=0.735 Samples=33843 RMS=-23.577181
Frame=0.769 Samples=35315 RMS=-22.933538
Frame=0.802 Samples=36786 RMS=-25.900106
Frame=0.836 Samples=38258 RMS=-26.836918
Frame=0.869 Samples=39729 RMS=-29.685308
Frame=0.902 Samples=41201 RMS=-32.493404
Frame=0.936 Samples=42672 RMS=-32.552109
Frame=0.969 Samples=44144 RMS=-42.384045
Frame=1.003 Samples=45615 RMS=-inf
Frame=1.036 Samples=47087 RMS=-inf
Frame=1.070 Samples=48558 RMS=-inf
Frame=1.103 Samples=50029 RMS=-inf
Frame=1.136 Samples=51501 RMS=-inf
Frame=1.170 Samples=52972 RMS=-inf
Frame=1.203 Samples=54444 RMS=-inf
Frame=1.237 Samples=55915 RMS=-inf
Frame=1.270 Samples=57387 RMS=-inf
Frame=1.304 Samples=58858 RMS=-inf
Frame=1.337 Samples=60330 RMS=-inf
Frame=1.370 Samples=61801 RMS=-inf
Frame=1.404 Samples=63273 RMS=-inf
Frame=1.437 Samples=64744 RMS=-inf
Frame=1.471 Samples=66216 RMS=-inf
Frame=1.504 Samples=67687 RMS=-inf




Seems like I have to multiple my starting time in seconds by that strange coefficient of 208 (I found this value experimentally for 44100 Hz sample rate). The same thing is with duration parameter. To set a duration of N seconds I should pass N*208 as a parameter. For other sample rates this coefficient changes.



So maybe there is something wrong with my filter graph initialization ?



This is my code for filter graph initialization (almost copied it from some example) :



int _InitFilterGraph(const char *_pszFilterDesc, AVFrame* _pFrame, AVRational* _pTimeBase)
{
 const AVFilter *pBufferSrc = avfilter_get_by_name( "abuffer" );
 const AVFilter *pBufferSink = avfilter_get_by_name( "abuffersink" );
 AVFilterInOut *pOutputs = avfilter_inout_alloc();
 AVFilterInOut *pInputs = avfilter_inout_alloc();

 AVSampleFormat out_sample_fmts[] = { (AVSampleFormat)_pFrame->format, (AVSampleFormat)-1 };
 int64_t out_channel_layouts[] = { (int64_t)_pFrame->channel_layout, -1 };
 int out_sample_rates[] = { _pFrame->sample_rate, -1 };

 m_pFilterGraph = avfilter_graph_alloc();

 // Buffer audio source: the decoded frames from the decoder will be inserted here.
 char args[512] = {};
 snprintf( args, sizeof(args), "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%llx",
 _pTimeBase->num, _pTimeBase->den,
 _pFrame->sample_rate, av_get_sample_fmt_name( (AVSampleFormat)_pFrame->format ),
 _pFrame->channel_layout );

 int nRet = avfilter_graph_create_filter( &m_pBufferSrcCtx, pBufferSrc, "in",
 args, NULL, m_pFilterGraph );
 if( nRet < 0 ) goto final;

 // Buffer audio sink: to terminate the filter chain.
 AVABufferSinkParams *pBufferSinkParams = av_abuffersink_params_alloc();
 pBufferSinkParams->all_channel_counts = _pFrame->channels;

 nRet = avfilter_graph_create_filter( &m_pBufferSinkCtx, pBufferSink, "out",
 NULL, pBufferSinkParams, m_pFilterGraph );
 av_free( pBufferSinkParams );
 if( nRet < 0 ) goto final;

 nRet = av_opt_set_int_list( m_pBufferSinkCtx, "sample_fmts", out_sample_fmts, -1,
 AV_OPT_SEARCH_CHILDREN );
 if( nRet < 0 ) goto final;

 nRet = av_opt_set_int_list( m_pBufferSinkCtx, "channel_layouts", out_channel_layouts, -1,
 AV_OPT_SEARCH_CHILDREN );
 if( nRet < 0 ) goto final;

 nRet = av_opt_set_int_list( m_pBufferSinkCtx, "sample_rates", out_sample_rates, -1,
 AV_OPT_SEARCH_CHILDREN );
 if( nRet < 0 ) goto final;

 // Endpoints for the filter graph.
 pOutputs->name = av_strdup( "in" );
 pOutputs->filter_ctx = m_pBufferSrcCtx;
 pOutputs->pad_idx = 0;
 pOutputs->next = NULL;

 pInputs->name = av_strdup( "out" );
 pInputs->filter_ctx = m_pBufferSinkCtx;
 pInputs->pad_idx = 0;
 pInputs->next = NULL;

 nRet = avfilter_graph_parse_ptr( m_pFilterGraph, _pszFilterDesc, &pInputs, &pOutputs, NULL );
 if( nRet < 0 ) goto final;

 nRet = avfilter_graph_config( m_pFilterGraph, NULL );

final:
 avfilter_inout_free( &pInputs );
 avfilter_inout_free( &pOutputs );

 return nRet;
}



-
Trim video from end to 10 seconds FFMPEG [duplicate]
26 octobre 2019, par Роман ДэффиThis question is an exact duplicate of :
-
Cut end of multiple videos
2 answers
I’ve already read a lot of things. Cannot trim video from the end of ffmpeg.
You need to find out the duration and delete the last 10 seconds of the video.
The video in the video folder, but I can’t detect the video in a variable. Help who can !bat file :
for %%i in (vids\*) do (
MediaInfo.exe --Inform=Video;%%Duration/String3 %% video.mp4"') do set
dur=%%i
echo %dur%
) -
Cut end of multiple videos
-
Ffmpeg- Split the video into 30 seconds chunks in android [duplicate]
23 novembre 2019, par Corgi MogiThis question is an exact duplicate of :
I am trying to split a video file into 30 second blocks.
I do not need to specify where the 30 seconds start or finish.
EXAMPLE- A single 45 second video will be split into VID1_part1 (30 seconds), VID1_part2 (15 seconds).Right now I am using the Ffmpeg command where I need to specify the starting and ending point.
String[] complexCommand = {"-ss", "" + startMs / 1000, "-y", "-i", yourRealPath, "-t", "" + (endMs - startMs) / 1000,"-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath};
I also tried to add a for loop in order to repeat the process
int start, end;
for (int i = 0; i <= duration; i = i + 30) {
start = i;
end = start + 30;
String[] complexCommand = {"-ss", "" + start, "-y", "-i", yourRealPath, "-t", "" + end,"-vcodec", "mpeg4", "-b:v", "2097152", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath};
execFFmpegBinary(complexCommand);
}But didn’t workout
This works fine.
But I want the command through I can split a single video into 30 second chunks.
And should I use a single command for this purpose or a series of commands ?
Help is much appreciated