
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
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
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (76)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (12566)
-
How to run ffmpeg as a subprocess and wait for the task to finish (fastapi)
4 octobre 2023, par leejhI'm creating a site that runs ffmpeg on the web using fastapi.


@router.post("/dir/Conver") 
async def ffmpeg_Conversion(request: Request):
 data = await request.json()

 file_path = data.get('file_path')
 saturation = float(data.get('saturation', 1.0)) 
 brightness = float(data.get('brightness', 0.0)) 
 contrast = float(data.get('contrast', 1.0))
 size = data.get('size','3840x2160')
 bitlayer = data.get('bitlayer',8000)
 codec = data.get('codec','libx264')
 formatstr=data.get('format','MP4')


 savepath = './UserFolder' + file_path

 directory = os.path.dirname(savepath)
 last_directory = os.path.basename(savepath)
 
 last_directory=str(last_directory).split('.')[0]
 print("last_directory : ---------------------" + last_directory)

 current_datetime = datetime.datetime.now()
 formatted_datetime = current_datetime.strftime('%Y-%m-%d-%H-%M-%S-%f')


 ffmpeg_command = [
 'ffmpeg',
 '-i', savepath,
 '-vf', f'eq=saturation={1+saturation/100}:brightness={brightness/100}:contrast={1+contrast/100}',
 '-s', size,
 '-c:v', codec,
 '-preset', 'medium',
 '-b:v', bitlayer,
 directory+'/'+last_directory+"_"+formatted_datetime+"."+formatstr
 ]

 subprocess.check_output(ffmpeg_command, text=True)




Using the code above, I created a function to convert the video.
And this function was given to a button on the web.


FileChan_yes.addEventListener('click', async () => { 
 startRotation();


 const file_path = 'path_to_your_file'; 
 const contrastValue = contrastSlider.value;
 const brightnessValue = lightnessSlider.value;
 const saturationValue = saturationSlider.value;

 const Dir=document.getElementById('last_action_link');
 const savepath = Dir.value;

 const codecDropValue = codecDrop.value; 
 const formatDropValue = formatDrop.value;
 const FileSizeDropValue = FileSizeDrop.value;
 const bitDropValue = bitDrop.value;


 try {
 const response = await fetch(`/dir/Conver`, {
 method: 'POST',
 headers: {
 'Content-Type': 'application/json'
 },
 body: JSON.stringify({
 file_path: savepath,
 saturation: saturationValue,
 brightness: brightnessValue,
 contrast: contrastValue,
 size: FileSizeDropValue,
 bitlayer : bitDropValue,
 codec : codecDropValue,
 formatstr : formatDropValue
 })
 
 });

 
 if (response.ok) {
 const result = await response.json();
 console.log("Conversion successful:", result);
 } else {
 throw new Error("Failed to convert the file.");
 }

 } catch (error) {
 console.error("Error converting the file:", error);
 } finally {
 stopRotation();
 }
 

 });




When you press the button, first
startRotation() ; the function is executed


When all tasks are completed, the stopRotation() ; function is configured to be executed.


But currently it's not working properly...


stopRotation() ; The function is executed as soon as the button is pressed.


await doesn't seem to work. What is the problem ?


-
Can ffmpeg RTSP video stream be exchanged without an RTSP server ? [closed]
17 décembre 2023, par natedoggI have two Ubuntu devices connected directly together via wired Ethernet (no router). One device (the sender) has a camera that I want to stream over RTSP, and the second device (the reciever) needs to process and view the RTSP stream. Is it possible to do this without an explicit RTSP server running on the sender ?


Here is my test setup :


- 

-
Sender


- 

- Static IP : 192.168.1.1/24
- ffmpeg command :
ffmpeg -f v4l2 -i /dev/video0 -pix_fmt yuv420p -f rtsp -rtsp_transport udp rtsp://192.168.1.2:12345/test






-
Receiver


- 

- Static IP : 192.168.1.2/24
- ffmpeg command :
ffplay rtsp://192.168.1.1:12345/test












Each machine can ping the other successfully, and both devices have their firewalls disabled. However, I get
connection refused
errors when trying to run each command. For resource reasons, I'm trying to avoid running an RTSP server if it isn't necessary.

# Sender error
Connection to tcp://192.168.1.2:12345?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 --



# Receiver error
Connection to tcp://192.168.1.2:12345?timeout=0 failed: Connection refused
Connection to tcp://192.168.1.2:12345?timeout=0 failed: Connection refused



-
-
avcodec/h264_mp4toannexb_bsf : refactor start_code_size handling
18 mai 2023, par Zhao Zhili