
Recherche avancée
Médias (1)
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (111)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (11035)
-
Difficulty getting the expected output for .avi conversions to .mp4 using FFMPEG [closed]
25 avril 2024, par EricelI am trying to write a video converting script that converts an input video file to .mp4 output. I am using ffmpeg libx264 encoder. Unfortunately, when I convert from .avi to .mp4, the output video is not smooth, a little skippy. Here is how I set up the encoder code :


AVCodecContext *Video::setupVideoEncoder(const AVCodec *encoder, AVStream *inVideoStream, AVFormatContext *outFormatCtx)
{
 AVCodecContext *codecCtx = avcodec_alloc_context3(encoder);
 if (!codecCtx)
 {
 std::cerr << "Failed to allocate the video codec context." << std::endl;
 return nullptr;
 }

 if (avcodec_parameters_to_context(codecCtx, inVideoStream->codecpar) < 0)
 {
 std::cerr << "Failed to copy codec parameters to encoder context." << std::endl;
 avcodec_free_context(&codecCtx);
 return nullptr;
 }

 // Correctly assign pixel format based on encoder support
 if (!check_pix_fmt(encoder, inVideoStream->codecpar->format))
 {
 codecCtx->pix_fmt = encoder->pix_fmts[0];
 }
 else
 {
 codecCtx->pix_fmt = static_cast<avpixelformat>(inVideoStream->codecpar->format);
 }
 codecCtx->width = inVideoStream->codecpar->width;
 codecCtx->height = inVideoStream->codecpar->height;
 codecCtx->bit_rate = 2000000; // 2 Mbps
 codecCtx->gop_size = 12;
 codecCtx->max_b_frames = 3;

 // Setting frame rate and time base using guessed values
 AVRational framerate = av_guess_frame_rate(outFormatCtx, inVideoStream, nullptr);
 codecCtx->framerate = framerate;
 codecCtx->time_base = av_inv_q(framerate);

 AVDictionary *opts = nullptr;
 av_dict_set(&opts, "x264-params", "keyint=25:min-keyint=25:no-scenecut=1", 0);

 if (outFormatCtx->oformat->flags & AVFMT_GLOBALHEADER)
 {
 codecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 }

 if (avcodec_open2(codecCtx, encoder, &opts) < 0)
 {
 std::cerr << "Failed to open the video encoder." << std::endl;
 avcodec_free_context(&codecCtx);
 av_dict_free(&opts);
 return nullptr;
 }

 av_dict_free(&opts);
 return codecCtx;
} 
</avpixelformat>


I can only thing the configurations here are the problem, because if I converted a .mov to .mp4, I get the expected output.


-
How to play a specific number of samples from an audio file using ffmpeg ?
2 juillet 2023, par FrostDreamI'm trying to use ffmpeg in a command-line or terminal environment to play only a specific number of samples from an audio file. Instead of playing the entire audio, I want to extract and play a precise portion based on the sample count.


I came across the following example command that seems to be relevant :


ffmpeg -ss 0 -t [SAMPLE_COUNT] -i [INPUT_AUDIO_FILE] -f wav - | ffplay -



In the command, I understand that -ss is used to specify the start time as 0, -t sets the duration as the sample count, -i defines the input audio file, and -f sets the output format as WAV. The output is then piped to ffplay, a simple media player provided with ffmpeg, which will play the specified number of samples from the audio file.


However, I'm not entirely sure about the usage and options of ffmpeg in this scenario. Could someone please provide a detailed explanation of how to correctly use ffmpeg to achieve this ? Any additional insights, tips, or alternative approaches would also be greatly appreciated. Thank you !


-
Fix —output-prefix with input-files in sub-directories
29 mai 2018, par orbeaFix —output-prefix with input-files in sub-directories
And make sure to reserve the whole file path when not using —output-prefix.
Fixes https://sourceforge.net/p/flac/bugs/463/
Signed-off-by : Erik de Castro Lopo <erikd@mega-nerd.com>