gen2brain/x264-go

using the data

Opened this issue · 4 comments

this is cool.
Worked first time and i got a stream.264.
I assume that this needs to be fed into VLC or something to make a video file ?

You can play raw .264 with mpv/mplayer/vlc or similar apps, it can be muxed to mp4 with ffmpeg like this for example ffmpeg -i stream.264 stream.mp4. I know there are some native Go mp4 demuxer/muxer but never tried to use them.

just tried it. It works.
just used brew install ffmpeg to try it.

Quality is very high too. Pretty cool !!

Now thinking about to get it real time now....
Screen recording whilst streaming it out as mp4 for example.
Maybe its possible to setup ffmpg so that it can recieve "packets" from the golang code doing the encoding to x264. Not sure at all has have not done much of this sort of video stuff.

ffmpeg could use -r to assign frame per second, i.e.
ffmpeg -r 10 screen.x264 stream.mp4

It appears that what I thought is mp4 muxer/demuxer in pure Go actually uses ffmpeg. So you can use ffmpeg bindings for muxing, like https://github.com/nareix/joy4 or https://github.com/giorgisio/goav .

This muxer in JS looks very interesting https://github.com/samirkumardas/jmuxer .