[FFmpeg-trac] #4320(ffmpeg:new): Incorrect work with SoX pipe
FFmpeg
trac at avcodec.org
Sun Feb 22 10:00:11 CET 2015
#4320: Incorrect work with SoX pipe
--------------------------------+--------------------------------------
Reporter: Ilya87 | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+--------------------------------------
Summary of the bug:
I want to capture sound from mic (and denoise it with sox filter)
simultaneously capture sound from loudspeakers (what you hear) (snd-aloop
module is loaded) and capture video.
How to reproduce:
My .asoundrc:
pcm.!default {
type asym
playback.pcm "LoopAndReal"
#capture.pcm "looprec"
capture.pcm "hw:0,0"
}
pcm.looprec {
type hw
card "Loopback"
device 1
subdevice 0
}
pcm.LoopAndReal {
type plug
slave.pcm mdev
route_policy "duplicate"
}
pcm.mdev {
type multi
slaves.a.pcm pcm.MixReale
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}
pcm.MixReale {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
pcm.MixLoopback {
type dmix
ipc_key 1025
slave {
pcm "hw:Loopback,0,0"
rate 48000
#rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192
}
}
{{{
% sox -t alsa default -t wav - noisered ~/speech.noise-profile 0.3 |
ffmpeg -y \
-framerate 30 -video_size 1280x720 -f x11grab -i :0.0+0,0 -i pipe:0 \
-f alsa -i looprec -c:v libx264 -preset veryfast -maxrate 3500k -b:v 3000k
\
-threads 1 -bufsize 3968k -vf "format=yuv420p" -g 60 -x264opts opencl -psy
0 \
-filter_complex amerge,pan="stereo:c0=1*c0+0.2*c2 : c1=1*c1+0.2*c3" \
-c:a aac -strict -2 -b:a 160k 123.mkv
ffmpeg version N-69508-gdeeba77
}}}
With above line I get laggy video capture (even with threads=3, Intel(R)
Core(TM) i5-2500 CPU @ 3.30GHz) and my terminal output spams "Past
duration ... too large", without sox pipe (and filter_complex option
obviously) video is smooth.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4320>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list