-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Support crossfading between media items/sources #3438
Comments
This would definitely be great to have. I could look into creating a PR for the matter. @ojw28 Do you have any ideas on where this would live/how this would best be implemented? |
I can't think of an easy way of implementing this given the current architecture (i.e. I think it would require some major surgery). Sorry I can't be more helpful. @andrewlewis - Any ideas? |
No ideas for an easy fix I'm afraid. |
@ojw28 and @andrewlewis, if it is possible to implement it in the context of the current architecture, where would you start? |
@tonihei and I discussed this a bit. I think the conclusion was that it would be quite a lot of work and involve at least minor modifications in the player (or major modifications to do it in an elegant way). It would probably be possible to hack something together by adding support for multiple concurrent audio renderers, a custom |
Can you please add the same about video? Could be useful for both when you play a new video, and for when you loop on a single video (because sometimes the end of the video doesn't look the same as the start of it). |
@andrewlewis, I would also love to get this feature, both crossfade between media sources and fade in/out when play/pause is initiated. I understand that this is not something you're working on at the moment, but I was wondering if you eventually are going to support it or if we need to implement it ourselves. I'm also happy to help if you need some input from a user of the library. Thanks in advance! |
Crossfade between media sources in ConcatenatingMediaSource you can implement on your own, with method onPositionDiscontinuity and (reason == Player.DISCONTINUITY_REASON_PERIOD_TRANSITION || reason == Player.DISCONTINUITY_REASON_SEEK) you are getting info when track is changed, so then just get track duration and 10s (or whatever) before end with ''post delayed'' call another method (in new thread, so for loop can call thread sleep in each loop) for fade out (setting player volume decreasing) and after that call player.next() to play next song in playlist and then you can do fade in inside (playbackState == PlaybackStateCompat.STATE_PLAYING). |
@elvirturan cross-fade means that the track that's ending is fading out simultaneously with the fading in of the track that's beginning, not sequentially |
Yes i know, but it is my temporary solution until will Exo support cross-fade |
Does Exoplayer support the cross-fade feature in the latest versions? Thank you |
This is still not supported I'm afraid. If/when we get round to it this issue should get updated. |
Add this feature, it will easy to used for video edit apps. I find that ExoPlayer is being to support to re-encode and re-mux the file format. Is there any plan to do the support for video edit? |
We want to implement the crossfading between media items/sources, fading in at each media items/sources and fading out at each media items/sources. The purpose is make audio bitrate/codec switching seamless. |
Fade-out and fade-in could be implemented in a very similar manner to how gapless is currently implemented. Instead of trimming the beginning and end of the track a The main issue with Cross-fade is the audio contraction and player position. For example how to crossfade 2 media with video tracks? Should the video also crossfade/fade to black? This is far from supported in ExoPlayer. Similarly, which song cover should the UI display during the crossfade? Technically both tracks are playing at the same time during the crossfade. Cross-fade could be implemented similarly to Fade-out/in, but would mix the end buffer with the beginning buffer of the next track. One consequence of this design is that the player position during the crossfade would be the beginning of the next track. Aka the player position will jump over the end of the track to the next track when the crossfade would start. It would not be possible for the position to switch media at the middle of the crossfade, only at the beginning. |
is there any way to implement gl-transitions between two video inputs in exoplayer. same like ffmpeg gl- transition |
I'll mark this issue as a duplicate of androidx/media#2 to use the newer one for future tracking. |
It would be nice to be able to transition between MediaSource's with some sort of fade, as opposed the the current hard cut-over.
The text was updated successfully, but these errors were encountered: