[FFmpeg-user] Problems with videostreaming via ffmpeg

Андрей Сморкалов andrey.smorkalov at gmail.com
Tue May 21 10:20:27 CEST 2013


Hello!

We are integrating video streaming via ffmpeg into the virtual
educational world vAcademia and are having difficulties with ffmpeg.
Our application works on zero core of the CPU and sometimes uses other
cores (typically it’s 10-15%). We set process affinity for the ffmpeg
to exclude using of the zero core.
We wrote two DirectShow filters for video and audio to give ffmpeg
dynamic image and sound from our world.

We run ffmpeg with command line like:

ffmpeg.exe -y -f dshow -i
video="vAcademiaCapture":audio="vAcademiaAudioCapture" -vcodec libx264
-preset medium -tune zerolatency -r 15 -s 318x240 -async 1 -acodec
libmp3lame -ab 64k -ar 22050 -maxrate 1550k -rtbufsize 8000k -f flv
rtmp://IP/livepkgr/livestream_46276

When CPU has 3 or 4 cores everything works fine. But if the CPU has
only two cores video streaming doesn't work. We get black screen in
the webplayer and via command line execution of ffmpeg we get errors
like "Failed to compensate for timestamp". We checked timestamps: they
are correct in both filters.

If we disable synchronized audio and video and use ffmpeg with command
line like:

ffmpeg.exe -y -f dshow -i video="vAcademiaCapture" -f dshow –i
audio="vAcademiaAudioCapture" -vcodec libx264 -preset medium
-tune zerolatency -r 15 -s 318x240 -async 1 -acodec libmp3lame -ab 64k
-ar 22050 -maxrate 1550k -rtbufsize 8000k  -f flv
rtmp://IP/livepkgr/livestream_46281

everything is fine even if the CPU has 2 cores. We think that ffmpeg
can't normally grab audio and video on only 1 free core. It seems like
there is a bug in ffmpeg with synchronized grabbing of video and audio
(race condition?).

On some laptops with 2 cores CPU video streaming with sound doesn't
work even if synchronized video and audio is disabled. We can see the
video but there is no sound. We don’t get any errors in ffmpeg
console.

We are using precompiled ffmpeg from http://ffmpeg.zeranoe.com/builds/

Any ideas?

with best regards,
Andrey.


More information about the ffmpeg-user mailing list