Home > Forum > MF Video Encoder doesn't work with Directshow Editing Services

MF Video Encoder doesn't work with Directshow Editing Services

today 09:16 (7 hours ago)
Samuel M. wrote
Hi,
I'm working on a software that uses Directshow Editing Services for video editing and would like to use the Media Foundation video encoding filters to be able to use GPU enconding, but once I build and run the timeline, it always returns "Attempted to divide by zero." exception, no mater the H264 option, CPU, QSV, NVENC. It works fine on regular Directshow graphs.
So, my question is, have you ever tested these encoding filters with Directshow Editing Services?

This is the exception I'm receiving:

System.DivideByZeroException: Attempted to divide by zero.
at DirectShowLib.IMediaControl.Run()

In log file, there's only this:

0 - LL_DEBUG - [MuxFilter] Start

0 - LL_DEBUG - [0]
0 - LL_DEBUG - CreateEncoder
Reply
2 Answers
today 09:20 (6 hours ago)
Roman Miniailov agent wrote
Hi

Our VideoEditCore engine in Video Edit SDK .Net uses DES, so, yes, it's worked.

Be sure that VideoInfoHeader/DES video parameters have width/height and frame rate (average time per frame property) specified correctly.

Or you can provide small sample for us to test.
today 10:26 (5 hours ago)
Samuel M. wrote
Thanks for the quick response and the helpful tip.
The issue was indeed that I was not setting AvgTimePerFrame. It didn't seem to make difference with other encoders, but now it's working properly.