inaccurate splitting of PCM audio

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

inaccurate splitting of PCM audio

Jugdish-2
I'm trying to split a Quicktime .mov file into pieces using ffmpeg and I'm
having trouble getting the start and stop times to match the exact numbers
that I'm specifying. I've discovered that the problem seems to be in
splitting the audio, so for now I'm focusing on just getting the audio to
work, with video disabled. Here is the command-line I am using:

ffmpeg -ss 3.75 -t 1.083 -vn -i input.mov output.wav

Here is what ffmpeg outputs:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
  Duration: 00:01:48.5, start: 0.000000, bitrate: 5497 kb/s
    Stream #0.0(eng): Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
    Stream #0.1(eng): Video: h264, yuv420p, 720x486, 24.00 tb(r)
Output #0, wav, to 'output.wav':
    Stream #0.0(eng): Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=     281kB time=1.5 bitrate=1536.2kbits/s
video:0kB audio:281kB global headers:0kB muxing overhead 0.015278%


The problem is that ffmpeg is not obeying the -ss and -t numbers I am
passing. The resulting output.wav audio file begins earlier in the stream
than it should and has a length of 1.50 seconds rather than 1.083 seconds.
What is causing this?

Thanks for your help!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: inaccurate splitting of PCM audio

Godwin Stewart-3
On Sun, 29 Jun 2008 11:53:36 -0700, Jugdish <[hidden email]> wrote:

> The problem is that ffmpeg is not obeying the -ss and -t numbers I am
> passing. The resulting output.wav audio file begins earlier in the stream
> than it should and has a length of 1.50 seconds rather than 1.083 seconds.
> What is causing this?

It's probably a GOP issue in that video files can only be cut on GOP
boundaries AFAIK.

I suggest you extract the entire audio stream from your original file and
try and chop *that* up.

--
G. Stewart - [hidden email]
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: inaccurate splitting of PCM audio

Jugdish-2
In reply to this post by Jugdish-2
> It's probably a GOP issue in that video files can only be cut on GOP
> boundaries AFAIK.

> I suggest you extract the entire audio stream from your original file
> and try and chop *that* up.

You were right, extracting the audio first and then splitting that up makes
the start and stop times dead accurate. I ran:

ffmpeg -ss 3.75 -t 1.083 -i input.wav output.wav

And it extracted the correct segment of audio.

But I'm still unsure why it doesn't work when the audio is muxed with the
video. It should only be restricted to cutting on GOP boundaries if I'm
doing a direct stream copy, right? And I'm not -- I'm doing a complete
re-encode of the audio from PCM to PCM.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user