google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.7k stars 6.01k forks source link

Parse Program Stream Map for track identification in MPEG-2 PS streams #5459

Open rej0902 opened 5 years ago

rej0902 commented 5 years ago

Hi, when i testing this demo app for http://commondatastorage.googleapis.com/wvmedia/sintel_main_720p_4br_tp.wvm playing test

I know this file type not supported. but any error code not callback and return.

check playing link.

AquilesCanta commented 5 years ago

I think the issue here is that we are failing to identify the h264 video stream. One way of fixing this would be actually parsing the program stream map (stream id 188) and using that to identify the stream type of the other stream ids.

Note, this stream will work (codec support aside) if the following path is added here:

 } else if ((streamId & VIDEO_STREAM_MASK) == 0xe0) {
          elementaryStreamReader = new H264Reader(new SeiReader(Collections.emptyList()), false, false);
          foundVideoTrack = true;
          lastTrackPosition = input.getPosition();
}

I'll mark this as an enhancement. Once I get some time to do it, i'll revisit this. In the meantime, feel free to send a Pull Request our way.

seose commented 5 years ago

Greate Infos thanks~

ojw28 commented 5 years ago

@AquilesCanta - Please update the title of this issue to reflect what the enhancement is. Thanks!