Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are many things which might cause your code to fail for you:</p> <ul> <li><p>Not all <a href="http://en.wikipedia.org/wiki/Motion_JPEG" rel="nofollow">MJPEG</a> streams are encoded in the MIME-like fashion your tutorial suggests.<br> Quoting <a href="http://en.wikipedia.org/wiki/Motion_JPEG#Disadvantages" rel="nofollow">Wikipedia</a>:</p> <blockquote> <p>[…] there is no document that defines a single exact format that is universally recognized as a complete specification of “Motion JPEG” for use in all contexts.</p> </blockquote> <p>For example, one may use MJPEG as the video codec of an <a href="http://en.wikipedia.org/wiki/Audio_Video_Interleave" rel="nofollow">AVI</a> (i.e. <a href="http://en.wikipedia.org/wiki/Resource_Interchange_File_Format" rel="nofollow">RIFF</a>) file. So make sure your input file is in the format the tutorial describes.</p></li> <li>The text <code>--myboundary</code> is almost certainly a placeholder. In a typical <a href="http://en.wikipedia.org/wiki/MIME#Multipart_messages" rel="nofollow">multipart MIME message</a>, the global MIME header will provide a <code>boundary</code> attribute, indicating what string is <em>actually</em> used to delimit parts. You'll have to prepend <code>--</code> to the string given there.</li> <li>As you are using <code>Reader</code> and <code>Writer</code>, you are operating on characters, not bytes. Depending on your locale, there might not be a 1:1 correspondence between these two, thus breaking the binary format of the data in the process. You should either operate on byte streams, or explicitely use some character encoding like ISO-8859-1 which <em>does</em> have such a 1:1 correspondence.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload