8000 How can I replace first two bytes in inputstream? · Issue #576 · brianwernick/ExoMedia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

How can I replace first two bytes in inputstream? #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
feelfreelinux opened this issue Mar 11, 2018 · 3 comments
Closed
1 task done

How can I replace first two bytes in inputstream? #576

feelfreelinux opened this issue Mar 11, 2018 · 3 comments
Labels

Comments

@feelfreelinux
Copy link
  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • ExoMedia version: 4.1.0
  • Device OS version: 8.1
  • Devide Manufacturer: Google
  • Device Name: Pixel XL
Reproduction Steps

I am trying to implement coub.com player in my app. However, in order to decode my video as .mp4 I need to replace two first bytes with 0x00. ytdl-org/youtube-dl#13754 (comment)
I tried to create custom DataSource that does it, but it looks like ExoMedia does not recognize it correctly, and both video and seekbar stops after few seconds. Is it possible to achieve it using this library? Should I write custom MediaSource?

Expected Result
Actual Result
@brianwernick
Copy link
Owner

You'll need to provide a custom http client implementation (see #86) that handles zeroing out those bits.

@feelfreelinux
Copy link
Author

@brianwernick I created a custom OkHttpDataSource implementation, set it in ExoMedia as default and it plays correctly. However, LoopingMediaSource does not loop this video, and seekbar shows that this video has only 1 second. I checked, and coub.com does not supply Content-Length in headers, but puts it in API response. I tried to override contentlength in my custom OkHttpDataSource, but its still broken.

@feelfreelinux
Copy link
Author

My fault, modified OkHttpDataSource did the job, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0