
Recherche avancée
Autres articles (80)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (3331)
-
How to rotate an image overlay in ffmpeg around the image center ?
14 mars 2023, par ktraceI'm using ffmpeg to scale, rotate and overlay an image on a video. I'm able to rotate the image by the desired angle but the overlay ends up being moved both vertically and horizontally from the expected position.


The commands I've tried and their corresponding outputs are shown below. Command 1 gives the expected output, 2 and 3 do not.


How can I modify my commands in general, to rotate the overlay image around the image center, to get the expected output ?






ffmpeg -i graphpaper.mp4 -i arrow.png -y -filter_complex [1:v]scale=w=364:h=370[overlay0] ;[overlay0]rotate=a=0:c=none:ow=rotw(0):oh=roth(0)[rotate0] ;[0:v][rotate0]overlay=x=419:y=168[output0] -map [output0] sample-overlay-on-graph-paper.mp4








ffmpeg -i graphpaper.mp4 -i arrow.png -y -filter_complex [1:v]scale=w=364:h=370[overlay0] ;[overlay0]rotate=a=0.8017360589297406:c=none:ow=rotw(0.8017360589297406):oh=roth(0.8017360589297406)[rotate0] ;[0:v][rotate0]overlay=x=419:y=168[output0] -map [output0] sample-overlay-on-graph-paper.mp4








ffmpeg -i graphpaper.mp4 -i arrow.png -y -filter_complex [1:v]scale=w=364:h=370[overlay0] ;[overlay0]rotate=a=5.493783719179012:c=none:ow=rotw(5.493783719179012):oh=roth(5.493783719179012)[rotate0] ;[0:v][rotate0]overlay=x=419:y=168[output0] -map [output0] sample-overlay-on-graph-paper.mp4




Links to input files :


- 

- graphpaper.mp4 https://imgur.com/a/daHI7j0
- arrow.png https://imgur.com/a/wWwnnfq






-
Using ffmpeg without hardware acceleration (C++)
13 février 2018, par MadMarkyI’m working on an application (c++/Linux) that uses the ffmpeg 3.4 libraries to do video encoding. Since version 3.3 hardware acceleration is enabled by default if the platform supports it. The graphics card in my dev system has hardware acceleration support, but the tool also has to run on older systems that do not.
How can i configure ffmpeg to disable hardware acceleration for video encoding ? There is a ton of info about enabling, but i just cant find how to disable it.ps.
There already is a similar question : How to turn off ffmpeg hardware acceleration but its a year old and unfortunately still unanswered. -
How to implement live video streaming with ffmpeg without using WebRTC ?
8 août 2024, par ArtemFollowing up on my previous question, I'd like to inquire about alternative methods for live video streaming using ffmpeg (WebRTC is not an option due to certain constraints I prefer not to discuss here).


Context :


I have a Go application where a goroutine launches ffmpeg to process a video stream, which is then delivered to the main goroutine via a
chan []byte
. I tried using WebSocket, but encountered issues as described in the previous question. HLS also didn't work well due to significant latency and artifacts like green squares on the video.

Based on a comment in the previous question, I attempted to stream the video via a simple GET request. Here's the Go handler I implemented :


func stream(helperApp agent.Helper) func(rw http.ResponseWriter, rr *http.Request) {
 a := atomic.Bool{}
 return func(rw http.ResponseWriter, rr *http.Request) {
 if !a.CAS(false, true) {
 http.Error(rw, "already running", http.StatusInternalServerError)
 return
 }

 rw.Header().Set("Access-Control-Allow-Origin", "*")
 rw.Header().Set("Content-Type", "video/mp2t")

 out := make(chan []byte)

 // create StreamParam
 go ScreenCaptureForLiveStream(StreamParam, out) // ffmpeg process starts inside

 r, w := io.Pipe()
 go func() {
 for data := range out {
 w.Write(data)
 fmt.Println(len(data))
 }
 }()
 io.Copy(rw, r)
 }
}




On the client side (HTML) :


<video muted="muted" src="http://localhost:8080/stream" controls="controls"></video>



In the browser console, I can see data being received, but the video doesn't play.


FFmpeg is executed with these parameters :


-loglevel error -f avfoundation -framerate 5 -capture_cursor 1 -capture_mouse_clicks 1 -i 1 -c:v libx264 -pix_fmt yuv420p -vf pad='ceil(iw/2)*2:ceil(ih/2)*2' -threads 0 -preset veryfast -bf 2 -f mpegts pipe:1




For validation, I ran :


ffmpeg -i http://localhost:8080/stream -c copy out.mp4




The video was successfully saved and plays.


Question :
What alternative methods exist to implement live video streaming with ffmpeg, aside from WebRTC ? Why does the current approach of streaming video via HTTP GET request not function correctly in the browser, and how can this be resolved ?