Mime type setting for webm?

3,634 views
Skip to first unread message

Chris Belcher

unread,
Jan 2, 2011, 3:47:11 AM1/2/11
to webm-d...@webmproject.org
Greetings,

I'm a volunteer administrator for a website which hasn't been updated in years. One of our contributors is trying to upload some webm video, but the site rejects it, claiming it is a mime spoof. I've tried reconfiguring the mime types, but it still detects the file as an "application/octet stream" and rejects it though I've set up webm as both an application and as video. Any suggestions, or will this have to wait till we get a new HTML5 platform?

Thanks,
Chris B.

Lou Quillio

unread,
Jan 2, 2011, 2:33:51 PM1/2/11
to webm-d...@webmproject.org
On Sun, Jan 2, 2011 at 3:47 AM, Chris Belcher <cbel...@alchymedia.com> wrote:

> One of our contributors is trying to upload some webm video,
> but the site rejects it, claiming it is a mime spoof. I've
> tried reconfiguring the mime types, but it still detects the
> file as an "application/octet stream" and rejects it

Hi Chris,

Please explain "but the site rejects it". What server-side
application is making this rejection?

LQ


--
Lou Quillio
Webmaster
WebMProject.org
+1 518.285.0003   <= Mobile (gV)
+1 518.881.4256   <= Office

antistress

unread,
Jan 2, 2011, 7:15:15 PM1/2/11
to WebM Discussion

Chris Belcher

unread,
Jan 4, 2011, 3:43:09 AM1/4/11
to webm-d...@webmproject.org
Thanks, we are using a web platform called Dada, running on FreeBSD. here is the error message we get:

Attempted MIME type spoof. The file "ParliamentOneNation.webm" has a MIME type of "application/octet-stream" but suffix is ".webm".

The mime settings are

Generic Application webm

which seems to work for ogg theora video...

-----Original Message-----
From: webm-discu...@webmproject.org
Sent: Jan 3, 2011 9:31 AM
To: Digest Recipients
Subject: Digest for webm-d...@webmproject.org - 5 Messages in 3 Topics

