Difference between revisions of "file-format-examples"

From Microformats Wiki
Jump to navigation Jump to search
("length" is not a valid XHTML attribute, seemingly it was intended to be part of the "type" attribute but was left out.)
 
(7 intermediate revisions by 6 users not shown)
Line 36: Line 36:
 
** [http://www.eztakes.com/store/movie/Super-Size-Me-Movie-Download.jsp File Format Example]
 
** [http://www.eztakes.com/store/movie/Super-Size-Me-Movie-Download.jsp File Format Example]
 
** Information: type, size, color, color format, sound format, aspect ratio
 
** Information: type, size, color, color format, sound format, aspect ratio
 +
 +
* [http://www.sxc.hu/index.phtml stock.xchng Free Stock Photos]
 +
** [http://www.sxc.hu/photo/86518 stock.xchng file example]
 +
** Information: Screen size (pixels), Print size (dpi), File size (Kbytes).
  
 
* http://www.archive.org/details/xoc_SMW
 
* http://www.archive.org/details/xoc_SMW
Line 53: Line 57:
  
 
Currently, most programs utilize screen scrapers and partial downloads to detect file type and format information. For example, Songbird will guess a file type by parsing the file extension. Items such as bitrate and number of audio channels are retrieved from the header of the file, which must be downloaded from the server. Doing so creates a burden on the server when the information could just as easily be embedded in the HTML code for the website.
 
Currently, most programs utilize screen scrapers and partial downloads to detect file type and format information. For example, Songbird will guess a file type by parsing the file extension. Items such as bitrate and number of audio channels are retrieved from the header of the file, which must be downloaded from the server. Doing so creates a burden on the server when the information could just as easily be embedded in the HTML code for the website.
 +
 +
Right now, we seem to have two proposed approaches to the problem:
 +
 +
Example markup:
 +
 +
The Gorge - MPEG video (22MB, MP3 192Kbps audio, MPEG-2 video)
 +
 +
1. Use the 'type'[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17] field in the anchor element for file format, example:
 +
<pre>
 +
  <a type="video/mpeg; audio-codec=MP3,
 +
            audio-codec-sample-rate=192Kbps, video-codec=MPEG-2,
 +
            length=23068672"
 +
      href="/angels_arete.mpg">The Gorge - MPEG video</a>
 +
      (22MB, MP3 192Kbps audio, MPEG-2 video)
 +
</pre>
 +
 +
2. Create a file-format uF, example:
 +
<pre>
 +
  <div class="hFileFormat">
 +
    <a href="/angels_arete.mpg">The Gorge - MPEG video</a>
 +
    (<abbr class="size-in-octets" title="23068672">22MB</abbr>,
 +
    <span class="audio-codec">MP3</span>
 +
    <abbr class="audio-codec-sample-rate" title=192000>192Kbps</abbr>
 +
    audio, <span class="video-codec">MPEG-2</span> video)
 +
  </div>
 +
</pre>
  
 
== Proposal ==
 
== Proposal ==
Line 63: Line 93:
  
 
* [[music-info-examples]]
 
* [[music-info-examples]]
 +
* [[rel-enclosure]]
 
* ''Normative references for tags used''
 
* ''Normative references for tags used''
 +
* Thoughts on Video and Audio Microformats by Charles Iliya Krempeaux [http://changelog.ca/log/2005/10/16/thoughts_on_video_and_audio_microformats]

Latest revision as of 22:20, 8 April 2009

File Format

There is a clear differentiation between the content of a file (a song) and the format of a file (MP3). This exploratory discussion focuses on the need for displaying file format information on web pages.

The Problem

There is a clear differentiation between the content of a file (a song) and the format of a file (MP3). A song (content) can be represented as an AAC audio file (format), or an MPEG-2 music video (format). It is beneficial to identify file content along with available file formats on a web page to ensure that all download options are clear to site visitors.

  • Example 1:
    • audio-info (content): A song called "Hung Up" by "Madonna"
    • file-format (format): 4.5MB MP3 file encoded at 192Kbps bitrate.
  • Example 2:
    • audio-info (content): A music video called "Hung Up" by "Madonna"
    • file-format (format): 35MB AVI file, MP3 audio codec encoded at 192Kbps, DiVX video codec encoded at 600Kbps

The goal of file-format is to define a method of markup for file format information such as size, type, codec, bit-rate, sampling rate, and other file format specific variables.

Participants

Real-World Examples

Existing Practices

Summary of common patterns discovered

HTTP and FTP accessible directory listings are the most common example of file format. These often include at least file extension and size.

Other attempts to solve The Problem

Currently, most programs utilize screen scrapers and partial downloads to detect file type and format information. For example, Songbird will guess a file type by parsing the file extension. Items such as bitrate and number of audio channels are retrieved from the header of the file, which must be downloaded from the server. Doing so creates a burden on the server when the information could just as easily be embedded in the HTML code for the website.

Right now, we seem to have two proposed approaches to the problem:

Example markup:

The Gorge - MPEG video (22MB, MP3 192Kbps audio, MPEG-2 video)

1. Use the 'type'[1] field in the anchor element for file format, example:

   <a type="video/mpeg; audio-codec=MP3,
            audio-codec-sample-rate=192Kbps, video-codec=MPEG-2,
            length=23068672"
      href="/angels_arete.mpg">The Gorge - MPEG video</a>
      (22MB, MP3 192Kbps audio, MPEG-2 video)

2. Create a file-format uF, example:

   <div class="hFileFormat">
    <a href="/angels_arete.mpg">The Gorge - MPEG video</a>
    (<abbr class="size-in-octets" title="23068672">22MB</abbr>,
    <span class="audio-codec">MP3</span>
    <abbr class="audio-codec-sample-rate" title=192000>192Kbps</abbr>
    audio, <span class="video-codec">MPEG-2</span> video)
   </div>

Proposal

  • Early drafts
    • file-format-brainstorming
    • file-format-proposal
    • file-format-microformat

See Also