Issue title: FFMPEG Video Capture fails
 Issue body: I am trying to capture video using FFmpeg and Directshow(https://github.com/rdp/screen-capture-recorder-to-video-windows-free) filter but it works sometimes and fails some time

Start FFmpeg
arguments= -y -rtbufsize 100M -f dshow -framerate 60 -i video="screen-capture-recorder":audio="Microphone Array (Realtek Audio)" -c:v libx264 -r 60 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p -s 940x576 -c:a aac -strict -2 -ac 2 -b:a 128k "C:\Users\ankur\AppData\Roaming\Take by MangoApps\Recent\Temp\1.mp4"

Call WriteInput("q"); 
    public void WriteInput(string input)
        {
            if (processRunning && process != null && process.StartInfo != 
                null && process.StartInfo.RedirectStandardInput)
            {
                process.StandardInput.WriteLine(input);
            }
        }


Getting Error

8/20/2018 6:56:54 PM - ****VIDEO ERROffmpeg version N-84348-gdb7a05d Copyright (c) 2000-2017 the FFmpeg developers
          built with gcc 6.3.0 (GCC)
          configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
          libavutil      55. 50.100 / 55. 50.100
          libavcodec     57. 83.101 / 57. 83.101
          libavformat    57. 66.105 / 57. 66.105
          libavdevice    57.  3.100 / 57.  3.100
          libavfilter     6. 78.100 /  6. 78.100
          libswscale      4.  3.101 /  4.  3.101
          libswresample   2.  4.100 /  2.  4.100
          libpostproc    54.  2.100 / 54.  2.100
        Guessed Channel Layout for Input Stream #0.1 : stereo
        Input #0, dshow, from 'video=screen-capture-recorder:audio=Microphone Array (Realtek Audio)':
          Duration: N/A, start: 29271.852000, bitrate: N/A
            Stream #0:0: Video: rawvideo, bgr0, 940x576, 60 fps, 60 tbr, 10000k tbn, 10000k tbc
            Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
        Stream mapping:
          Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
          Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
        Press [q] to stop, [?] for help
        [libx264 @ 0000000002553d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
        [libx264 @ 0000000002553d40] profile Constrained Baseline, level 3.2
        [libx264 @ 0000000002553d40] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=28.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
        Output #0, mp4, to 'C:\Users\ankur\AppData\Roaming\Take\Recent\Temp\0.mp4':
          Metadata:
            encoder         : Lavf57.66.105
            Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p(progressive), 940x576, q=-1--1, 60 fps, 15360 tbn, 60 tbc
            Metadata:
              encoder         : Lavc57.83.101 libx264
            Side data:
              cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
            Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
            Metadata:
              encoder         : Lavc57.83.101 aac
        frame=   31 fps=0.0 q=27.0 size=     125kB time=00:00:00.50 bitrate=2043.9kbits/s speed=0.991x    
        frame=   62 fps= 61 q=20.0 size=     189kB time=00:00:01.01 bitrate=1522.0kbits/s speed=1.01x    
        frame=   93 fps= 61 q=22.0 size=     220kB time=00:00:01.53 bitrate=1177.1kbits/s speed=1.01x    
        frame=  123 fps= 61 q=20.0 size=     253kB time=00:00:02.03 bitrate=1018.2kbits/s speed=1.01x    
        frame=  153 fps= 61 q=20.0 size=     263kB time=00:00:02.53 bitrate= 851.5kbits/s speed=   1x    
        frame=  184 fps= 61 q=23.0 size=     273kB time=00:00:03.05 bitrate= 734.0kbits/s speed=1.01x    
        frame=  214 fps= 61 q=20.0 size=     323kB time=00:00:03.55 bitrate= 745.4kbits/s speed=   1x    
        frame=  244 fps= 60 q=20.0 size=     341kB time=00:00:04.05 bitrate= 689.7kbits/s speed=   1x    
        frame=  274 fps= 60 q=22.0 size=     465kB time=00:00:04.55 bitrate= 837.4kbits/s speed=   1x    
 Comments: 
 Comment 0: That seems to be succeeding??

On Monday, August 20, 2018, ankur4747github <nhill@example.com>
wrote:
> I am trying to capture video using FFmpeg and Directshow(
https://github.com/rdp/screen-capture-recorder-to-video-windows-free)
filter but it works sometimes and fails some time
>
> Start FFmpeg
> arguments= -y -rtbufsize 100M -f dshow -framerate 60 -i
video="screen-capture-recorder":audio="Microphone Array (Realtek Audio)"
-c:v libx264 -r 60 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt
yuv420p -s 940x576 -c:a aac -strict -2 -ac 2 -b:a 128k
"C:\Users\ankur\AppData\Roaming\Take by MangoApps\Recent\Temp\1.mp4"
>
> Call WriteInput("q");
> public void WriteInput(string input)
> {
> if (processRunning && process != null && process.StartInfo !=
> null && process.StartInfo.RedirectStandardInput)
> {
> process.StandardInput.WriteLine(input);
> }
> }
>
> Getting Error
>
> 8/20/2018 6:56:54 PM - ****VIDEO ERROffmpeg version N-84348-gdb7a05d
Copyright (c) 2000-2017 the FFmpeg developers
> built with gcc 6.3.0 (GCC)
> configuration: --enable-gpl --enable-version3 --enable-cuda
--enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx
--enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig
--enable-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-lzma --enable-zlib
> libavutil 55. 50.100 / 55. 50.100
> libavcodec 57. 83.101 / 57. 83.101
> libavformat 57. 66.105 / 57. 66.105
> libavdevice 57. 3.100 / 57. 3.100
> libavfilter 6. 78.100 / 6. 78.100
> libswscale 4. 3.101 / 4. 3.101
> libswresample 2. 4.100 / 2. 4.100
> libpostproc 54. 2.100 / 54. 2.100
> Guessed Channel Layout for Input Stream #0.1 : stereo
> Input #0, dshow, from 'video=screen-capture-recorder:audio=Microphone
Array (Realtek Audio)':
> Duration: N/A, start: 29271.852000, bitrate: N/A
> Stream #0:0: Video: rawvideo, bgr0, 940x576, 60 fps, 60 tbr, 10000k tbn,
10000k tbc
> Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
> Stream mapping:
> Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
> Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
> Press [q] to stop, [?] for help
> [libx264 @ 0000000002553d40] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
> [libx264 @ 0000000002553d40] profile Constrained Baseline, level 3.2
> [libx264 @ 0000000002553d40] 264 - core 148 r2762 90a61ec - H.264/MPEG-4
AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html -
options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4
lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=28.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
> Output #0, mp4, to
'C:\Users\ankur\AppData\Roaming\Take\Recent\Temp\0.mp4':
> Metadata:
> encoder : Lavf57.66.105
> Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p(progressive), 940x576, q=-1--1, 60 fps, 15360 tbn, 60 tbc
> Metadata:
> encoder : Lavc57.83.101 libx264
> Side data:
> cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo,
fltp, 128 kb/s
> Metadata:
> encoder : Lavc57.83.101 aac
> frame= 31 fps=0.0 q=27.0 size= 125kB time=00:00:00.50
bitrate=2043.9kbits/s speed=0.991x
> frame= 62 fps= 61 q=20.0 size= 189kB time=00:00:01.01
bitrate=1522.0kbits/s speed=1.01x
> frame= 93 fps= 61 q=22.0 size= 220kB time=00:00:01.53
bitrate=1177.1kbits/s speed=1.01x
> frame= 123 fps= 61 q=20.0 size= 253kB time=00:00:02.03
bitrate=1018.2kbits/s speed=1.01x
> frame= 153 fps= 61 q=20.0 size= 263kB time=00:00:02.53 bitrate=
851.5kbits/s speed= 1x
> frame= 184 fps= 61 q=23.0 size= 273kB time=00:00:03.05 bitrate=
734.0kbits/s speed=1.01x
> frame= 214 fps= 61 q=20.0 size= 323kB time=00:00:03.55 bitrate=
745.4kbits/s speed= 1x
> frame= 244 fps= 60 q=20.0 size= 341kB time=00:00:04.05 bitrate=
689.7kbits/s speed= 1x
> frame= 274 fps= 60 q=22.0 size= 465kB time=00:00:04.55 bitrate=
837.4kbits/s speed= 1x
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.<
https://ci5.googleusercontent.com/proxy/BLg_qPoBKOCeN30drHuGW1XIatqnxUYojIsOKOiW4S7K8ZsejddPwyheyAybcE0ubyP89fpqkYlA2kgUaNdUcSwLyhidMUrN9sN2f8BZ8EW04Fo04zvXh0YtXK2zbz9sl4PJ2TEzYmR9UbbyXFoGdKmRvT1xeg=s0-d-e1-ft#https://github.com/notifications/beacon/AAAw0KDs69dN4MmsYtL9IP2vz6W8EhOnks5uSrs-gaJpZM4WEA6U.gif>

 Comment 1: failing example please
{'source': 'GithubIssues', 'repo_name_with_owner': 'rdp/screen-capture-recorder-to-video-windows-free', 'issue_id': 352138417, 'repo_stars': 1825.0}