Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-07-01 Thread Halley Zhao
I think I got the reason. after I switch video track only, the audio and video track belongs to different program; so both program are downloaded. that means 4 track of stream (stream_index) reach me, though I select one audio and one video track only. I think it will be good to change audio track

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-30 Thread Halley Zhao
I tried ffplay on Ubuntu15.10, not expected result. seems buggy: ffplay.c, 3160, got packet with stream_index: 0 ffplay.c, 3160, got packet with stream_index: 2 ffplay.c, 3160, got packet with stream_index: 4 ffplay.c, 3160, got packet with stream_index: 0 ffplay.c, 3160, got packet with

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-30 Thread Halley Zhao
I tried it; but got unexpected result. the pkt of discarded stream (stream_index) is still got from av_read_frame(). my code is here: https://github.com/halleyzhao/player-ffmpeg-yami/blob/m3u8/player.c ## the code piece is here: #define MAX_TRACK_COUNT 10 uint32_t video_tracks[MAX_TRA

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-29 Thread aihua zhao
thanks, seems the right clue to follow. I don't know much about ffmpeg, after went through avplay.c. I think I should do the following steps 1. discard all stream by default. refer to decode_thread() for (i = 0; i < ic->nb_streams; i++) ic->streams[i]->discard = AVDISCARD_ALL; 2. ena

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-28 Thread Steven Liu
2016-06-29 8:36 GMT+08:00 aihua zhao : > thanks. > > Yes, readahead the list is must. > but during playback, I found ffmpeg downloads each content of the list > -- av_read_frame() returns me each content with different stream_index. > I'm expecting av_read_frame() returns me the interested stream

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-28 Thread aihua zhao
thanks. Yes, readahead the list is must. but during playback, I found ffmpeg downloads each content of the list -- av_read_frame() returns me each content with different stream_index. I'm expecting av_read_frame() returns me the interested stream only. I haven't found a way to do so; or said, is t

Re: [FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-28 Thread Steven Liu
2016-06-28 14:26 GMT+08:00 aihua zhao : > Hi Experts: > > I use ffmpeg to parse/demux media content, and created a player basing on > it. > > here is a m3u8 content: > > http://asp.cntv.lxdns.com/asp/hls/main/0303000a/3/default/438eb7a818b246c187e72f1cd4e1bc4c/main.m3u8 > < > http://asp.cntv.lxdns

[FFmpeg-devel] how to download specific track data of a m3u8 content?

2016-06-27 Thread aihua zhao
Hi Experts: I use ffmpeg to parse/demux media content, and created a player basing on it. here is a m3u8 content: http://asp.cntv.lxdns.com/asp/hls/main/0303000a/3/default/438eb7a818b246c187e72f1cd4e1bc4c/main.m3u8