0

I am new with Directshow. Today i am trying to use Monogram x264 encoder filter with GraphStudioNext. But when i connect camera to monogram x264 encoder filter. There is an error. I don't know what intermediate filter do i need. Can you please help?

See the picture: http://tientrieu.net/wp-content/uploads/2016/08/how_to_use_monogram_x264_encoder.png

1 Answers1

0

You must check mediatypes supported by x264 filter. Usually it's on of YUV mediatypes (YUY2, I420, etc.). Which mediatypes supported by your camera? You can open webcam setting dialog in GraphStudioNext to check.

roman.minyaylov
  • 203
  • 1
  • 9
  • Hello. I checkedmy camera (Integrated Camera on Dell Vostro 3560 laptop), media type output is MEDIASUBTYPE_YUY2. See it: http://tientrieu.net/wp-content/uploads/2016/08/integrated_webcam.png The monogram x264 filter accept YV12 frame (according to the author: http://blog.monogram.sk/janos/2008/11/27/monogram-x264-encoder-1010/) So what do i need to do now? – Phung Tien Trieu Aug 18 '16 at 01:34
  • You need to write filter that convert YUY2 to YV12. You can use Intel IPP or libyuv to perform colorspace conversion. – roman.minyaylov Aug 18 '16 at 13:11
  • I used **YUV Transform** filter from http://www.gdcl.co.uk/downloads.htm to convert from YUY2 to YV12. Filters agree to connect and encoding is ok. But when i open output file, i can hear only audio can't see video. See my graph: http://tientrieu.net/wp-content/uploads/2016/08/monogram_x264_aac_graph.png I checked output file with ffmpeg, it seems there is an error at video stream. See the picture: http://tientrieu.net/wp-content/uploads/2016/08/ffmpeg_output.png Have you used the monogram x264 encoder? Success? – Phung Tien Trieu Aug 18 '16 at 14:57
  • As I remember Monogram have some MP4 muxer. In my projects I'm using commercial muxer/codecs. Also you can try Intel Media SDK filters, they have H264 encoder with source code (but not MP4 muxer / AAC encoder). – roman.minyaylov Aug 18 '16 at 18:05
  • Also try to connect H264 decoder to x264 encoder output, to check that frames encoded correctly. – roman.minyaylov Aug 18 '16 at 18:08