audio duration

43 views
Skip to first unread message

mapofemergence

unread,
Oct 20, 2009, 11:29:34 AM10/20/09
to ffmpeg-php
Hi everybody,
I'm trying to use ffmpeg to make an automatic export of audio clips
in order to use them in 3d application.
Workflow is the following:
Ffmpeg-php runs on a Linux server, with CentOS distribution
Original clips are quicktime movies with chapters for every shot
Apple's AC Quicktime JS reads the chapters' duration and send them
to php, which generates the Ffmpeg commands
Apparently generated exec strings are correct and look as follows:

exec(ffmpeg -i ../mypath/mymovie.mov -ss 00:00:00.000 -t 00:00:07.750 -
vn ../mypath/audio/myaudio1.wav)

exec(ffmpeg -i ../mypath/mymovie.mov -ss 00:00:07.750 -t 00:00:01.417 -
vn ../mypath/audio/myaudio2.wav)

exec(ffmpeg -i ../mypath/mymovie.mov -ss 00:00:09.167 -t 00:00:12.833 -
vn ../mypath/audio/myaudio3.wav)

etc...

What happens is that audio files are exported correctly except for the
inpoint and duration, which are always rounded to full seconds. Then:
1st audio clip will start at 0 and last 8 seconds
2nd clip will start at 8sec and last 2
3rd clip will start at 10sec and last 13
and so on... increasing the error amount every new clip is created

I've also tried adding parameters to the exec string such as "-ar
48000" and/or "-ab 56k" but nothing changed, at all.

here's what I read in the php info about ffmpeg-php:
::
ffmpeg-php version 0.6.2
ffmpeg-php built on Mar 30 2009 14:42:47
ffmpeg-php gd support enabled
ffmpeg libavcodec version Lavc51.40.4
ffmpeg libavformat version Lavf51.12.1
ffmpeg swscaler disabled
::
Directive Local Value Master Value
ffmpeg.allow_persistent 0 0
ffmpeg.show_warnings 0 0

I found a thread with the same issue (I guess) here:
http://groups.google.com/group/ffmpeg-php/browse_thread/thread/33f0a89781be8926/df18b6837e89663f?lnk=gst&q=audio+small#df18b6837e89663f

and checked also the ffmpeg-user's archives, here:
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-May/015333.html
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-May/015334.html
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-May/015335.html
but apparently no solutions were found.

I beg you all, please give me a hope... I'm working on an entire
movie, and I can't imagine having to cut and export every single shot
by hand!
Thank you very much,
Stefano
Reply all
Reply to author
Forward
0 new messages