Brad Smith <[email protected]> writes:

> Here is an update to FFmpeg 4.1.1 and coupled ports updates.
>
> Any and all testing welcome.
>
> FFmpeg
> https://comstyle.com/ffmpeg/ffmpeg.diff

I successfully streamed dhewm3 from my OpenBSD gaming computer to my
OpenBSD streaming computer to twitch.tv. Both used ffmpeg 4.1.1. The
streaming computer used the `slow' preset for x264. The video and audio
were synced once I added the -thread_queue_size option. After a while,
the audio still has a chance of desyncing and will spit out warnings,
but I don't think this is a big deal because it is reliable for long
stretches of time. Thank you for the new ffmpeg.

dhewm3 computer was running this script:
--8<---------------cut here---------------start------------->8---
RES="1280x720"
FRAMES=30

AUDIO_RATE="44100"
AUDIO_CBR="320k"
SERVER=192.168.1.100

VIDEO="-c:v huffyuv"

ffmpeg -thread_queue_size 1024 -f x11grab -s $RES -framerate $FRAMES -i :0.0 \
        -thread_queue_size 1024 -f sndio -i snd/0.mon -ar $AUDIO_RATE -b:a 
$AUDIO_CBR \
        $VIDEO -f avi - | nc $SERVER 1337
--8<---------------cut here---------------end--------------->8---

streaming computer was running this script:
--8<---------------cut here---------------start------------->8---
. $HOME/.stream_key
INGEST=live-sea

# change these
CBR="2200k"
RES="1280x720"
FRAMES=30
PRESET="slow"

VIDEO="-c:v libx264 -preset $PRESET"
VIDEO="$VIDEO -b:v $CBR -minrate $CBR -maxrate $CBR"

nc -l 1337 | ffmpeg -i pipe:0 \
        -vf "format=yuv444p, \
            drawtext=textfile=$HOME/twitch.asc:reload=1:\
            fontfile=/usr/share/fonts/dejavu/DejaVuSansMono.ttf:\
            fontcolor=white:fontsize=24:x=10:y=16, format=yuv420p" \
        $VIDEO \
        -acodec copy \
        -threads 12 \
        -f flv "rtmp://$INGEST.twitch.tv/app/$STREAM_KEY"
--8<---------------cut here---------------end--------------->8---



Reply via email to