
Advanced search
Other articles (25)
-
Les formats acceptés
28 January 2010, byLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Supporting all media types
13 April 2011, byUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats: images: png, gif, jpg, bmp and more audio: MP3, Ogg, Wav and more video: AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data: OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Création définitive du canal
12 March 2010, byLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
On other websites (4616)
-
Stream microphone from client browser to remote server and pass audio in real time to ffmpeg to combine with a second video source
4 May 2021, by fakeguybrushthreepwoodAs a beginner at working with these kinds of real-time streaming services, I've spent hours trying to work out how this is possible, but can't seem to work out I'd precisely go about it.


I'm prototyping a personal basic web app that does the following:


- 

-
In a web browser, the web application has a button that says 'Stream Microphone' - when pressed it streams the audio from the user's microphone (the user obviously has to consent to give permission to send their microphone audio) through to the server which I was presuming would be running node.js (no specific reason at this point, just thought this is how I'd go about doing it).


-
The server receives the audio close enough to real-time somehow (not sure how I'd do this).


-
I can then run ffmpeg on the command line and take the real-time audio coming in real-time and add it as the sound to a video file (let's just say I'm going to play testmovie.mp4) that I want to play.










I've looked at various solutions - such as maybe using WebRTC, RTP/RTSP, Piping audio into ffmpeg, Gstreamer, Kurento, Flashphoner and/or Wowza - but somehow they look overly complicated and usually seem to focus on video along with audio. I just need to work with audio.


-
-
Is every instance of subprocess.Popen() its own shell?
26 April 2021, by saa-sofBackground:
I'm trying to make an application that plays music via a GUI (Tkinter), Youtube_DL and FFmpeg. While the actual application is done it also requires FFmpeg to be an environment variable to work. Now, I'm trying to foolproof the creation of a "personal" FFmpeg environment variable in order to make the application portable (the last step is using pyinstaller to make a .exe file).


Problem:
I'm trying to create the environment variable for FFmpeg by passing
SET
throughsubprocess.Popen
:

add_ffmpeg = subprocess.Popen(f"IF EXIST {path2set} SET PATH=%PATH%;{path2set}", shell=True)



When I try to
echo %PATH%
(withPopen
) the FFmpeg variable that should be present, is not. I just need to know whether or not I'm wasting my time withSET
and should instead be usingSETX
or perhaps some other solution, I'm open to being told I did this all wrong.

Relevant Code:


# get any sub-directory with ffmpeg in it's name
ffmpeg = glob(f"./*ffmpeg*/")

# proceed if there is a directory
if len(ffmpeg) > 0:
 # double-check directory exists
 ffmpeg_exist = path.isdir(ffmpeg[0])

 if ffmpeg_exist:
 print("FFmpeg: Found -> Setting Up")
 
 # get the absolute path of the directories bin folder ".\ffmpeg-release-essentials.zip\bin"
 path2set = f"{path.abspath(ffmpeg[0])}\\bin\\"
 
 # add path of directory to environment variables
 add_ffmpeg = subprocess.Popen(f"IF EXIST {path2set} SET PATH=%PATH%;{path2set}", shell=True)
 add_ffmpeg.wait()
 
 # print all of the current environment variables
 list_vars = subprocess.Popen("echo %PATH%", shell=True)
 list_vars.wait()

else:
 print("FFmpeg: Missing -> Wait for Download...")
 
 # download the ffmpeg file via direct link
 wget.download("https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip")
 
 # unzip the file
 powershell = subprocess.Popen("powershell.exe Expand-Archive -Path './ffmpeg-release-essentials.zip' "
 "-DestinationPath './'")
 powershell.wait()

 # remove the file
 remove("./ffmpeg-release-essentials.zip")

 # get any sub-directory with ffmpeg in it's name
 ffmpeg = glob("./*ffmpeg*/")

 # double-check directory exists
 ffmpeg_exist = path.isdir(ffmpeg[0])
 
 # proceed with if it exists
 if ffmpeg_exist:
 print("FFmpeg: Found -> Setting Up")
 
 # get the absolute path of the directories bin folder ".\ffmpeg-release-essentials.zip\bin"
 path2set = f"{path.abspath(ffmpeg[0])}\\bin\\"
 
 # add path of directory to environment variables
 add_ffmpeg = subprocess.Popen(f"IF EXIST {path2set} SET PATH=%PATH%;{path2set}", shell=True)
 add_ffmpeg.wait()

 # print all of the current environment variables
 list_vars = subprocess.Popen("echo %PATH%", shell=True)
 list_vars.wait()
 
 else:
 print("Something unexplained has gone wrong.")
 exit(0)



-
How to compress base64 decoded video data using ffmpeg in django
23 May 2021, by Sudipto SarkerI want to upload the video/audio file in my django-channels project. So I uploaded video(base64 encoded url) from websocket connection. It is working fine. But now after decoding base64 video data I want to compress that video using ffmpeg.But it showing error like this.
''Raw: No such file or directory''
I used 'AsyncJsonWebsocketConsumer' in consumers.py file.Here is my code:
consumers.py:


async def send_file_to_room(self, room_id, dataUrl, filename):
 # decoding base64 data
 format, datastr = dataUrl.split(';base64,')
 ext = format.split('/')[-1]
 file = ContentFile(base64.b64decode(datastr), name=filename)
 print(f'file: {file}')
 # It prints 'Raw content'
 output_file_name = filename + '_temp.' + ext
 ff = f'ffmpeg -i {file} -vf "scale=iw/5:ih/5" {output_file_name}'
 subprocess.run(ff,shell=True) 



May be here ffmpeg can not recognize the file to be compressed. I also tried to solve this using post_save signal.


signals.py:


@receiver(post_save, sender=ChatRoomMessage)
def compress_video_or_audio(sender, instance, created, **kwargs):
 print("Inside signal")
 if created:
 if instance.id is None:
 print("Instance is not present")
 else:
 video_full_path = f'{instance.document.path}'
 print(video_full_path)
 // E:\..\..\..\Personal Chat Room\media\PersonalChatRoom\file\VID_20181219_134306_w5ow8F7.mp4
 output_file_name = filename + '_temp.' + extension
 ff = f'ffmpeg -i {filename} -vf "scale=iw/5:ih/5" {output_file_name}'
 subprocess.run(ff,shell=True)
 instance.document = output_file_name
 instance.save()



It is also causing "E:..\Django\New_Projects\Personal: No such file or directory".
How can I solve this issue? Any suggetions.It will be more helpful if it can be compressed before saving the object in database. Thanks in advance.