[Libav-user] how to get title duration in an ISO file

YIRAN LI mrfun.china at gmail.com
Wed Jan 8 03:55:19 CET 2014


Hi,

I'm reading an ISO file which was made from a DVD disc and contains 2
titles (both have duration of 1 min).

[image: 内嵌图片 1]

But if I run ffprobe, the duration it returns is duration of one single
title

$ ffprobe.exe 2videos.iso
ffprobe version N-58485-ga12b4bd Copyright (c) 2007-2013 the FFmpeg
developers
  built on Nov 26 2013 22:01:46 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264
--enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 55.100 / 52. 55.100
  libavcodec     55. 44.100 / 55. 44.100
  libavformat    55. 21.102 / 55. 21.102
  libavdevice    55.  5.101 / 55.  5.101
  libavfilter     3. 91.100 /  3. 91.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from '2videos.iso':
  Duration: 00:01:00.06, start: 0.033367, bitrate: 9423 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 96 kb/s
    Stream #0:2[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR
8:9 DAR 4:3], max. 9000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Unsupported codec with id 1145979222 for input stream 0


and also if I open the ISO using av_open_input_stream(&pFormatCtx, &bioCtx,
pszISOPath, av_find_input_format("mpeg"), NULL);

then the pFormatCtx will have 3 streams (1 for data, 1 video and 1 audio),
and the video stream's duration is also only 1 min

Our application uses the duration to init the timeline, and provide a
read_packet for custom I/O. I'd like to know if there's any ffmpeg
interface we can use to check the duration of each title?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140108/fb60e7c1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 30882 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140108/fb60e7c1/attachment.jpe>


More information about the Libav-user mailing list