You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Hi, I need to transcode video streams from multiple sources to "normalize" them into single codec and container and whatnot so that I can pass them down the pipeline. ffmpeg is essentially the only player on the market so I have to use it and there is no native Go library for things like this. So I am wondering, from performance point of view, is it better to use CGO and one of the go libraries that map to ffmpeg's C api or to use your project that just uses cli commands to standalone ffmpeg library? I would assume that using the cgo version would be faster but since the cgo is known to be slower than prue go due to the way go and c communicate, maybe talking with standalone ffmpeg binary will be faster? Also how is the concurrency performance? I'll be needeing to process multiple streams at once so I am not sure how standalone ffmpeg handles this. Lastly, is it possible to pipe data through sockets or does it have to go through files or stdout? The examples use directories which concerns me from performance point of view.
The text was updated successfully, but these errors were encountered:
I am not an expert (only one project that needs ffmpeg) - but in my case ffmpeg uses all avaiable CPU for transcoding single file, so add extra concurrency have not sense from performance point of view. Keep in mind that spawning many ffmpeg instances at once may have negative impact when you use mechanical disk drive, especially when you use hardware acceleration for transcoding.
alright, thanks for the info. as for disk lmitation - that is why i asked about sockets, i saw ffmpeg has unix socket support for input and output so i hope it does not touch the disk at all. but i guess that is out of scope of this project.
Hi, I need to transcode video streams from multiple sources to "normalize" them into single codec and container and whatnot so that I can pass them down the pipeline. ffmpeg is essentially the only player on the market so I have to use it and there is no native Go library for things like this.
So I am wondering, from performance point of view, is it better to use CGO and one of the go libraries that map to ffmpeg's C api or to use your project that just uses cli commands to standalone ffmpeg library? I would assume that using the cgo version would be faster but since the cgo is known to be slower than prue go due to the way go and c communicate, maybe talking with standalone ffmpeg binary will be faster? Alsohow is the concurrency performance? I'll be needeing to process multiple streams at once so I am not sure how standalone ffmpeg handles this. Lastly, is it possible to pipe data through sockets or does it have to go through files or stdout? The examples use directories which concerns me from performance point of view.The text was updated successfully, but these errors were encountered: