[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35191] aviread does not obey video time scale
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #35191] aviread does not obey video time scale |
Date: |
Thu, 29 Dec 2011 16:59:06 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 |
URL:
<http://savannah.gnu.org/bugs/?35191>
Summary: aviread does not obey video time scale
Project: GNU Octave
Submitted by: None
Submitted on: Thu 29 Dec 2011 04:59:05 PM UTC
Category: Libraries
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name: Grieviant
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.4
Operating System: Microsoft Windows
_______________________________________________________
Details:
I'm encountering a problem using aviread() to extract video frames from an
h264 encoded .mp4 file. aviinfo() gives
Filename = C:\Temp\GH1.MP4
FileSize = 11853799
FileModDate = 19-Dec-2011 11:14:06
NumFrames = 32
FramesPerSecond = 59.940
Width = 1280
Height = 720
ImageType = truecolor
VideoCompression = h264
Quality = 100
NumColormapEntries = 0
AudioFormat = aac
AudioRate = 48000
NumAudioChannels = 2
This all looks correct except for the NumFrames parameter. The video is 18
seconds in length and therefore has about 18*60 = 1080 frames (file size =
11.3 MB). Is aviinfo() maybe returning the number of key frames rather than
the total number of frames?
Anyway, on to the problem. When I read and display the first 5 frames with
aviread(), what I see is the 1st frame repeated 4 times, followed by the 5th
frame. It's as if aviread() is doing a coarse decimation rather than
interpolating at the correct points in time. This happens regardless of what
frame offset into the video stream I choose, not just at the start.
% Get video info
vinfo = aviinfo([dname,fname]);
vinfo
% Read and display a few frames
Nframes = 5;
Vc = cell(1,Nframes);
xframe = 1;
for(i=1:Nframes)
v = aviread([dname,fname], xframe+i-1);
Vc{i} = v;
end
for(i=1:Nframes)
figure;
axis equal;
image(Vc{i});
end
I should also mention that both QuickTime and VLC yield the correct results
when scrolling this video frame by frame. I've heard that VLC also uses
ffmpeg, so it would seem that the bug is unique to aviread() rather than a
problem with ffmpeg.
If it's really necessary I could post the images which show the results I'm
getting, but hopefully this description is good enough.
Octave 3.2.4 on Win7 64
video-1.0.2 package
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35191>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #35191] aviread does not obey video time scale,
anonymous <=