On 12/12/13 05:10, Jeremy Hansen wrote: > > > On Dec 11, 2013, at 5:32 AM, Luca Barbato <[email protected]> wrote: > >> On 11/12/13 03:41, Jeremy Hansen wrote: >>> >>> Right now I’m using avconv to capture video from a BlackMagic Design Mini >>> Recorder PCIe card. This is working great. My next step is to trying to >>> stream live to a rtmp server (Using nginx and the rtmp module). >>> >>> Here’s my current command line: >>> >>> bmdcapture -C 0 -m 14 -V 3 -A 2 -F nut -f pipe:1 | \ >>> avconv -y -i - -c:v libx264 -c:a aac -ar 44100 -strict experimental -s >>> 640x360 -b:a 160k /pub/video/"$SHOW"_$TIME.mp4 >>> >>> What would I have to do to stream to rtmp as well? >>> >> >> Have a rtmp server somewhere (crtmpd is my current favourite) and >> replace /pub/video/"$SHOW"_$TIME.mp4 with rtmp://serverhost/app/path/ > > Understood, but I’m trying to write to both a file and a stream > simultaneously. > > I have this working…meaning, it starts, but rapidly fails after a few > moments. Here’s my current command line: > > bmdcapture -C 0 -m 14 -V 3 -A 2 -F nut -f pipe:1 | avconv -y -i - -copytb > -c:v libx264 -c:a aac -ar 44100 -strict experimental -s 640x360 -b:a 160k > /pub/video/"$SHOW"_$TIME.mp4 -f flv -c:v libx264 -c:a aac -ar 22050 -strict > experimental -s 384x216 -b:a 64k rtmp://live.mysite.com/myapp/video > > But it fails after some moments with this error: > > Stopping Capture 22 q=28.0 q=31.0 size= 5138kB time=62.48 bitrate= > 673.6kbits/s > Failed to update header with correct duration.0kB time=62.96 bitrate= > 672.7kbits/s > [flv @ 0x248b7c0] Failed to update header with correct file size. > > Any clues as to what this is?
Your system is too probably slow, add -preset ultrafast so x264 won't tax it too much. crtmpd has a commercial variant doing pretty much all you want streaming-wise, I hadn't tried myself but I heard good informations about it. lu _______________________________________________ libav-tools mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-tools
