Changes between Version 25 and Version 26 of DirectShow

Jun 4, 2014, 12:42:39 AM (6 years ago)

wow, that -r option is deadly [bad]


  • DirectShow

    v25 v26  
    7474See the [ FFmpeg dshow input device documentation] for a list of more dshow options you can specify. For instance you can decrease latency on audio devices, or specify a video by "index" if two have the same name, etc.
     76=== Specifying input framerate ===
     78You can set framerate like {{{ffmpeg -f dshow -framerate 7.5 -i video=XXX}}}.  This instructs the device itself to send you frames at 7.5 fps [if it can].
     80Be careful *not* to specify framerate with the "-r" parameter, like this  {{{ffmpeg -f dshow -r 7.5 -i video=XXX}}}.  This actually specifies that the devices incoming PTS timestamps be *ignored* and replaced as if the device were running at 7.5 fps [so it runs at default fps, but its timestamps are treated as if 7.t fps].  This can cause the recording to have "video faster than audio" or, under high cpu load (if video frames are dropped) it will cause the video to fall "behind" the audio [after the recording is done, audio continues on--and highly out of sync].
     82If you want say 10 fps, and you device only supports 7.5 and 15 fps, then run it at fps then "downsample" to 10 fps.  There are a few ways to do this--you could specify your output to be 10 fps, like this: {{{ffmpeg -f dshow -framerate 15 -i video=XXX -r 10 output.mp4}}} or insert a filter to do the same thing for you: {{{ffmpeg -f dshow -framerate 15 -vf fps=fps=15 output.mp4}}}.
    7685== Buffering/Latency ==