Last active
April 16, 2020 17:05
-
-
Save shaobin0604/3d5464a478a84fce0c40c521834f8d16 to your computer and use it in GitHub Desktop.
exoplayer play video files in resource/raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MediaSource buildRawMediaSource() throws RawResourceDataSource.RawResourceDataSourceException { | |
RawResourceDataSource rawDataSource = new RawResourceDataSource(this); | |
// open the /raw resource file | |
rawDataSource.open(new DataSpec(RawResourceDataSource.buildRawResourceUri(R.raw.test11_rotate_270))); | |
return new ProgressiveMediaSource.Factory(new DefaultDataSourceFactory(this, "ExoTest")).createMediaSource(rawDataSource.getUri()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exiftool -rotation=90 video.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=<x> output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment