
Recherche avancée
Autres articles (64)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (8159)
-
ffmpeg exited with code 1 : Input/output error
30 mai 2024, par Alessandro1918On my backend Node server, I am trying to read a stream from an online radio station, and save the audio as a file in my computer. As streams don't have start/end, I'm choosing to record an arbitrary value of 5 seconds.


For this problem, I'm using the fluent-ffmpeg npm package for ffmpeg wrapper. Also, the @ffmpeg-installer/ffmpeg npm package to point to the directory of my local ffmpeg binary. As stream input, I'm reading from 89 FM - A Rádio Rock, a radio from São Paulo, BR, with the stream available at http://26593.live.streamtheworld.com/RADIO_89FMAAC.aac


Here is the code I put together :


import ffmpeg from "fluent-ffmpeg"
import ffmpegInstaller from "@ffmpeg-installer/ffmpeg"
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
console.log(ffmpegInstaller.path)
console.log(ffmpegInstaller.url)
console.log(ffmpegInstaller.version)

const pathInput = "http://26593.live.streamtheworld.com/RADIO_89FMAAC.aac"
// const pathInput = "./tmp/demo.avi"
const pathOutput = "./tmp/output.m4a"

ffmpeg()
 .input(pathInput)
 .duration(5)
 .save(pathOutput)
 .on("start", function(command) {
 console.log("Spawned Ffmpeg with command: " + command)
 })
 .on("error", function (err) {
 console.log("An error occurred: " + err.message)
 })
 .on("end", async function () {
 console.log("Processing finished!")
 })



On my local machine (Mac, running darwin-x64), the program outputs OK :


/.../node_modules/@ffmpeg-installer/darwin-x64/ffmpeg
https://evermeet.cx/ffmpeg/
92718-g092cb17983
Spawned Ffmpeg with command: ffmpeg -i http://26593.live.streamtheworld.com/RADIO_89FMAAC.aac -y -t 5 ./tmp/record.m4a
Processing finished!



On my docker container (linux-x64), which I need to deploy the project, the ffmpeg returns an error :


/usr/app/node_modules/@ffmpeg-installer/linux-x64/ffmpeg
https://www.johnvansickle.com/ffmpeg/
20181210-g0e8eb07980
Spawned Ffmpeg with command: ffmpeg -i http://26593.live.streamtheworld.com/RADIO_89FMAAC.aac -y -t 5 ./tmp/output.m4a
main-1 | An error occurred: ffmpeg exited with code 1: http://26593.live.streamtheworld.com/RADIO_89FMAAC.aac: Input/output error



Dockerfile for the container :


FROM node:alpine

WORKDIR /usr/app

COPY package*.json ./

# Install ffmpeg in the container:
RUN apk update
RUN apk add ffmpeg

RUN npm install

COPY . .

CMD [ "npm", "run", "dev" ]




Obs : this error seems to happen only for stream -> file save. When using as input a path from a local .avi file (thus, converting from .avi to .m4a), both localhost and docker versions run OK.


Has anyone has any clue as to why this error happens on this version ?
Or how I can run a ffmpeg command, server-side, on a docker container, to record a radio stream ?


-
using ffmpeg -f ffmetadata to get metadata for a stream [on hold]
23 avril 2014, par user645402I have a stream that I can get the metadata for using ffmpeg :
ffmpeg -i <stream url="url"> -f ffmetadata -
</stream>This works great for the first song, but then returns. The issue is that the stream is from a radio station which plays song after song - i.e. the metadata is changing as time goes on. However, this command will only give metadata for the song currently playing and then exit.
I would like it to keep flowing the metadata as it updates in the stream.
-
How do I write a simple script which calls ffmpeg and records an audio stream ?
29 janvier 2016, par user2192778I would like to write a script which calls ffmpeg and begins recording an internet radio stream.
This command is simple :
ffmpeg -i http://myaudiostream.com output.mp3I understand how to make a .bat file, I just don’t know specifically how to code these instructions.
Can I have some help ?
I haven’t written a script before, though I understand how it works. I don’t know any of the syntax.