tacman1123
19th November 2008, 19:21
I'm running a utility to create an image an mp4 file. The frames look right in Avisynth, they look right in AVS Video ReMaker, but when I try to extract a single image using ffmpeg, the frame numbers are off by a significant amount (several seconds).
My theory: I installed haali splitter and ffdshow yesterday, so now mp4 files playing correctly. Maybe the ffmpeg library reads the file directly and skips some critical decoding, causing the frames to be off.
I was hoping to dynamically create images from the mp4 file. I can't use ImageWriter, because I want it to be dynamic (and I want it to run under 'nix). It appears that MOST of the time extracting frames works, but in this case it doesn't. I can post the mp4 file if that's helpful, but maybe somebody knows if my theory holds any water.
Any suggestions for a dynamic image extractor that pulls still frames out of an mp4 file and can resize them, etc.?
Here's my Avisynth code that properly extracts the frame:
DirectShowSource("c:\avi\media\mp4\07dLvKGZ8D8.mp4").Trim(810, -1).ConvertToRGB32(matrix="Rec601", interlaced=false)
ImageWriter("c:\avi\media\mp4\problem_", type="jpg")
The mp4 file can be found at
http://videothoughts.com/wowza/avisynth/07dLvKGZ8D8.mp4
An example of the problem image is at
http://videothoughts.com/project/movietools/clip_image.php?full_fn=/usr/sites/wowza/avisynth/07dLvKGZ8D8.mp4&frame=810
The result of the Avisynth script above can be found at
http://videothoughts.com/wowza/avisynth/problem_000000.jpg
It's not just a zero-based, off by one, problem. Using the ffmpeg library I'm almost 100 frames off from using Avisynth (again, I believe Avisynth is accurate).
I guess the other issue, rather than the Haali Splitter, could be something to do with the frame rate, though that doesn't really feel right.
Thanks,
Tac
My theory: I installed haali splitter and ffdshow yesterday, so now mp4 files playing correctly. Maybe the ffmpeg library reads the file directly and skips some critical decoding, causing the frames to be off.
I was hoping to dynamically create images from the mp4 file. I can't use ImageWriter, because I want it to be dynamic (and I want it to run under 'nix). It appears that MOST of the time extracting frames works, but in this case it doesn't. I can post the mp4 file if that's helpful, but maybe somebody knows if my theory holds any water.
Any suggestions for a dynamic image extractor that pulls still frames out of an mp4 file and can resize them, etc.?
Here's my Avisynth code that properly extracts the frame:
DirectShowSource("c:\avi\media\mp4\07dLvKGZ8D8.mp4").Trim(810, -1).ConvertToRGB32(matrix="Rec601", interlaced=false)
ImageWriter("c:\avi\media\mp4\problem_", type="jpg")
The mp4 file can be found at
http://videothoughts.com/wowza/avisynth/07dLvKGZ8D8.mp4
An example of the problem image is at
http://videothoughts.com/project/movietools/clip_image.php?full_fn=/usr/sites/wowza/avisynth/07dLvKGZ8D8.mp4&frame=810
The result of the Avisynth script above can be found at
http://videothoughts.com/wowza/avisynth/problem_000000.jpg
It's not just a zero-based, off by one, problem. Using the ffmpeg library I'm almost 100 frames off from using Avisynth (again, I believe Avisynth is accurate).
I guess the other issue, rather than the Haali Splitter, could be something to do with the frame rate, though that doesn't really feel right.
Thanks,
Tac