
Recherche avancée
Autres articles (22)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...) -
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 (...)
Sur d’autres sites (6112)
-
Not synchronized audio and video recorded with python
9 décembre 2022, par LACi bought an USB microphone and a Camera module for the raspberry pi4. I managed to record Audio and Video but when i merge them with ffmpeg the are not synchronized, i'm trying to solve this for 2 days now.


Here my code, when the program starts it record video with the instruction "camera.start_recording("Video.h264")", this instruction return immediatly so when the program executes the instruction after camera.start_recording("Video.h264") the video is still recording.


For recording Audio i use a while loop that stops when i press a button. When i press the button the video recording also stops.


After everything is written i use ffmpeg to merge the video (After converting it to mp4) and the Audio.


# coding=utf-8

from picamera import PiCamera

import pyaudio

import wave

import os

import time

import RPi.GPIO as GPIO

GPIO.setwarnings(False)

GPIO.setmode(GPIO.BOARD)

GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

print("Ready")

go = True

camera = PiCamera()

camera.resolution = (1920, 1080)

audio = pyaudio.PyAudio()

stream = audio.open(format=pyaudio.paInt16, channels=1, rate=44100, input=True)

frames = []

camera.start_recording("Video.h264")

while go:

 print("Recording")

 if GPIO.input(10) == GPIO.HIGH:

 camera.stop_recording()

 go = False

 print("Recording has been stopped")


data = stream.read(1024, exception_on_overflow = False)
frames.append(data)

stream.stop_stream()

stream.close()

audio.terminate()

sound_file = wave.open("Audio.wav", "wb")

sound_file.setnchannels(1)

sound_file.setsampwidth(audio.get_sample_size(pyaudio.paInt16))

sound_file.setframerate(44100)

sound_file.writeframes(b''.join(frames))

sound_file.close()

print("Converting in mp4")

os.system("ffmpeg -i Video.h264 Video.mp4")

print("Merging audio and video")

os.system("ffmpeg -i Video.mp4 -i Audio.wav -c:v copy -c:a aac vea.mp4")



-
WMA Lossless and ProRes Encoder
4 mars 2012, par Multimedia Mike — GeneralThe projects (FFmpeg / Libav) just got a WMA lossless decoder. For those keeping score, this means that there are open source methods for decoding every single one of Microsoft’s proprietary audio codecs (Windows Media Audio, or WMA) : WMA v1, WMA v2, WMA9/Pro, WMA Voice, and now WMA lossless. Currently, it’s only advertised to decode 16-bit audio (no 24-bit). Also, when I first tried it a few days ago, it didn’t decode the very end of the single sample file I concocted many years ago (luckynight.wma). But that might be cleared up by now.
Some other recent developments in the projects that I wanted to call out : An encoder for the Apple ProRes encoder from Kostya ; XWD (X window dump) image decoding and encoding from Paul B. Mahol ; a Sun rasterfile encoder from Aneesh Dogra.
And then there’s the new playback system for CDXL files, also courtesy of Paul B. Mahol. I wasn’t familiar with this format until I wrote this post, which is surprising, given the format’s vintage. This was a CD-ROM FMV format favored for Amiga computers. Here it is in all its 160x120x10fps glory :
That’s the amigaball.cdxl sample available in the repository. The sample is 3835910 bytes large and plays for about 24 seconds. This yields a data rate of about 159 kbytes/second. So, yeah, single-speed CD-ROM FMV.
-
FFMPEG multi livestream - recorded stream send to different services like YT and Twitch at different time (on different button clicks )
4 octobre 2022, par GaneshTrying for the last 10 days and still no success, I am creating a python application that will accept the URL and visit that URL using chromium, capture that screen and send that real-time screen recording to different live stream acceptors as youtube live, twitch Twitter, Facebook live or some other sources and many of these could be multiple.


There are two challenges (both challenges depend on a user action like different button clicks) -


- 

- The time of starting the Livestream we know only one Livestream acceptor and other acceptors could be sent via another API at any time or may not be sent on the whole live stream.
- Any of the streams could be stopped at any moment including the first one which started the original live streaming service






To Solve these challenges I am trying the following process (i took mp4 as a source for simplifying)


- 

- create a stream and store it into PIPE.stdout




ffmpeg_Command_get_stream = 'ffmpeg -re -i test.mp4 -f flv pipe:1'
ffmpeg_Command_get_stream=ffmpeg_Command_get_stream.split()
pipe = sp.Popen(ffmpeg_Command_get_stream,
 stdout=sp.PIPE,
 stderr=sp.PIPE,
 bufsize=8000000,
 shell=True,
 universal_newlines=True
 )
out,err = pipe.communicate()



- 

-
and send that stream with the help of FFMPEG to the Livestream acceptor with the click of the youtube Livestream button


ffmpeg_Command_send_stream = ['ffmpeg','-i',pipe.stdout,'-f','flv',RTMPURL_YOUTUBE]






Update Trying to Explain it a little more :


step 1 - I need a real-time stream from the first command, so I used -re in FFMPEG


step 2 - Use above stream as an input for other command and send that as an output as a Livestream to youtube (or twitch/Facebook), But the second step would happen only when the user click on the button "YT LiveStream", Here the tricky thing is there are multiple buttons (YT LiveStream, Twitch LiveStream, Facebook LiveStream) and user can click any time on any of button, also can click on all button one by one.




sorry for bad explaination


what I am doing wrong ? , Is this Possible ? or need to go with another process,


any help would be greatly appreciated