<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Thank you for your help.</span></div><div><br><span></span></div><div><span>My mistake. I meant to say decrypt before decoding not after.</span></div><div><br><span></span></div><div><span>After reading your message as well as other messages, it appears it is easier to decrypt at the whole file level. I guess I need to implement a "muxer" similar to mkv and mp4. However, the documentation is not clear on what methods need to be implemented for the muxer. Can you please point me in the right direction?</span></div><div><br><span></span></div><div><span>Appreciate your help.</span></div><div><br><span></span></div><div><span>Regards,</span></div><div><span>Peter</span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new
 york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Loren Merritt <lorenm@u.washington.edu><br><b><span style="font-weight: bold;">To:</span></b> Mailing list for x264 developers <x264-devel@videolan.org><br><b><span style="font-weight: bold;">Sent:</span></b> Monday, August 22, 2011 2:37 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [x264-devel] Adding encryption to x264...<br></font><br>On Sun, 21 Aug 2011, Peter Tap wrote:<br><br>> For the project that I am working on, I need to add encryption to x264 data in mp4 file. When the file is opened in vlc, I need to decrypt the data. I am trying to understand what is the best way to accomplish on-the-fly decryption.<br>><br>> 1. Write a new decoder module that internally uses x264 decoder.<br>> 2. Somehow hook into x264's decoder to provider decryption at the end of the
 decoding.<br><br>(2) is impossible. You can't compress encrypted data.<br><br>Why do you want to hook into a video codec specifically, as opposed to<br>applying a general purpose encryption method to the whole file? MP4Box<br>claims to already support that.<br><br>--Loren Merritt<br>_______________________________________________<br>x264-devel mailing list<br><a ymailto="mailto:x264-devel@videolan.org" href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br><a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br><br><br></div></div></div></body></html>