acowley / ffmpeg-light

Minimal Haskell bindings to the FFmpeg library
BSD 3-Clause "New" or "Revised" License
67 stars 29 forks source link

Encoder timebase is not set. Couldn't open codec. #33

Closed TetsuHari closed 8 years ago

TetsuHari commented 8 years ago

Hey, I tried running the example code (demo/Main.hs), but for some reason ffmpeg can't open codecs:

[libx264 @ 0x7fa493028400] The encoder timebase is not set.
ffmpegtest: Couldn't open codec

I'm using OS X 10.11.5, and homebrew installed ffmpeg version 3.1.3.

acowley commented 8 years ago

Woof. I don't see this with ffmpeg-3.0.2, so perhaps it's a change in 3.1. I'll have to sort out that upgrade. In the meantime, have you picked up an idea of what we need to be doing to set the timebase?

TomMD commented 8 years ago

I've updated to ffmpeg 3.1.3 on my OS X system and can reproduce the problem.

acowley commented 8 years ago

I pushed the fix to master, but it's weird. It seems like we used to set the time_base field of the codec context, but specifically stopped doing so because it triggered a deprecation warning. I uncommented the line, and demo is working with ffmpeg-3.1.3 now.