
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (13)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
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 (3402)
-
Problem playing a sound with pydub Error : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1
28 mai 2020, par studioDKRI have a problem getting a file played in the browser with pydub. I think the function is working, but I just don't get the right file path to it, or something else is missing. Would love to get your help !



I get the pydob error message : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1



Here is the error I get :



[2020-05-28 16:04:33,023] ERROR in app: Exception on /overview [POST]
Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
 response = self.full_dispatch_request()
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
 rv = self.handle_user_exception(e)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
 reraise(exc_type, exc_value, tb)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
 raise value
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
 rv = self.dispatch_request()
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
 return self.view_functions[rule.endpoint](**req.view_args)
 File "/Users/Micha/Documents/GitHub/podprod/app.py", line 109, in overview
 sound = AudioSegment.from_file(filepath)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pydub/audio_segment.py", line 723, in from_file
 raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

b'ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers\n built with Apple clang version 11.0.3 (clang-1103.0.32.59)\n configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack\n libavutil 56. 31.100 / 56. 31.100\n libavcodec 58. 54.100 / 58. 54.100\n libavformat 58. 29.100 / 58. 29.100\n libavdevice 58. 8.100 / 58. 8.100\n libavfilter 7. 57.100 / 7. 57.100\n libavresample 4. 0. 0 / 4. 0. 0\n libswscale 5. 5.100 / 5. 5.100\n libswresample 3. 5.100 / 3. 5.100\n libpostproc 55. 5.100 / 55. 5.100\n/Users/Micha/documents/github/podprod/uploads/test2.wav: Invalid data found when processing input\n'




This is the Flask route with the function I am writing.



@app.route("/overview", methods=["GET", "POST"])
def overview():

 entries = []

 # Open a file
 path = app.config["FILE_UPLOADS"]

 with os.scandir(path) as dirs:
 for entry in dirs:
 entries.append(entry.name)

 if request.method == "POST":
 filename = request.form['filename']

 filepath = os.path.join(app.config["FILE_UPLOADS"], filename)

 # Play the sound
 sound = AudioSegment.from_file(filepath)
 play(sound)

 return render_template('overview.html', entries=entries)




Here is the HTML template :



{% extends 'main_template.html' %}

 {% block title %}PodProd Podcast Overview{% endblock %}

 {% block main %}

 <div class="container">

 <h1>Here is an overview of your files</h1>

 <table class="table table-striped">
 <tr>
 <th>Filename</th>
 <th>Action</th>
 </tr>
 {% for result in entries %}
 {% if ".wav" in result %}
 <tr>
 <td>{{ result }}</td>
 <td><form action="" method="POST"> <button type="submit" class="btn btn-primary" value="{{" result="result">Play</button></form>
 </td></tr>
 {% endif %}
 {% endfor %}
 </table>

 </div>

 {% endblock %}



-
Error -138 returns "Error number -138 occurred"
29 avril 2016, par bot1131357I am trying to create a program that listens for a period of time, and then times out so that it can return to work on other tasks and retry again later. Here is the code I am testing with :
AVFormatContext *pFormatCtx = NULL;
AVCodecContext *codecCtx = NULL;
AVCodec *codec;
int ret = 0;
// Register all formats and codecs
av_register_all();
avformat_network_init(); // for network streaming
AVDictionary *d = NULL; // "create" an empty dictionary
av_dict_set(&d, "timeout", "5", 0); // add an entry
av_dict_set(&d, "rtsp_flags", "listen", 0); // add an entry
char filename[100];
sprintf_s(filename, sizeof(filename), "%s", "rtsp://127.0.0.1:8554/demo");
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
printf_s("Open video file.\n");
// Open video file
ret = avformat_open_input(&pFormatCtx, filename, NULL, &d); // Returns -138 here
if (ret <0)
{
printf_s("Failed: cannot open input.\n");
av_strerror(ret, errbuf, ERRBUFFLEN);
fprintf(stderr, "avformat_open_input() fail: %s\n", errbuf);
continue;
//return -1; // Couldn't find stream information
}In the listening mode,
avformat_open_input()
returns -138. Usingav_strerror()
gives the following explanation : "Error number -138 occurred"Is this an Easter egg ? What does -138 stand for ?
-
Error : ffmpeg exited with code 1 : Error initializing complex filters. Not yet implemented in FFmpeg, patches welcome
12 juin 2023, par Mutahhir KhanI got this objective




