
Recherche avancée
Autres articles (111)
-
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (15351)
-
Apply sound effects on a video file
31 mars 2013, par talhamalik22I am a little miss guided here and it seems i am totally lost. I am developing an android app and its core idea is to develop a video recorder and video player that applies some sound effects on the voice of the people or any sound that it records. Sound effect means that if i make a video of a person who is giving some speech then there should be no effect on video but his/her voice should appear like voice in talking tom cat app. I hope you understand the idea. Similar app is Helium Booth you can check it here. I am trying to use libraries like libSonic, libpd and tried to use XUGGLE too.
Read somewhere that Xuggle is not really developed for mobile devices so left it. Now what i want is that it should apply this effect on voice on the run time i.e while recording the pitch of the sound should be alterd and saved immediately. And what i am getting with these libraries is that i can apply sound effect after video is recorded. So it means i need to rip the audio from the video and then apply the change in pitch and frequency and again concatenate this audio file with the old video file. And i have no idea how to do it.
Please show me the right approach and tools if possible.Regards
-
How can I stream images from a remote server to a mobile app in real-time ? [closed]
1er mars 2024, par Tharunkumar AmpoluI have a setup where I connect to a remote server via SSH to retrieve images captured by a robot. Currently, I am using scp to transfer these images to my local system, where I then use FFmpeg to convert them into a video for storage.


However, I would like to explore the possibility of converting these images into a video on-the-fly as they are added to the remote server folder, with the goal of streaming this video feed to a mobile app.


My requirements are as follows :


The image stream needs to be transmitted to the mobile app in real-time.
I would prefer to avoid storing the images locally and instead stream them directly from the remote server to the mobile app.
The streaming solution should be scalable and support a high frame rate (30fps).
Could anyone suggest an approach or provide guidance on how to achieve this ? Specifically, I'm interested in methods for continuously converting images into a video stream on the remote server and then streaming this video feed to a mobile app in real-time.


Any insights, code examples, or recommendations for tools and libraries that could help accomplish this task would be greatly appreciated.


-
How to use ffmpeg in flask server to convert between audio formats without writing files to disk ?
14 avril 2020, par AthwulfI have successfully managed to use ffmpeg in python to convert the format of some audio files like this :



command = "ffmpeg -i audio.wav -vn -acodec pcm_s16le output.wav"
subprocess.call(command, shell=True)




However I want to do this in memory and avoid saving the input and output files to disk.



I have found the follwing code to do such a thing (Passing python’s file like object to ffmpeg via subprocess) :



command = ['ffmpeg', '-y', '-i', '-', '-f', 'wav', '-']
process = subprocess.Popen(command, stdin=subprocess.PIPE)
wav, errordata = process.communicate(file)




But I am struggeling to use this in my context.



I am receiving the file on a server as part of a multipart/form-data request.



@server.route("/api/getText", methods=["POST"])
def api():
 if "multipart/form-data" not in request.content_type:
 return Response("invalid content type: {}".format(request.content_type))
 # check file format
 file = request.files['file']
 if file:
 print('**found file', file.filename)




Now I have the file as a FileStorage Object (https://tedboy.github.io/flask/generated/generated/werkzeug.FileStorage.html). This object has a stream, which can be accessed by using the read method. So I thought I might be able to use this as input for ffmpeg like so :



f = file.read()
command = ['ffmpeg', '-y', '-i', '-', '-f', 'wav', '-']
process = subprocess.Popen(command, stdin=subprocess.PIPE)
wav, errordata = process.communicate(f)




However this yields the the following error :



AssertionError: Given audio file must be a filename string or a file-like object




I have also tried another approach which I found online, using io.BytesIO, to which I can't find the source anymore :



memfile = io.BytesIO() # create file-object
memfile.write(file.read()) # write in file-object
memfile.seek(0) # move to beginning so it will read from beginning




And then trying this again :



command = ['ffmpeg', '-y', '-i', '-', '-f', 'wav', '-']
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
wav, errordata = process.communicate(memfile)




This gets me the following error :



TypeError: a bytes-like object is required, not '_io.BytesIO'




Does anyone have an idea of how to do this ?



Update



The first error message is actually not a error message thrown by ffmpeg. As v25 pointed out correctly in his answer the first approach also returns a bytes object and is also a valid solution.



The error message got thrown by a library (speech_recognition) when trying to work with the modified file. In the unlikely case of someone coming across the same problem here the solution :



The bytes objected returned by ffmpeg (variable wav) has to be turned into a file-like object as the error message implies. This can easily be done like this :



memfileOutput = io.BytesIO(wav)