How To
ivanjaros opened this issue · comments
REPOST
Since goav has disabled issues i will ask in here:
I have few income streams(srt->ts->h264/aac, rtmp->flv->h264/aac,...) that i need to "normalize" into av1 and then create different quality versions(ie 240p, 360p, 4801p, 720p and 1080p). I am looking at goav but I am not seeing functions that look like they will do what I am after.
Can you hint at where to begin? I will most likely have the input codec info so I do not need to guess the codec or the container to begin with. I just need to take the packets and transcode them from codec A to codec B and that is about it.
For example I have
avCtx := avformat.AvformatAllocContext()
avCtx.AvformatNewStream()
but there is no way to get the AvCodec to pass to the new stream method so I am stuck right from the get go.
I see 2 options :
- Checkout ffmpeg examples and see which functions should be called, when and where
- Checkout my GO encoder that uses
goav
. It's not perfect, but it aims at simplifying the use ofgoav
by splitting your workflow by feature (demux, decode, filter, encode, mux, etc.). You can start by looking at the out-of-the-box encoder.
this looks useful https://github.com/leandromoreira/ffmpeg-libav-tutorial