[FFmpeg-trac] #6232(avformat:new): mpegts demuxer cannot get pkt->duration
FFmpeg
trac at avcodec.org
Mon Mar 13 10:15:33 EET 2017
#6232: mpegts demuxer cannot get pkt->duration
-------------------------------------+-------------------------------------
Reporter: stevenliu | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: mpegts | Blocked By:
duration | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by stevenliu):
Replying to [comment:5 heleppkes]:
> Replying to [comment:4 stevenliu]:
> > Replying to [comment:1 heleppkes]:
> > > mpegts as a format just doesn't store a duration. There is no data
to provide, so no data to show.
> >
> > No the audio duration can be get, but video cannot be get
> >
>
> The demuxer provides the information thats stored directly in the file
on a container level, and there is no duration there, it is not designed
to extract the audio duration of every known audio codec. You'll get the
audio duration after decoding.
Let me try the other mpegts format:
{{{
localhost:flvenc liuqi$ ffprobe -show_packets -select_streams v
~/Movies/Test/M1.mpg |grep duration > the_other_mpegts_have_duration
ffprobe version N-83692-gb8a7dcb Copyright (c) 2007-2017 the FFmpeg
developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --enable-fontconfig --enable-gpl --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-
version3 --cc='ccache gcc' --enable-nonfree
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 81.100 / 57. 81.100
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 3.100 / 57. 3.100
libavfilter 6. 74.100 / 6. 74.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, mpegts, from '/Users/liuqi/Movies/Test/M1.mpg':
Duration: 00:05:06.21, start: 0.996322, bitrate: 1720 kb/s
Program 2
Stream #0:0[0x30]: Video: mpeg1video ([1][0][0][0] / 0x0001),
yuv420p(tv), 352x240 [SAR 200:219 DAR 880:657], 1500 kb/s, 29.97 fps,
29.97 tbr, 90k tbn, 29.97 tbc
Stream #0:1[0x31]: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz,
stereo, s16p, 128 kb/s
}}}
I have try the other mpegts, it's can get duration;
the attechment file name : the_other_mpegts_have_duration.txt
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6232#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list