[FFmpeg-trac] #390(FFplay:new): ffplay cannot select desired audio/video stream, consider there is a bug in the av_read_frame function

FFmpeg trac at avcodec.org
Wed Aug 10 22:17:58 CEST 2011


#390: ffplay cannot select desired audio/video stream, consider there is a bug in
the av_read_frame function
------------------------+---------------------
  Reporter:  qrtt1      |      Owner:  michael
      Type:  defect     |     Status:  new
  Priority:  important  |  Component:  FFplay
   Version:  git        |   Keywords:
Blocked By:             |   Blocking:
Reproduced:  0          |   Analyzed:  0
------------------------+---------------------
 There is a mms stream which contains five video/audio streams.


 {{{
 qty:ffmpeg_bug qrtt1$ ./ffprobe mmsh://media.uvcm.eu/maya4ok
 ffprobe version N-31809-g9acffed, Copyright (c) 2007-2011 the FFmpeg
 developers
   built on Aug 11 2011 03:55:29 with gcc 4.2.1 (Apple Inc. build 5666)
 (dot 3)
   configuration: --prefix=HERE
   libavutil    51. 11. 1 / 51. 11. 1
   libavcodec   53. 10. 0 / 53. 10. 0
   libavformat  53.  6. 0 / 53.  6. 0
   libavdevice  53.  2. 0 / 53.  2. 0
   libavfilter   2. 28. 1 /  2. 28. 1
   libswscale    2.  0. 0 /  2.  0. 0
 [asf @ 0x10104e600] max_analyze_duration 5000000 reached at 5120000
 [asf @ 0x10104e600] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, asf, from 'mmsh://media.uvcm.eu/maya4ok':
   Metadata:
     WM/ParentalRating: Uploaded by: www.evangelist-online.net
     Uploaded by     : www.evangelist-online.net
     WMFSDKVersion   : 10.00.00.4005
     WMFSDKNeeded    : 0.0.0.0000
     IsVBR           : 0
     genre           : Христианское ТВ "Библейский маяк"
     title           : "1-й комплекс 4-й день"
     copyright       : ТРК "3 Ангела"
     comment         : "Вместе веселей"
   Duration: N/A, start: 14.120000, bitrate: 1730 kb/s
     Stream #0.0: Audio: wmav2, 48000 Hz, 2 channels, s16, 128 kb/s
     Stream #0.1: Audio: wmav2, 48000 Hz, 2 channels, s16, 96 kb/s
     Stream #0.2: Audio: wmav2, 44100 Hz, 2 channels, s16, 80 kb/s
     Stream #0.3: Audio: wmav2, 44100 Hz, 2 channels, s16, 31 kb/s
     Stream #0.4: Video: wmv3 (Main), yuv420p, 640x480, 864 kb/s, 1k tbr,
 1k tbn, 1k tbc
     Stream #0.5: Video: wmv3 (Main), yuv420p, 384x288, 240 kb/s, 1k tbr,
 1k tbn, 1k tbc
     Stream #0.6: Video: wmv3 (Main), yuv420p, 384x288, 158 kb/s, 1k tbr,
 1k tbn, 1k tbc
     Stream #0.7: Video: wmv3 (Main), yuv420p, 384x288, 84 kb/s, 1k tbr, 1k
 tbn, 1k tbc
     Stream #0.8: Audio: wmav2, 8000 Hz, 2 channels, s16, 12 kb/s
     Stream #0.9: Video: wmv3 (Main), yuv420p, 192x144, 36 kb/s, 12.50 tbr,
 1k tbn, 1k tbc
 }}}



 I can play it in the default settings, but can't play with the desired
 streams,
 both video and audio disappear.


 {{{
 ./ffplay -ast 2 -vst 4  mmsh://media.uvcm.eu/maya4ok
 }}}


 I try to figure out what's wrong with it,
 and find the av_read_frame always read the stream index at 8 and 9.
 It can reproduce from git source revision
 9acffed9e0d7c454b7bc5c947f33cdf8cab3758c (cloned today.)
 Just print which index the av_read_frame given.


 {{{
 qty:ffmpeg_bug qrtt1$ git diff
 diff --git a/ffplay.c b/ffplay.c
 index b62e9ef..703eac2 100644
 --- a/ffplay.c
 +++ b/ffplay.c
 @@ -2495,6 +2495,8 @@ static int read_thread(void *arg)
              continue;
          }
          ret = av_read_frame(ic, pkt);
 +        av_log(NULL, AV_LOG_WARNING, "stream index: %d\n",
 pkt->stream_index);
 +
          if (ret < 0) {
              if (ret == AVERROR_EOF || url_feof(ic->pb))
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/390>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list