
Recherche avancée
Autres articles (65)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
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 (...) -
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)
Sur d’autres sites (9297)
-
Combining Video and Audio Buffers in Memory Using FFmpeg and Python
22 août 2024, par RUBICKI need to combine video and audio streams into a single MP4 file. My goal is to handle this entirely in memory and then send the resulting file directly to the user without storing any files on disk.


I am consistently facing problems with the FFmpeg process when trying to combine the video and audio streams


@bot.callback_query_handler(func=lambda call: call.data.startswith("download_mp4"))
def handle_download_mp4(call):
 itag, url = call.data.split("|")[1:]
 yt = YouTube(url)
 
 video_stream = yt.streams.get_by_itag(itag)
 audio_stream = yt.streams.filter(only_audio=True).first()

 video_buffer = io.BytesIO()
 audio_buffer = io.BytesIO()

 # downloading video and audio to memory
 video_stream.stream_to_buffer(video_buffer)
 audio_stream.stream_to_buffer(audio_buffer)

 video_buffer.seek(0)
 audio_buffer.seek(0)
 combined_buffer = io.BytesIO()

 process = None
 try:
 process = (
 ffmpeg
 .input('pipe:0')
 .input('pipe:1')
 .output('pipe:2', format='mp4', vcodec='libx264', acodec='aac')
 .run_async(pipe_stdin=True, pipe_stdout=True, pipe_stderr=True)
 )

 # video and audio buffers to ffmpeg stdin
 process.stdin.write(video_buffer.read())
 process.stdin.write(audio_buffer.read())
 process.stdin.close()

 combined_buffer.write(process.stdout.read())
 process.wait()
 combined_buffer.seek(0)
 
 except Exception as e:
 bot.send_message(call.message.chat.id, f"Error during processing: {str(e)}")
 if process:
 process.kill()
 return

 file_size = combined_buffer.getbuffer().nbytes

 if file_size > MAX_FILE_SIZE:
 bot.send_message(call.message.chat.id, "The combined file is too large to download :(")
 combined_buffer.close()
 return

 # sending combined bufer to user
 bot.send_document(call.message.chat.id, combined_buffer, visible_file_name=f"{yt.title}.mp4")



Here's the workflow I'm aiming for :


1. Download video and audio streams from YouTube.
2. Combine these streams in memory using FFmpeg.
3. Send the combined MP4 file to the user.


Im using pytube to download the video and audio streams and ffmpeg to merge them. However, I'm encountering issues with the combination process. Specifically, I’m struggling with how to correctly handle merging the video and audio streams using in-memory buffers


-
WebRTC predictions for 2016
17 février 2016, par silviaI wrote these predictions in the first week of January and meant to publish them as encouragement to think about where WebRTC still needs some work. I’d like to be able to compare the state of WebRTC in the browser a year from now. Therefore, without further ado, here are my thoughts.
WebRTC Browser support
I’m quite optimistic when it comes to browser support for WebRTC. We have seen Edge bring in initial support last year and Apple looking to hire engineers to implement WebRTC. My prediction is that we will see the following developments in 2016 :
- Edge will become interoperable with Chrome and Firefox, i.e. it will publish VP8/VP9 and H.264/H.265 support
- Firefox of course continues to support both VP8/VP9 and H.264/H.265
- Chrome will follow the spec and implement H.264/H.265 support (to add to their already existing VP8/VP9 support)
- Safari will enter the WebRTC space but only with H.264/H.265 support
Codec Observations
With Edge and Safari entering the WebRTC space, there will be a larger focus on H.264/H.265. It will help with creating interoperability between the browsers.
However, since there are so many flavours of H.264/H.265, I expect that when different browsers are used at different endpoints, we will get poor quality video calls because of having to negotiate a common denominator. Certainly, baseline will work interoperably, but better encoding quality and lower bandwidth will only be achieved if all endpoints use the same browser.
Thus, we will get to the funny situation where we buy ourselves interoperability at the cost of video quality and bandwidth. I’d call that a “degree of interoperability” and not the best possible outcome.
I’m going to go out on a limb and say that at this stage, Google is going to consider strongly to improve the case of VP8/VP9 by improving its bandwidth adaptability : I think they will buy themselves some SVC capability and make VP9 the best quality codec for live video conferencing. Thus, when Safari eventually follows the standard and also implements VP8/VP9 support, the interoperability win of H.264/H.265 will become only temporary overshadowed by a vastly better video quality when using VP9.
The Enterprise Boundary
Like all video conferencing technology, WebRTC is having a hard time dealing with the corporate boundary : firewalls and proxies get in the way of setting up video connections from within an enterprise to people outside.
The telco world has come up with the concept of SBCs (session border controller). SBCs come packed with functionality to deal with security, signalling protocol translation, Quality of Service policing, regulatory requirements, statistics, billing, and even media service like transcoding.
SBCs are a total overkill for a world where a large number of Web applications simply want to add a WebRTC feature – probably mostly to provide a video or audio customer support service, but it could be a live training session with call-in, or an interest group conference all.
We cannot install a custom SBC solution for every WebRTC service provider in every enterprise. That’s like saying we need a custom Web proxy for every Web server. It doesn’t scale.
Cloud services thrive on their ability to sell directly to an individual in an organisation on their credit card without that individual having to ask their IT department to put special rules in place. WebRTC will not make progress in the corporate environment unless this is fixed.
We need a solution that allows all WebRTC services to get through an enterprise firewall and enterprise proxy. I think the WebRTC standards have done pretty well with firewalls and connecting to a TURN server on port 443 will do the trick most of the time. But enterprise proxies are the next frontier.
What it takes is some kind of media packet forwarding service that sits on the firewall or in a proxy and allows WebRTC media packets through – maybe with some configuration that is necessary in the browsers or the Web app to add this service as another type of TURN server.
I don’t have a full understanding of the problems involved, but I think such a solution is vital before WebRTC can go mainstream. I expect that this year we will see some clever people coming up with a solution for this and a new type of product will be born and rolled out to enterprises around the world.
Summary
So these are my predictions. In summary, they address the key areas where I think WebRTC still has to make progress : interoperability between browsers, video quality at low bitrates, and the enterprise boundary. I’m really curious to see where we stand with these a year from now.
—
It’s worth mentioning Philipp Hancke’s tweet reply to my post :
https://datatracker.ietf.org/doc/draft-ietf-rtcweb-return/ … — we saw some clever people come up with a solution already. Now it needs to be implemented
-
looking for Wowza RTMP client on iOS [closed]
9 mai 2013, par user2365591i will need to developed a chat application based on wowza server and im looking for RTMP client open source for iOS
or maybe some other open source that use FFMPEG open source
thanks in advanced
Asaf