First, thank you to everybody involved for a great project. This thread was a great help during the installation of istreamdev.
Here's what I can contribute:
I am running istreamdev on an rusty P4 1,5GHz w/o graphic adapter. After default install, I experienced heavy performance issues, like mentioned of the first pages of this thread. However, there is a way to get to decent results on a cpu like this as well.
My first mistake was, yasm was not installed, when I compiled libx264, thus the cpu optimizations (MMX, SSE, x64...) were not enabled. Simply install yasm BEFORE compiling libx264 (I know the posted howto tells you, anyhow i missed it). impact on cpus < 2 GHz is huge. Check in ffmpeg log for cpuextensions enabled.
Second, I strongly recommend using ffmpeg with presets, instead of listing each parameter individualy.
There exist two ipod constraints: ipod320 and ipod640, the latter one beeing for either tv-out or new iphone resolution. I use ipod320 for my ipodtouch 2g.
Direct impact on the videoquality and therefore cpu usage is given by the quality prefix. you can choose from: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
ultrafast yielding the worst quality, yet the lowest cpu usage, while slow should be best choice for modern dualcore or better.
On my 1,5 GHz cpu I get adequate results using -vpre veryfast -vpre ipod320 in combination with the 3G stream. CPU works at ~ 90%.
for this i have to change istream.sh
# Start ffmpeg #(trap "rm -f ./ffmpeg.pid; rm -f ./fifo" EXIT HUP INT TERM ABRT; \ # $FFMPEGPREFIX | $FFPATH -i "$STREAM" -deinterlace -f mpegts -acodec libmp3lame -ab $ARATE -ac 2 -s $XY -vcodec libx264 -b $VRATE -flags +loop \ # -cmp \+chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 \ # -sc_threshold 40 -i_qfactor 0.71 -bt $VRATE -maxrate $VRATE -bufsize $VRATE -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 \ # -qmin 10 -qmax 51 -qdiff 4 -level 30 -g 30 -async 2 -threads 4 - 2>$FFMPEGLOG >./fifo) &
to
# Start ffmpeg with x264 and aac (trap "rm -f ./ffmpeg.pid; rm -f ./fifo" EXIT HUP INT TERM ABRT; \ $FFMPEGPREFIX | $FFPATH -i "$STREAM" -f mpegts -acodec libfaac -ab $ARATE -ac 2 -s $XY -vcodec libx264 -b $VRATE \ -bt $VRATE -vpre veryfast -vpre ipod320 -threads 0 - 2>$FFMPEGLOG >./fifo) &
Conclusion is, if you're experiencing performance issues, glitches, audiosynchronity issues, etc, play with the different preset params, and check your cpu usage (top, or whatever tool you like) until you get a setting, your cpu can handle.
Maybe codemaintainers can implement the presets in the config.php as a parameter for istream.sh in an future version.
Additional notes:
the change from libmp3lame to libfaac did not change anything considering cpu usage, i just kept this for maintaining format standards.
thread parameter is set to 0, which should generally be the best option. ffmpeg selects the optimum number of threads this way. on a dual/quadcore you may test explicitly the threads 2 or threads 4 parameter. Another proposal for the config.
Again thank you for your work,
hope I could contribute