Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; '(using': 0.07; 'binary': 0.07; 'context': 0.07; 'subject:file': 0.07; 'answering': 0.09; 'chunk': 0.09; 'subject:into': 0.09; 'subject:set': 0.09; 'python': 0.11; 'question.': 0.14; 'concatenate': 0.16; 'example)': 0.16; 'play.': 0.16; 'subject:video': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'finished': 0.19; "hasn't": 0.19; 'pieces': 0.19; 'split': 0.19; 'separate': 0.22; 'header:User-Agent:1': 0.23; 'header': 0.24; 'first,': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'am,': 0.29; 'wonder': 0.29; "i'm": 0.30; 'code': 0.31; 'second,': 0.31; 'trivial': 0.31; 'file': 0.32; 'knowledge': 0.35; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'curious': 0.36; 'format.': 0.36; 'useful': 0.36; 'should': 0.36; 'two': 0.37; 'to:addr :python-list': 0.38; 'files': 0.38; 'anything': 0.39; 'expect': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'information,': 0.61; 'simply': 0.61; 'first': 0.61; 'back': 0.62; 'more': 0.64; 'received:74.208': 0.68; 'apart': 0.72; ',the': 0.84; 'played': 0.84; 'player.': 0.84; 'received:74.208.4.194': 0.84 Date: Tue, 07 May 2013 08:10:08 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: python-list@python.org Subject: Re: use python to split a video file into a set of parts References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:ynIhghb8ob+AiCjkRvpPOnrRWyhPoF9jGRA17mDutK1 n30KaDyOPFapl5P6vFOaA3gYd9GgqKqe9jMVpZn83l07yK70Bn oP4b+a3YyVVrFgjZGlL0aBQa3XqxgbJZgbeniYzQGXnEqAUtAV qFxfwKUXVFamD7/2/v95e3oumMf53dbTr3/YMLlApleas/JyxN jYZOqZovVn0E3Jkf7+a4wNqSDMalTBRGujUaedBgA5dJxcaeb3 xbTGA1MfWkeVQh+k489wrOcKU7Z6uSex3zFxgKA7uyPZtHiyHF 30hQVyjbH5/iUFFHJbvApib3+oQEfrEvHDmMwcmOTrd6ZId+g= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367928940 news.xs4all.nl 15906 [2001:888:2000:d::a6]:41384 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44884 On 05/07/2013 07:15 AM, iMath wrote: > I use the following python code to split a FLV video file into a set of parts ,when finished ,only the first part video can be played ,the other parts are corrupted.I wonder why and Is there some correct ways to split video files > There are two parts to answering the question. First, did it accurately chunk the file into separate pieces. That should be trivial to test -- simply concatenate them back together (eg. using copy /b) and make sure you get exactly the original. (using md5sum, for example) I think you will. And second, why the arbitrary pieces don't play in some unspecified video player. That one's more interesting, but hasn't anything to do with Python. I'm curious why you would expect that it would play. It won't have any of the header information, and the compressed data will be missing its context information. To split apart a binary file into useful pieces requires a lot of knowledge about the file format. -- DaveA