liuwenzi / moovrelocator Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/moovrelocator
License: Other
Automatically exported from code.google.com/p/moovrelocator
License: Other
I've found a bug in qt-faststart.c from ffmpeg. Seems like same bug exist
in moovrelocator too. If file has an atom with zero size, it seeks on same
atom once again. There's a bunch of such files - specification says if mdat
atom size is zero, program should read it till EOF
Original issue reported on code.google.com by [email protected]
on 21 Feb 2010 at 1:53
What steps will reproduce the problem?
1. Process multiple files with the MoveRelocator object
2. First file will work ok, the next one crashes
3. example will not work:
<?php
$files = array(
'/home/jambon/64_preview.mp4',
'/home/jambon/63_preview.mp4',
'/home/jambon/62_preview.mp4'
);
foreach($files as $file)
{
echo move_datas($file)."\n";
}
function move_datas($file)
{
$tmpFile = $file.'-tmp.mp4';
$moovrelocator = moovrelocator::getInstance();
$ret = true;
if($ret === true)
$ret = $moovrelocator->setInput($file);
if($ret === true)
$ret = $moovrelocator->setOutput($tmpFile);
if($ret === true)
$ret = $moovrelocator->fix();
if($ret === true) {
unlink($file);
rename($tmpFile,$file);
$ret = 'moov atom location successfuly moved to top of file!'."\n";
}
return $ret;
}
?>
This will not work because some private variables are not reset between two
files.
I propose to create the private function like this :
private function closeFile()
{
$this->_fileAtoms = array();
$this->_lastAtom = null;
$this->_successfullyParsed = false;
$this->_fileValid = null;
if ($this->_fp) {
@fclose($this->_fp);
}
}
replace the __destruct magic method as :
public function __destruct()
{
// close handle
$this->closeFile();
}
and add the following line at the beginnig of the function setInput() :
$this->closeFile();
Yeaba
romain
Original issue reported on code.google.com by [email protected]
on 11 Aug 2010 at 12:40
I'm having an issue with a basic MOOV operation. I think it's due to the
filesize, because all my other test cases where the file was < 18 MB, it hasn't
failed, when it's 18mb +, then the script crashes.
I've debugged it, so it is defintely failing wihin fix() function of the
Moovrelocator.class.
More specificially, inside the _readBytes(), in the last "else" condition:
} else {
$bytes = fread($this->_fp, $currentAtom->getSize());
$this->_middleBytes->writeBytes($bytes);
}
From my debugging, i noticed it goes into this condition 2x (since there are 4
atom objects. I figured out it is on the 2nd run, where the "size" of the
currentAtom is a LARGE number.
Are there limitations to this script?
ANYHELP would be greatly appreciated!
Original issue reported on code.google.com by [email protected]
on 31 Mar 2011 at 8:43
What steps will reproduce the problem?
1. unk
2. unk
3. unk
What is the expected output? What do you see instead?
?
Please use labels and text to provide additional information.
!
Original issue reported on code.google.com by [email protected]
on 24 Jan 2010 at 12:43
What steps will reproduce the problem?
1. Upload a file and write with
move_uploaded_file($_FILES['Filedata']['tmp_name'], $new_file_name)
2. Set inputfile to $new_file_name
3. Set outputfile to 'new_'.$new_file_name
4. $result = $moovrelocator->fix()
5. @unlink($new_file_name)
What is the expected output? What do you see instead?
Expected output is 'new_'.$new_file_name is written and $new_file_name is
deleted
What you get is a permission denied error after @unlink in error_get_last()
This suggests that a file handle is still open somewhere. @unlink successfully
deletes previously uploaded file when page is re-run so it is not
file/directory permissions etc...
What version of the product are you using? On what operating system?
v2.0
Please provide any additional information below.
We wish to use this in xerteonlinetoolkits... is this ok?
https://code.google.com/p/xerteonlinetoolkits/source/browse/#svn%2Ftrunk%2Fmodul
es%2Fxerte%2Fengine%2Ftools%2Fmoovrelocator
Original issue reported on code.google.com by [email protected]
on 1 Jun 2013 at 2:33
What steps will reproduce the problem?
1. Use the demo script to "fix" a mp4 video made in Adobe Premier
What is the expected output? What do you see instead?
Expected a new video file. Got "The moov-atom isn't located at the end of the
file, the file is allready ready for progressive download or it is a invalid
file".
What version of the product are you using? On what operating system?
Using version 0.2 on Mac OS X 10.7.3.
Please provide any additional information below.
Output from AtomicParsley shows the MOOV atom at the end:
Atom ftyp @ 0 of size: 24, ends @ 24
Atom mdat @ 24 of size: 8738542 (^), ends @ 8738566
(^)denotes a 64-bit atom length
Atom moov @ 8738566 of size: 119754, ends @ 8858320
Atom mvhd @ 8738574 of size: 108, ends @ 8738682
Atom trak @ 8738682 of size: 91128, ends @ 8829810
Atom tkhd @ 8738690 of size: 92, ends @ 8738782
Atom edts @ 8738782 of size: 36, ends @ 8738818
Atom elst @ 8738790 of size: 28, ends @ 8738818
Atom mdia @ 8738818 of size: 90992, ends @ 8829810
Atom mdhd @ 8738826 of size: 32, ends @ 8738858
Atom hdlr @ 8738858 of size: 68, ends @ 8738926
Atom minf @ 8738926 of size: 90884, ends @ 8829810
Atom vmhd @ 8738934 of size: 20, ends @ 8738954
Atom dinf @ 8738954 of size: 36, ends @ 8738990
Atom dref @ 8738962 of size: 28, ends @ 8738990
Atom stbl @ 8738990 of size: 90820, ends @ 8829810
Atom stsd @ 8738998 of size: 170, ends @ 8739168
Atom avc1 @ 8739014 of size: 154, ends @ 8739168
Atom avcC @ 8739100 of size: 68, ends @ 8739168
Atom stts @ 8739168 of size: 24, ends @ 8739192
Atom ctts @ 8739192 of size: 46320, ends @ 8785512
Atom stss @ 8785512 of size: 1020, ends @ 8786532
Atom sdtp @ 8786532 of size: 8010, ends @ 8794542
Atom stsc @ 8794542 of size: 40, ends @ 8794582
Atom stsz @ 8794582 of size: 32012, ends @ 8826594
Atom stco @ 8826594 of size: 3216, ends @ 8829810
Atom trak @ 8829810 of size: 28510, ends @ 8858320
Atom tkhd @ 8829818 of size: 92, ends @ 8829910
Atom edts @ 8829910 of size: 36, ends @ 8829946
Atom elst @ 8829918 of size: 28, ends @ 8829946
Atom mdia @ 8829946 of size: 28374, ends @ 8858320
Atom mdhd @ 8829954 of size: 32, ends @ 8829986
Atom hdlr @ 8829986 of size: 68, ends @ 8830054
Atom minf @ 8830054 of size: 28266, ends @ 8858320
Atom smhd @ 8830062 of size: 16, ends @ 8830078
Atom dinf @ 8830078 of size: 36, ends @ 8830114
Atom dref @ 8830086 of size: 28, ends @ 8830114
Atom stbl @ 8830114 of size: 28206, ends @ 8858320
Atom stsd @ 8830122 of size: 102, ends @ 8830224
Atom mp4a @ 8830138 of size: 86, ends @ 8830224
Atom esds @ 8830174 of size: 50, ends @ 8830224
Atom stts @ 8830224 of size: 24, ends @ 8830248
Atom stsc @ 8830248 of size: 4828, ends @ 8835076
Atom stsz @ 8835076 of size: 20028, ends @ 8855104
Atom stco @ 8855104 of size: 3216, ends @ 8858320
------------------------------------------------------
Total size: 8858320 bytes; 44 atoms total. AtomicParsley version: 0.9.0 (utf8)
Media data: 8738542 bytes; 119778 bytes all other atoms (1.352% atom overhead).
Total free atom space: 0 bytes; 0.000% waste.
------------------------------------------------------
Original issue reported on code.google.com by [email protected]
on 10 Feb 2012 at 3:35
The demo script _demo/index.php use a lowercase filename to require the
moovrelocator class while the file name in the zip file uses a uppercase first
letter. Because of this, the script will fail to run on systems with case
sensitive file systems.
Simple fix:
--- index.php.orig 2010-08-28 15:08:35.000000000 +0200
+++ index.php 2010-08-28 15:09:03.000000000 +0200
@@ -71,7 +71,7 @@
* @since File available since Release 1.0.0
*/
-require_once '../lib/moovrelocator.class.php';
+require_once '../lib/Moovrelocator.class.php';
/**
Original issue reported on code.google.com by [email protected]
on 28 Aug 2010 at 1:25
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.