
Recherche avancée
Autres articles (79)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
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 (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (9049)
-
Why am I getting FPE when using swresample 1.1 ?
24 janvier 2013, par mystaferI am building a project to view a video feed from an IP camera in Android using FFmpeg 1.1.
I'm attempting to use swresample in an Android project and getting a floating point exception when calling swr_convert. I stepped through the swresample code and found one line in libswresample/swresample.c function swri_realloc_audio where the variables a->bps and a->ch_count are zero causing the FPE.
int swri_realloc_audio(AudioData *a, int count){
int i, countb;
AudioData old;
LOGD("in swri_realloc_audio - bps[%d], ch_count[%d]", a->bps, a->ch_count);
if(count < 0 || count > INT_MAX/2/a->bps/a->ch_count)
return AVERROR(EINVAL);01-21 17:29:09.612 : D/swresample.c(18789) : in swri_realloc_audio - bps[0], ch_count[0]
I found bug ticket #1834 in the FFmpeg project that sounds like the exact same issue, but it was resolved by calling swr_init. However, my code does call this function and still crashes. Here is my JNI code :
SwrContext* resampleCtx = swr_alloc_set_opts(NULL,
AV_CH_LAYOUT_MONO, AV_SAMPLE_FMT_S16, pAudioCodecCtx->sample_rate,
pAudioCodecCtx->channel_layout, pAudioCodecCtx->sample_fmt,
pAudioCodecCtx->sample_rate, 0, 0);
swr_init(resampleCtx);
LOGD("Resample context initialized");
int dataSize = swr_convert(resampleCtx,
&pAudioOutBuffer, AVCODEC_MAX_AUDIO_FRAME_SIZE / 2,
(const uint8_t**) &(pFrame->data[0]), pFrame->nb_samples);
LOGD("Resample conversion complete");
swr_free(&resampleCtx);
LOGD("Obtained data size - dataSize[%d]", dataSize);I'm confused because I don't seem to have any control over the variable a in the swri_realloc_audio function. I stepped through the code and noticed that it is from the variable resampleCtx->postin. This variable is copied from resampleCtx->in in the swr_init function, but I don't see where in is ever set to anything.
What am I doing wrong ? Is it in my code or is there a problem in swresample ?
-
avutil/common : add av_rint64_clip
1er novembre 2015, par Ganesh Ajjanagaddeavutil/common : add av_rint64_clip
The rationale for this function is reflected in the documentation for
it, and is copied here :Clip a double value into the long long amin-amax range.
This function is needed because conversion of floating point to integers when
it does not fit in the integer’s representation does not necessarily saturate
correctly (usually converted to a cvttsd2si on x86) which saturates numbers
> INT64_MAX to INT64_MIN. The standard marks such conversions as undefined
behavior, allowing this sort of mathematically bogus conversions. This provides
a safe alternative that is slower obviously but assures safety and better
mathematical behavior.
API :
@param a value to clip
@param amin minimum value of the clip range
@param amax maximum value of the clip range
@return clipped valueNote that a priori if one can guarantee from the calling side that the
double is in range, it is safe to simply do an explicit/implicit cast,
and that will be far faster. However, otherwise this function should be
used.avutil minor version is bumped.
Reviewed-by : Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by : Ganesh Ajjanagadde <gajjanagadde@gmail.com> -
ffmpeg quits if one output stream fails - can this be prevented ? [duplicate]
5 décembre 2017, par Caius JardThis question already has an answer here :
I’m responsible for maintaining a device that streams a live webcam feed to a remote relay server, and simultaneously writes a version of the stream to the local disk. It does this by a single instance of ffmpeg that has two outputs - one to the local disk, and one over rtsp to the streaming server
I’m encountering a problem where by if the streaming server disconencts for any reason, ffmpeg quits. I’m not really bothered if the live stream is lost, but it’s a big problem that the local recording is lost also - it’s not a huge detriment to the particular business process if it cannot be watched live, but losing the locally stored copy is a disaster
ffmpeg is started with a command line similar to :
ffmpeg -thread_queue_size 4096 -async 1 -f v4l2
-input_format mjpeg -framerate 30 -video_size 1280x720
-i /dev/video0 -thread_queue_size 4096 -async 1 -f alsa
-i plughw:CARD=Set,DEV=0 -r 30 -c:a aac -b:a 96k -c:v h264 -b:v 983040
-profile:v baseline -preset veryfast -pix_fmt yuv420p
-f tee -map 0:v -map 1:a
[f=matroska]'/var/recordings/yyyy-mm-dd/backup.mkv'|
[f=rtsp:rtsp_transport=tcp]rtsp://streamingserver.com:1234/session.sdp`Is there any way (command line switch etc) that ffmpeg can be made to carry on if an output stream is lost, rather than quitting ?