Resolution attribute for video links?

Locked
User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Resolution attribute for video links?

Post by Scintilla » Fri Oct 08, 2004 12:05 am

It occurred to me today, why not let creators specify a resolution for each of their video links (optional)?

It seems to me that that's the only major video attribute that isn't listed so far... and I wouldn't be surprised if it was often a factor in people deciding which version of a video to get if multiple versions are offered (people with older computers wanting something they won't choke on, quality Nazis wanting highest clarity, etc.), and I wouldn't think it would be that hard to implement (not that I know anything about PHP).
It could even work for Local links if the file uploaded was an MPEG (like the other attributes do now)...
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
AbsoluteDestiny
Joined: Wed Aug 15, 2001 1:56 pm
Location: Oxford, UK
Contact:
Org Profile

Post by AbsoluteDestiny » Fri Oct 08, 2004 12:37 am

The information is worked out automatically if it's an mpeg but Phade didnt include something that read avi headers, so it only happens for mpegs.

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Fri Oct 08, 2004 1:13 am

Yeah, I saw that the resolution's part of the file info that comes up on local MPEG downloads (at the actual download screen), so that's why I mentioned that part of it.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Re: Resolution attribute for video links?

Post by trythil » Fri Oct 08, 2004 3:02 am

Scintilla wrote:I wouldn't think it would be that hard to implement (not that I know anything about PHP)
Assuming the transcode toolset is installed on nago (or whereever this file can be accessed to most conveniently generate and store this data), it isn't hard. Here's what you get on standard output from tcprobe when you put it on an AVI file:

Code: Select all

bash-2.05b$ tcprobe -i /mnt/usbdrive/amv/AqStud\(Scintilla\)-EvaBebop.avi 
[tcprobe] RIFF data, AVI video
[avilib] V: 23.976 fps, codec=DX50, frames=2502, width=512, height=384
[avilib] A: 44100 Hz, format=0x55, bits=0, channels=2, bitrate=192 kbps,
[avilib]    2491 chunks, 2503528 bytes, CBR
[tcprobe] summary for /mnt/usbdrive/amv/AqStud(Scintilla)-EvaBebop.avi, (*) = not default, 0 = not detected
import frame size: -g 512x384 [720x576] (*)
       frame rate: -f 23.976 [25.000] frc=1 (*)
      audio track: -a 0 [0] -e 44100,0,2 [48000,16,2] -n 0x55 [0x2000] (*)
                   bitrate=192 kbps
           length: 2502 frames, frame_time=41 msec, duration=0:01:44.354
Resolution, framerate, file length, and a lot more. Extraction is then a matter of string processing, which is easy to do in PHP.

I'm not sure what tool is currently being used to extract data about MPEGs. My intuition says mpeg3dump (from libmpeg3) but I could be wrong...

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Fri Oct 08, 2004 3:06 am

[more]

Should the execution of an external program not be desired (for security reasons; it's a valid justification), it's possible to just interface to avilib (see avilib documentation) by writing a small PHP extension.

User avatar
Flint the Dwarf
Joined: Wed Jan 16, 2002 6:58 pm
Location: Ashland, WI
Org Profile

Post by Flint the Dwarf » Fri Oct 08, 2004 3:20 am

And why the hell isn't Trythil one of the site programmers?
Kusoyaro: We don't need a leader. We need to SHUT UP. Make what you want to make, don't make you what you don't want to make. If neither of those applies to you, then you need to SHUT UP MORE.

User avatar
AbsoluteDestiny
Joined: Wed Aug 15, 2001 1:56 pm
Location: Oxford, UK
Contact:
Org Profile

Post by AbsoluteDestiny » Fri Oct 08, 2004 3:22 am

flint_the_dwarf wrote:And why the hell isn't Trythil one of the site programmers?
Who says he isnt?

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Post by trythil » Fri Oct 08, 2004 7:58 am

flint_the_dwarf wrote:And why the hell isn't Trythil one of the site programmers?
I am, I just haven't done anything (yet) :P It's just that there's a lot of other stuff that I need to do before any .org work is done.

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Post by Scintilla » Fri Oct 08, 2004 8:34 am

Hey, the default resolution and framerate are PAL :P

I was originally referring more to direct and indirect links, and having the user input the resolution him/herself, but this talk is good too :)
(I'm never quite comfortable when I can't see the file info on a local link...)
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

Locked

Return to “Site Help & Feedback”