Opened 13 years ago
Closed 12 years ago
#390 closed defect (fixed)
Audio/Video not selectable in mmsh stream
Reported by: | Ching Yi, Chan | Owned by: | Michael Niedermayer |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mmsh |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
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))
Change History (10)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Component: | FFplay → avformat |
---|---|
Keywords: | mmsh added |
Priority: | important → normal |
Reproduced by developer: | set |
Status: | new → open |
Version: | git → git-master |
This is certainly reproducible (and FFmpeg does not warn that audio/video stream selection is not possible for this mms stream).
comment:3 by , 13 years ago
Summary: | ffplay cannot select desired audio/video stream, consider there is a bug in the av_read_frame function → Audio/Video not selectable in mmsh stream |
---|
comment:4 by , 13 years ago
There is my work around for our software.
https://github.com/qrtt1/ffmpeg_icy/commit/f735b761a0c22a7618bd5e398701187e78e36cd5
However, it's not easy to use. We should open the mms first for getting stream index and choose the selected index by callback in next open stream url. It just work.
comment:5 by , 13 years ago
Please do not use NULL as av_log() context and I suspect AV_LOG_DEBUG is sufficient, don't you agree?
Please send your patch to ffmpeg-devel, it can be discussed there.
follow-up: 8 comment:7 by , 12 years ago
I find it much worse that the patch cannot be accessed anymore - instead FFmpeg binaries without source are distributed on https://github.com/qrtt1/ffmpeg_lab/tree/prebuilt/prebuilt
comment:8 by , 12 years ago
Replying to cehoyos:
I find it much worse that the patch cannot be accessed anymore - instead FFmpeg binaries without source are distributed on https://github.com/qrtt1/ffmpeg_lab/tree/prebuilt/prebuilt
The source of our repo ffmpeg_lab is the same with official ffmpeg n0.8.2, no any changes with it.
This repo is used to write some tips for our team member https://github.com/qrtt1/ffmpeg_lab/wiki/FFmpeg-Tool-Notes
Our patches lived in ffmpeg_icy repo:
https://github.com/muzee-git/ffmpeg_icy (moved from my account qrtt1)
Each extra branches made by me are public:
https://github.com/muzee-git/ffmpeg_icy/commits/m0.8.6.3
The new url for mms selection work around is at:
- for 0.8.x https://github.com/muzee-git/ffmpeg_icy/commit/9d0dc4b83a1752b66774fc66ad2cc0e348d732bb
- for 0.9.x https://github.com/muzee-git/ffmpeg_icy/commit/cf65d9a2fbc10d0d742bdc5a86fd3c0d5ba74ef9
I am sorry to notify the owner transfered event. (qrtt1 to muzee)
Now, I make a fork from muzee's repo to keep the old url accessable
comment:9 by , 12 years ago
Add some multi-stream test case:
- mms://74.54.73.194/webcasting_gunaz
- mms://a1248.l6623941247.c66239.g.lm.akamaistream.net/D/1248/66239/v0001/reflector:41247
- mms://www.manworthy.tv:8088/play
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
I tried ./ffplay -vst 7 mmsh://74.54.73.194/webcasting_gunaz
and it plays stream 7
I tried ./ffplay -vst 5 mmsh://74.54.73.194/webcasting_gunaz
and it plays stream 5
So id say this has been fixed, please reopen if you can still reproduce such a problem with ffmpeg git master
I compared with the request sent by mplayer (packet caught by wireshark).
In stream selection header, it sent exactly two streams (video and audio):
However, libavformat/mmsh.c select all the streams,
we always get the last two index 8 and 9.
I test it by hardcode stream index in mmsh.c. The ffprobe can give the desired streams:
It is my test code