Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT]: Detecting frames at aspect-ratio-changes in a video file?
Date: Sat, 02 Jul 2011 06:59:43
Message-Id: 20110702065809.GA27100@grusum.endjinn.de
In Reply to: Re: [gentoo-user] [OT]: Detecting frames at aspect-ratio-changes in a video file? by meino.cramer@gmx.de
1 Hello,
2
3 On Sat, 02 Jul 2011, meino.cramer@×××.de wrote:
4 >David Haller <gentoo@×××××××.de> [11-07-02 07:12]:
5 >> On Sat, 02 Jul 2011, meino.cramer@×××.de wrote:
6 >> >is there a software, a tool, a "something" which with it is possible
7 >> >to print the frame numbers of those frames in a video file, which are
8 >> >at positions, where the aspect-ratio changes?
9 >>
10 >> Try
11 >>
12 >> mplayer -nosound -benchmark -vo null FILE
13 >>
14 >> the third column is the frameno and aspect changes should be logged. I
15 >> don't have a file to test with though.
16 >
17 >thank you for your reply ! :)
18 >
19 >It reports the aspect ratio changes...but it does not report the
20 >frames, at which it happens...
21
22 Have a look at the last frameno of the "progress" before the reported
23 aspect change in mplayer's output. That frame or the following is the
24 one you're looking for. It should look something like this:
25
26 Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
27 VO: [null] 640x360 => 640x360 Planar YV12 [zoom]
28 V: 41.7 1044/1044 1% 0% 0.0% 0 0
29 [aspect change reported here, can't remember what the message is]
30 V: .... [more progress]
31
32 So, in this constructed case aspect change would be from frame 1044 to
33 frame 1045 I think.
34
35 This is from memory, so point me to a sample file if you need more
36 details.
37
38 Oh, you can also use 'avidemux' to load a file and navigate to
39 specific frames. It's just that avidemux doesn't scale anamorphic
40 stuff correctly, so you'd have to look at the output "view" whether an
41 aspect change happens between two frames.
42
43 There's also a program that tries to detect advertising, IIRC also
44 using aspect changes as indicators. Its name escapes me ATM.
45
46 HTH,
47 -dnh
48
49 --
50 Research is what I'm doing when I don't know what I'm doing.
51 -- Wernher von Braun

Replies