CONTENTS

Home
Updates
Software
Electronics
Music
Resume
Contact


YouTube
Twitter
GitHub
LinkedIn

HTTPS VERSION


FFMPEG PATCH FOR MINGW

Related pages on www.mikekohn.net: Naken Web, Axis DBus

Introduction

FFMPEG is a set of libraries (libavcodec, libavformat, libavutil) for reading and writing audio/video file formats and decompressing and compressing their contents. In other words, FFMPEG is a program that can play audio and video files, do image processing on them, and create new files in many different formats.

My Patch

I was working on a project for connecting to an Axis 213 camera to read mpeg4 video in an RTSP stream. I was using the FFMPEG libraries to do this, but unfortunately the networking code only worked on Unix and BEOS operating systems and I need a cross platform solution. I submitted my patch to the FFMPEG people, and altho some of the people wanted to accept my patch, some of the people higher up in the project did not want to accept my patches, therefore I'm posting them here for anyone who needs networking support on Windows with FFMPEG. I really don't understand why Windows is such a big deal to them. I mean if people enjoy bobbing for apples in a toilet full of poop, I say let them.

NOTE: I am not a part of the FFMPEG team. I just simply changed a few lines of their code to make it compile and run on Windows.

CHANGES IN LATEST 2008 PATCH ARE:

  • UDP receive buffer size raised
  • #define usleep
  • Added gettimeofday()

CHANGES IN LATEST 2006 PATCHES ARE:

  • Change configure to allow network under MingW
  • Clean up BeOS headers and include MingW
  • Get rid of calls to the function read()/write() and change to cross-platform recv()/send()
  • Raise the size of the socket buffer
  • Fix a bug that allows ffmpeg to bind to more ports so that multiple instances of ffplay can run
  • Probably more stuff I'm forgetting

Note: The ffmpeg team has actually fixed most, if not everything that the 2006 patches take care of. For some reason I think they didn't fix the udp buffer length problems on Windows and they left out a Windows equivalent of usleep() and gettimeofday(). The 2008 patch here takes care of that.

Download

The 2006-11-05 patch works on Subversion code as of November 05, 2008

ffmpeg_kohn_rtsp_mingw-2008-11-05.patch

Copyright 1997-2024 - Michael Kohn