[FFmpeg-user] Hooking into MOOV atom move process
Reindl Harald
h.reindl at thelounge.net
Sat Jun 28 02:34:06 CEST 2014
Am 28.06.2014 02:21, schrieb Eugene Gekhter:
> Look into the source code - there's a message couldn't move atom to beginning.
> Can't open input.mp4 . I'm paraphrasing from memory.
that don't change the fact that ffmpeg called with php-cli
don't return before it has finished and -movflags faststart
happens in the same cli-call as the convert
> Basically if the file is moved before the atom move process is finished, the
> file becomes corrupt. The executing of process takes place from web app
basically if the file is moved in the middle of the convert
it is corrupt - so what - why does your web-app move the
file before the cli has finished?
>> On Jun 27, 2014, at 7:02 PM, Reindl Harald <h.reindl at thelounge.net> wrote:
>>
>> besides that use 'sudo' is complete nonsense from any
>> security point of view we are doing that for years now
>> and *no* it's not a ffmpeg problem - after ffmpeg returns
>> the encoded file is finished with no but and if
>>
>> Am 27.06.2014 20:42, schrieb Eugene Gekhter:
>>> Try moving the output files as soon as the exec command is finished.
>>>
>>> On Fri, Jun 27, 2014 at 1:39 PM, Molly Millions <
>>> mollyrazormillions at gmail.com> wrote:
>>>
>>>> I have just run your script and could not reproduce anything you've
>>>> described. When exec returns all of the output files are done, there are no
>>>> content changes. The problem might be an out of memory error. That's why
>>>> exec returns prematurely. I presume you are running in a shared host
>>>> environment. So check your php.ini (or check the phpinfo() output before
>>>> running your script) also check your nginx and or apache config for php
>>>> related memory limits or RLimitMem options. Also, check yout exitcode.
>>>>
>>>> On Fri, Jun 27, 2014 at 6:49 PM, Eugene Gekhter <egekhter at pixcel.com>
>>>> wrote:
>>>>
>>>>> $cmd = 'sudo ffmpeg -i ' . $local_file . ' -y -vcodec libx264 -tune
>>>>> zerolatency -movflags faststart -crf 23 -profile:v high -level:v 4.0
>>>>> -maxrate 6000k -bufsize 12000k -acodec libfdk_aac -b:a 256k ' .
>>>>> $output_directory. $data['temp_file_key'] . '_HQ.mp4 -vcodec libx264 -s
>>>> ' .
>>>>> $sq_width . 'x' . $sq_height . ' -tune zerolatency -movflags faststart
>>>> -crf
>>>>> 25 -profile:v main -level:v 3.1 -maxrate 1400k -bufsize 1400k -acodec
>>>>> libfdk_aac -b:a 256k ' . $output_directory. $data['temp_file_key'] .
>>>>> '_SQ.mp4 -ss ' . $seek_half . ' -f image2 -vframes 1 ' .
>>>> $output_directory.
>>>>> $data['temp_file_key'] . '_poster.jpg -ss ' . $seek_half . ' -f image2
>>>> -vf
>>>>> scale=-1:240 -vframes 1 ' . $output_directory. $data['temp_file_key'] .
>>>>> '_thumb.jpg' . ' 1> ' . $log_directory . $data['temp_file_key'] .
>>>> '_log.txt
>>>>> 2>&1';
>>>>>
>>>>> exec($cmd, $out, $ret);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140628/8a57c770/attachment.asc>
More information about the ffmpeg-user
mailing list