Audio duration difference

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

Audio duration difference

FFmpeg-users mailing list
Hello

 

Can you please explain me this difference:

 

I have an audio-stream from a blu-ray (23.976 fps).

When I calculate the duration it should be: 133799/(24000/1001) =
5580.533292 seconds.

 

When I encode the extracted audio stream it is:

_ffmpeg -i _audio2.flac -f null -

ffmpeg version N-95216-ge6625ca41f Copyright (c) 2000-2019 the FFmpeg
developers

  built with gcc 9.2.1 (GCC) 20190918

  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf

  libavutil      56. 35.100 / 56. 35.100

  libavcodec     58. 59.101 / 58. 59.101

  libavformat    58. 33.100 / 58. 33.100

  libavdevice    58.  9.100 / 58.  9.100

  libavfilter     7. 61.100 /  7. 61.100

  libswscale      5.  6.100 /  5.  6.100

  libswresample   3.  6.100 /  3.  6.100

  libpostproc    55.  6.100 / 55.  6.100

Input #0, flac, from '_audio2.flac':

  Metadata:

    title           : THE_GIRL_WITH_THE_DRAGON_TATTOO.Title1

    encoder         : Lavf58.20.100

  Duration: 01:33:00.70, start: 0.000000, bitrate: 1111 kb/s

    Stream #0:0: Audio: flac, 48000 Hz, 5.1(side), s16

Stream mapping:

  Stream #0:0 -> #0:0 (flac (native) -> pcm_s16le (native))

Press [q] to stop, [?] for help

Output #0, null, to 'pipe:':

  Metadata:

    title           : THE_GIRL_WITH_THE_DRAGON_TATTOO.Title1

    encoder         : Lavf58.33.100

    Stream #0:0: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s

    Metadata:

      encoder         : Lavc58.59.101 pcm_s16le

size=N/A time=01:33:00.70 bitrate=N/A speed= 435x    

video:0kB audio:3139146kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

 

à 01:33:00.70 = 5580.7 seconds

 

Why is there a difference of 0.166708 seconds?

 

Best

Felix

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio duration difference

James Darnley
On 2019-10-06 12:38, Felix Muster via ffmpeg-user wrote:

> Hello
>
>  
>
> Can you please explain me this difference:
>
>  
>
> I have an audio-stream from a blu-ray (23.976 fps).
>
> When I calculate the duration it should be: 133799/(24000/1001) =
> 5580.533292 seconds.

> à 01:33:00.70 = 5580.7 seconds
>
>  
>
> Why is there a difference of 0.166708 seconds?

Where did you get the original length from?  Is "133799" the number of
video frames in the file?  Does the audio track start at the same time
as the video track?  Is it the same length as the video track?  At least
on a DVD the asnwer to the the last 2 question is not guaranteed to be
"yes".

Are you claiming you have corrected for both of those by trimming
samples off in some program?

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio duration difference

FFmpeg-users mailing list
Now I'm confused

From my calculation:
Audio length: 5580.7 seconds
Video length: 133799/(24000/1001) = 5580.533292 seconds

From the container:
Audio length: 5580.704 --> that is what ffmpeg tell me when I reencode the stream
Video length: 5580.575 --> Adobe Premiere Pro showed me 133799 frames, but the container metadata 133800/(24000/1001) = 5580,575. Don't know why there is a difference ...

And all audio streams of the blu-ray have an different duration:
English: 5580.704
Swedish: 5580.694

But this difference is only in the end, or not?

> Where did you get the original length from?  Is "133799" the number of video frames in the file?  Does the audio track start at the same time as the video track?  Is it the same length as the video track?  At least on a DVD the asnwer to the the last > 2 question is not guaranteed to be "yes".
133799 is the total frame number Premiere told me. I don't know if it start at the same time, I think so, otherwise it would be out of sync.


> Are you claiming you have corrected for both of those by trimming samples off in some program?
I didn't touch the stream only extracted from mkv which I've passthrough ripped from blu-ray disc.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".