write a function in typescript which takes images array of type




interface Image {
 buffer: Buffer;
 start: number;
 end: number;
}





and audio file of Buffer type, videoLength of type number.The function
should use
fluent-ffmpeg
to create a video by combining these images
based on their start and end time with a transition of fade filter.
the audio should be placed on video. the code will be running on ab
ubuntu linux distro. after the video generation is completed, saved
the video in root directory of project.



import ffmpeg from "fluent-ffmpeg";
import * as fs from "fs";

interface Image {
 buffer: Buffer;
 start: number;
 end: number;
}

/**
 *
 * @param images contains the image buffers and their start and end times
 * @param audio contains the audio buffer, save before use it
 * @param videoLength contains the video length
 * @objective write a function in typescript which takes images array and audio file of Buffer type, videoLength of type number.
 * the function should use `fluent-ffmpeg` to create a video by combining these images
 * based on their start and end time with a transition of fade filter. the audio should be placed on video.
 * The code will be running on ab ubuntu linux distro. after the video generation is completed, saved the video in root directory of project.
 */

function createVideo(images: Image[], audio: Buffer, videoLength: number) {
 const command = ffmpeg();

 const audioPath = "audio.mp3";
 const durations: number[] = [];

 // Add images with start and end times
 images.forEach((image, index) => {
 const frameDuration = image.end - image.start; // Calculate duration of each frame
 durations.push(frameDuration);
 const imagePath = `image-${index}.png`;
 fs.writeFileSync(imagePath, image.buffer); // Create temporary image files from buffers

 command.input(imagePath).inputOptions(`-loop 1`).inputOptions(`-t ${frameDuration}`);
 });

 command.input(audioPath);

 fs.writeFileSync(audioPath, audio); // Create temporary audio file from buffer

 // Add audio
 command.input(audioPath).inputOptions(`-stream_loop -1`).inputOptions(`-t ${videoLength}`);

 // Add fade filter
 command.complexFilter([
 {
 filter: "fade",
 options: {
 enable: `'between(t,0,1)'`, // Notice the single quotes around the expression
 x: "810",
 y: "465",
 },
 inputs: `0:v`,
 outputs: `fade0`,
 },
 {
 filter: "fade",
 options: {
 enable: `'between(t,1,2)'`, // Notice the single quotes around the expression
 x: "810",
 y: "465",
 },
 inputs: `1:v`,
 outputs: `fade1`,
 },
 {
 filter: "fade",
 options: {
 enable: `'between(t,2,3)'`, // Notice the single quotes around the expression
 x: "810",
 y: "465",
 },
 inputs: `2:v`,
 outputs: `fade2`,
 },
 ]);


 // Add output options
 command.outputOptions([
 "-map [outv]",
 "-map [outa]",
 "-shortest",
 ]);

 // Add output file
 command.output("output.mp4");

 // Run ffmpeg
 command.run();

 // Delete temporary files
 // fs.unlinkSync(audioPath);
 // images.forEach((image, index) => {
 // fs.unlinkSync(`image-${index}.png`);
 // });
}

export async function fluentFFmpeg() {
 try {
 // Usage example
 const images: Image[] = [
 { buffer: fs.readFileSync("image-0.png"), start: 0, end: 5 },
 { buffer: fs.readFileSync("image-1.png"), start: 6, end: 10 },
 { buffer: fs.readFileSync("image-2.png"), start: 11, end: 15 },
 ];

 const audioBuffer: Buffer = fs.readFileSync("audio.mp3");
 const videoLength: number = 15; // Duration of the resulting video
 const response = createVideo(images, audioBuffer, videoLength);
 console.log("response", response);
 } catch (error) {
 console.log("error", error);
 }
}