Group: http://groups.google.com/a/webmproject.org/group/webm-discuss/topics

    Leandro Santiago <leandro...@gmail.com> Jan 03 06:16AM -0800 ^
     
    Hello to all. I'm new in this mailing list and a newbie in webm :-)
     
    I'm developing an application which works over http sending webm live
    streams.
     
    In fact I'm have some problems to start the stream part (the capture
    is working fine). There's no audio. Only video.
     
    The idea is my source of frames is not a file, but a camera device
    (currently I'm working with v4l and ip camera).
     
    The main problem is I can't find much information about the creation
    of webm videos. The libmatroska/libebml documentations are almost
    inexistent. The only documentation I found is the matroska spec.
     
    In the webm project website there isn't any information about the webm
    container (and the differences from mkv), neither informations about
    creating webm files and streams (vp8+mkv+vorbis), but only ivf files
    (I coudn't find any ivf file to test).
     
    I'm using ffmpeg (libav*) in my application (written in c++ on Linux),
    but I can't use the filesystem in the transmission process (it's
    basicly get the frame from camera and send to the client via http),
    but with ffmpeg, if you need to create a container, you must create a
    file and use the file system. So I can't create the webm container
    struct (header, etc) using ffmpeg. As I can create a stream without
    use the filesystem (I encode a frame and concat in a buffer in-
    memory), my initial idea was use libmatroska to create the webm
    container struct and ffmpeg to send the video data itself.
     
    Using tools as the webminspector, ebml-viewers and the matroska
    documentation I'm trying do understand this container.
     
    After read these documents [1] and [2]
     
    I created this struct about webm/matroska live stream:
     
    - Header (required)
    - Segment Information (must use the "unknow" size (all 1s in the
    size))
    - Track (informations about the streams (width, height, etc.)
    - Clusters (the data itself)
     
    To the http(s) side I'm using the gnu libmicrohttpd library (because
    the app also sends other kind of information, not only videos), and
    the continuation of my idea is:
     
    - the client connects and do the authentication process
    - the server sets the http response header (content-type: "video/
    webm", etc.)
    - the server creates the webm header (with Doc Type: webm)
    - the server creates the segment section (what does "must use the
    unknow size" mean?) and concat with the header
    - the server creates one track info about the video which will be
    sended with the informations: width, height, codec_id (V_VP8) and
    concat with the previous data.
    - the server sends this buffer to the client, indicating a webm video
    willl be send.
    - the server enter a loop where, while the client is connected, get a
    frame from camera, encode with vp8 and send to to the client.
    - when the client disconnect, clean all the allocated data.
     
    Do you agree with this approach?
     
    I also tested the flumotion server, which is able to create webm
    streams. Although it works fine with webm, its written in python, and
    it seems all codec logic is inside gstreamer.
     
    Then I got a sample of the stream, few seconds, and saved to the disk
    (using lynx -dump http://stream > stream.webm). The resulting file is
    perfectly playable, but of course I can't seek into it :-)
     
    But when I analise this file with the libwebm/sample program, I get
    this output:
    $ libwebm/sample webcam.webm
    libmkv verison: 1.0.0.10
    EBML Header
    EBML Version : 1
    EBML MaxIDLength : 4
    EBML MaxSizeLength : 8
    Doc Type : webm
    Pos : 28
     
    Segment::Load() failed.
     
    The ebml viewer I'm using [3] also stops with error after parse the
    header. Now I'm more confuse than before :-(
     
    I hope you understand my problem and sorry for my bad English. I
    really believe in a open web, using only open protocols and and open
    formats. But as developer it has been hard, but funny :-)
     
    I also posted these questions on the vpx, webm and matroska irc
    channels, but it seems there nobody can help me. So if anyone can help
    me, I thank very much :-)
     
    [1] http://www.matroska.org/technical/diagram/index.html
    [2] http://www.matroska.org/technical/streaming/index.html
    [3] http://code.google.com/p/ebml-viewer/

     

    Emanuele Colucci <emanuele...@gmail.com> Jan 02 03:54PM -0800 ^
     
    Hi to everyone,
    I'd like to make that Matlab's VideoReader can read .webm video clips.
    I installed gst-plugins-good, gst-plugins-bad and gst-plugins-bad, but
    it continues to be unable to read this format.
     
    Can anyone help me?
     
    Thank you.
     
    Emanuele.

     

    Lou Quillio <louqu...@google.com> Jan 02 08:19PM -0500 ^
     
    On Sun, Jan 2, 2011 at 6:54 PM, Emanuele Colucci
    > I'd like to make that Matlab's VideoReader can read .webm video clips.
    > I installed gst-plugins-good, gst-plugins-bad and gst-plugins-bad, but
    > it continues to be unable to read this format.
     
    You'll want *-base (say, 0.10.30), *-good (=> 0.10.23) and *-bad (=>
    0.10.19), and also libvpx. Newer is better. You may also need
    shared-mime-info => 0.71-2, or equivalent MIME-type updates for your
    system. [1]
     
    If you happen to be running Ubuntu, these are satisfied by the
    packages shipping with 10.10 (Maverick).
     
    Can't speak for Matlab video renderer specifically, though.
     
    LQ
     
     
    [1]: https://launchpad.net/ubuntu/maverick/+source/shared-mime-info/0.71-3

     
     
    --
    Lou Quillio
    Webmaster
    WebMProject.org

     


       
      > but the site rejects it, claiming it is a mime spoof. I've
      > tried reconfiguring the mime types, but it still detects the
      > file as an "application/octet stream" and rejects it
       
      Hi Chris,
       
      Please explain "but the site rejects it". What server-side
      application is making this rejection?
       
      LQ
       
       
      --
      Lou Quillio
      Webmaster
      WebMProject.org
      +1 518.285.0003   <= Mobile (gV)
      +1 518.881.4256   <= Office

       

        --
        You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
        To post to this group, send email to webm-d...@webmproject.org.
        To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
        For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.

        Lou Quillio

        unread,
        Jan 4, 2011, 11:58:50 AM1/4/11
        to webm-d...@webmproject.org
        On Tue, Jan 4, 2011 at 3:43 AM, Chris Belcher <cbel...@alchymedia.com> wrote:
        > Thanks, we are using a web platform called Dada, running on FreeBSD. here is the error message we get:
        >
        > Attempted MIME type spoof. The file "ParliamentOneNation.webm" has a MIME type of "application/octet-stream" but suffix is ".webm".
        >
        > The mime settings are
        >
        > video/webm
        > Generic Application webm
        > which seems to work for ogg theora video...

        I think this is an issue for Dada product support. It sounds like the
        application accepts user-submitted media, which it then attempts to
        validate -- but only folks familiar with the product know how it goes
        about this or, more specifically, how you can properly add a new,
        valid filetype.

        Sorry not to be more helpful.

        Chris Belcher

        unread,
        Jan 5, 2011, 3:51:16 PM1/5/11
        to webm-d...@webmproject.org
        Hi Lou,

        Dada is dead, so we will take this up once the migration to Drupal is done.

        Thanks!
        -Chris


        Kyle McFarlane

        unread,
        Jan 10, 2011, 10:48:44 AM1/10/11
        to WebM Discussion
        Maybe you just need a magic byte entry for webm... I'm guessing Dada
        just uses the file command? Idk if that's how it works on BSD
        though...
        Reply all
        Reply to author
        Forward
        0 new messages