
Recherche avancée
Autres articles (40)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (5732)
-
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;
}



-
php ffmpeg exec & shell_exec process stops after few seconds
6 octobre 2019, par SalemI’m using PHP script file with simple html interface to control FFMPEG process start and stop from the browser , the script goal is start live streaming on my server that usually runs for hours without stop (using ffmpeg and nginx-rtmp )
my script were working perfectly until I notice recently This is strange behaviors
here is my php script variables$cast =" /usr/sbin/ffmpeg -loglevel 0 -thread_queue_size 32768 -re -i '".$src."' -i /var/www/example/logo.png -r 23.976 -strict -2 480x360 -aspect 16:9 -filter_complex 'overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)-23' -vcodec libx264 -x264opts colormatrix=bt709 -profile:v high444 4 -b:v 290k -maxrate 290k -bufsize 250k -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -acodec libfdk_aac -profile:a aac_he_v2 -b:a 16k -map_metadata -1 -f flv rtmp://localhost/hls/live 2>/dev/null >/dev/null & " ;
$output = shell_exec( $cast ) ;It’s like FFMPEG process continue until original php process ( that call it ) die , at first I thought this issue with the sorce or ffmpeg command but I test the same command on the sell and it works perfectly .
My suspicion are with on STDIO etc were not redirected right . even when I excute the same php script from the shell it’s do the same stops after few seconds .=Edit=
Even when I tried to run
ffmpeg
from the command line and make it run on the background , I got same behavior the process stop after few seconds , ffmpeg continue running only if I wait for it output .Here my OS details :-
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)" -
How to save (record) rtsp stream to the disk storage without artifacts and missing seconds ?
20 septembre 2019, par Bogdan RudnytskyiI need to save (record) rtsp stream to the disk storage.
I am using nginx-module and ffmpeg for it.
Here the config for enable recording :rtmp {
live on;
hls on;
hls_fragment 5s;
server {
listen 1935;
application cam1 {
hls_path /tmp/cam1;
}
exec_static ffmpeg -rtsp_transport tcp -i rtsp://... -c copy -f flv rtmp://.../cam1/stream;
}
}Config is creating the flv files, each duration of 5 second.
Then we need to merge all got files in one file by command :ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.flv
After concated files we are got a problem. When previous 5 seconds end and start next 5 seconds we have artifacts and missing 0.5-1 second.
Please, get me help with saving rtsp stream without artifacts and missing seconds.