Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (75)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à 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) (...)

Sur d’autres sites (7312)

  • Fast WAV audio decoding with FFMPEG : avformat_find_stream_info is slow

    5 août 2020, par Vadim Kantorov

    I'm implementing an audio reading backend for a machine learning system. This means that decoding should be fast. Potential formats are .wav, .gsm, .opus.

    


    I've implemented audio decoding in FFMPEG : https://github.com/vadimkantorov/readaudio/blob/65f97b7/decode_audio_ffmpeg.c

    


    Currently using scipy.io.wavfile.read on a 5-second 8khz .wav file (typical file for my usecase) takes about 0.1 milliseconds. This is reasonable, because .wav format is quite simple.

    


    In my FFMPEG code, only calling avformat_find_stream_info() without decoding the packets takes about 5-6 milliseconds which can be too slow (I'm testing it on .WAV files as the first test bed to find FFMPEG's overhead) and takes the bulk of audio loading time.

    


    Does anyone know how to avoid taking this latency hit ? Is it possible to cache stream_info ? What is determining large latency ? (I tried reducing fmt_ctx->probesize / fmt_ctx->analyze_duration without success). In logs it seems that it tries to detect some mp3 format and reads too many bytes, but I know beforehand that it's wav. Is there a practical way of manually filling the stream parameters for a given known set of formats/codecs ?

    


    decode_audio_BEFORE: 0.61 msec
[wav @ 0x563667d57b60] Before avformat_find_stream_info() pos: 78 bytes read:65614 seeks:1 nb_streams:1
[wav @ 0x563667d57b60] probing stream 0 pp:32
[wav @ 0x563667d57b60] Probe with size=4096, packets=2469 detected mp3 with score=1
[wav @ 0x563667d57b60] probing stream 0 pp:31
[wav @ 0x563667d57b60] Probe with size=8192, packets=2470 detected mp3 with score=1
[wav @ 0x563667d57b60] probing stream 0 pp:30
[wav @ 0x563667d57b60] probing stream 0 pp:29
[wav @ 0x563667d57b60] Probe with size=16384, packets=2472 detected mp3 with score=1
[wav @ 0x563667d57b60] probing stream 0 pp:28
[wav @ 0x563667d57b60] probing stream 0 pp:27
[wav @ 0x563667d57b60] probing stream 0 pp:26
[wav @ 0x563667d57b60] probing stream 0 pp:25
[wav @ 0x563667d57b60] probing stream 0 pp:24
[wav @ 0x563667d57b60] probing stream 0 pp:23
[wav @ 0x563667d57b60] probing stream 0 pp:22
[wav @ 0x563667d57b60] probing stream 0 pp:21
[wav @ 0x563667d57b60] probing stream 0 pp:20
[wav @ 0x563667d57b60] probing stream 0 pp:19
[wav @ 0x563667d57b60] probing stream 0 pp:18
[wav @ 0x563667d57b60] probing stream 0 pp:17
[wav @ 0x563667d57b60] probing stream 0 pp:16
[wav @ 0x563667d57b60] probing stream 0 pp:15
[wav @ 0x563667d57b60] probing stream 0 pp:14
[wav @ 0x563667d57b60] probing stream 0 pp:13
[wav @ 0x563667d57b60] probing stream 0 pp:12
[wav @ 0x563667d57b60] probed stream 0
[wav @ 0x563667d57b60] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x563667d57b60] After avformat_find_stream_info() pos: 80078 bytes read:145614 seeks:1 frames:20
decode_audio_AFTER: 7.90 msec


    


    This problem is well-known, but I couldn't find a workaround so far :

    


    


  • swr : split out DSP functions.

    14 juin 2014, par Ronald S. Bultje
    swr : split out DSP functions.
    

    DSP bits of swri_resample go into their own mini-DSP functions ; DSP
    init goes from a per-call branch in multiple_resample to a proper
    DSP init routine ; x86 bits go into x86/ ; swri_resample() moves out of
    resample_template.c into resample.c because it’s independent of DSP
    code or sample type ; multiple_resample() is simplified.

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libswresample/Makefile
    • [DH] libswresample/resample.c
    • [DH] libswresample/resample.h
    • [DH] libswresample/resample_dsp.c
    • [DH] libswresample/resample_template.c
    • [DH] libswresample/x86/Makefile
    • [DH] libswresample/x86/resample_x86_dsp.c
  • Unable to merge videos using ffmpeg within Azure Batch

    7 juillet 2019, par JJuice

    Using a tutorial by MSDN I am trying to build a Batch operation, executed within an Azure Function that merges to videos using FFMPEG. Somehow I am doing something wrong because the merging fails.

    The code where I create the task to merge the videos :

    private static async Task> AddTasksAsync(BatchClient batchClient, string jobId, List<resourcefile> inputFiles, string outputContainerSasUrl)
       {
           Console.WriteLine("Adding {0} tasks to job [{1}]...", inputFiles.Count, jobId);

           // Create a collection to hold the tasks added to the job:
           List<cloudtask> tasks = new List<cloudtask>();

           // Assign a task ID for each iteration
           string taskId = String.Format("Task0");

           string appPath = String.Format("%AZ_BATCH_APP_PACKAGE_{0}#{1}%", appPackageId, appPackageVersion);
           Console.WriteLine(inputFiles[0].FilePath);
           Console.WriteLine(inputFiles[1].FilePath);
           Console.WriteLine(inputFiles[2].FilePath);
           string outputMediaFile = String.Format("ResultaatFilmpje.MOV");
           string taskCommandLine = String.Format("cmd /c {0}\\ffmpeg-20190706-feade2b-win64-static\\bin\\ffmpeg.exe -safe 0 -f concat -i {1} -c copy {2}",
                                               appPath, inputFiles[2].FilePath, outputMediaFile);

           // Create a cloud task (with the task ID and command line) and add it to the task list
           CloudTask task = new CloudTask(taskId, taskCommandLine);
           task.ResourceFiles = new List<resourcefile> { inputFiles[2] };

           // Task output file will be uploaded to the output container in Storage.

           List<outputfile> outputFileList = new List<outputfile>();
           OutputFileBlobContainerDestination outputContainer = new OutputFileBlobContainerDestination(outputContainerSasUrl);
           OutputFile outputFile = new OutputFile(outputMediaFile,
                                                   new OutputFileDestination(outputContainer),
                                                   new OutputFileUploadOptions(OutputFileUploadCondition.TaskSuccess));
           outputFileList.Add(outputFile);
           task.OutputFiles = outputFileList;
           tasks.Add(task);

           // Call BatchClient.JobOperations.AddTask() to add the tasks as a collection rather than making a
           // separate call for each. Bulk task submission helps to ensure efficient underlying API
           // calls to the Batch service.
           await batchClient.JobOperations.AddTaskAsync(jobId, tasks);

           return tasks;
       }
    </outputfile></outputfile></resourcefile></cloudtask></cloudtask></resourcefile>

    When I run the same command from the command-line locally it works fine and FFMpeg merges the two videos.

    I think it has something to do with FFMPEG not able to find the input videos. The location of the input files is stored in the file myfile.txt within the same blob storage container as the two videos itself.
    The videos are listed in the myfile.txt as follows :

    file IMG_7442.MOV
    file IMG_7456.MOV

    Does anyone have an idea on where the failure is coming from ? Any help would be greatly appreciated !