Seite 1 von 1

how to configure/compile ffmpeg for twitch.tv

BeitragVerfasst: Feb 27th, '15, 09:33
von meisterlampe
Hi,

Dies ist jetzt nicht unbediengt eine Mageia-spezifische Frage, aber eventuel kann mir der eine oder andere User helfen :)

Weis jemand zufällig wie man unter Mageia ffmpeg mit x264 codec und sound unterstützung für streaming (z.B zu twitch.tv) zum laufen bekommt? (Bzw. was man alles dafür braucht?)
Ich bin schon durch viele Tutorials im netz durch gegangen und habe mir jetzt ffmpeg mit x264 codec selbst compiliert. Aber es scheint als fehlen mir noch andere Module zu fehlen.
Dummerweise finde ich nur ffmpeg skripte die extrem lang sind, und keiner schreibt hin welche genauen Abhänigkeiten dort vorhanden sind ;(

Hier ein paar beispiel Befehle:

Code: Alles auswählen
 INRES="1920x1080" # input resolution
     OUTRES="1920x1080" # output resolution
     FPS="15" # target FPS
     GOP="30" # i-frame interval, should be double of FPS,
     GOPMIN="15" # min i-frame interval, should be equal to fps,
     THREADS="2" # max 6
     CBR="1000k" # constant bitrate (should be between 1000k - 3000k)
     QUALITY="ultrafast"  # one of the many FFMPEG preset
     AUDIO_RATE="44100"
     STREAM_KEY="$1" # use the terminal command Streaming streamkeyhere to stream your video to twitch or justin
     SERVER="live-fra" # twitch server in frankfurt, see http://bashtech.net/twitch/ingest.php for list
     
     ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 -f alsa -i pulse -f flv -ac 2 -ar $AUDIO_RATE \
       -vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $CBR -maxrate $CBR -pix_fmt yuv420p\
       -s $OUTRES -preset $QUALITY -tune film -acodec libmp3lame -threads $THREADS -strict normal \
       -bufsize $CBR "rtmp://$SERVER.twitch.tv/app/$STREAM_KEY"


Code: Alles auswählen
ffmpeg -f x11grab -s 1920x1200 -r 15 -i :0.0 -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_********_******************************"


Code: Alles auswählen
ffmpeg -f x11grab -s 1920x1200 -r 15 -i :0.0 -f pulse -ac 2 -i default -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -c:a libmp3lame -ab 96k -ar 22050 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_********_******************************"



Danke für eventuelle Antworten ;)

Re: how to configure/compile ffmpeg for twitch.tv

BeitragVerfasst: Feb 27th, '15, 14:05
von jkowalzik
Hallo!
Lies auch mal das: http://praxistipps.chip.de/twitch-tv-im ... ehts_27646
Vielleicht kannst du es "umbiegen" :?:

Gruß
J.

Re: how to configure/compile ffmpeg for twitch.tv

BeitragVerfasst: Feb 27th, '15, 18:48
von meisterlampe
Mmh das ist glaube ich nur zum schauen von twitch.tv, ich möchte aber dorthin selber streamen ;)

Re: how to configure/compile ffmpeg for twitch.tv

BeitragVerfasst: Feb 27th, '15, 19:15
von doktor5000
Warum musst du es denn unbedingt selbst kompilieren, was geht denn nicht wenn du einfach ffmpeg aus tainted nimmst? Da ist alles aktiviert was ffmpeg kann, bis auf opencv:

Code: Alles auswählen
┌─[doktor5000@Mageia5]─[19:09:25]─[~]
└──╼ ffmpeg --help
ffmpeg version 2.4.6 Copyright (c) 2000-2015 the FFmpeg developers
  built on Feb 16 2015 12:05:48 with gcc 4.9.2 (GCC)
  configuration: --prefix=/usr --enable-shared --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --disable-stripping --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --disable-encoder=vorbis --enable-libvpx --enable-x11grab --enable-runtime-cpudetect --enable-libdc1394 --enable-libschroedinger --enable-librtmp --enable-libspeex --enable-libfreetype --enable-libnut --enable-libgsm --enable-libcelt --enable-libopus --disable-libopencv --enable-libopenjpeg --enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug --enable-libass --enable-gnutls --enable-libcdio --enable-libpulse --enable-libv4l2 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libx264 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libxvid
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...