question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Newly enabled renderers for next playlist item start playing while previous playback is still ongoing

See original GitHub issue

I am using jcodec to create video files from images like the example attached at the bottom.

These videos are being displayed as a playlist in SimpleExoPlayer. These are created using MediaItem.fromUri(uri) and with the DefaultDataSourceFactory. I am currently using exoplayer version 2.12.3 but I have also tested 2.16.0 which has the same error.

A single jcodec video like this, or even multiple jcodec videos, will playback as expected without error.

However, if you add any regular camera video to the playlist in combination with these videos the playback fails. Specifically the jcodec videos are skipped over and only the camera video is played.

Summary of behavior:

  • single or multiple camera videos ✅
  • single or multiple jcodec videos ✅
  • jcodec video + camera video ❌

Video of playback is attached. As you can see the video is 20 seconds long but flashes a frame before being skipped.

The example video created by jcodec: https://user-images.githubusercontent.com/16091920/140962455-af644053-5e33-46e9-81aa-96c7ac4b45c9.mp4

Playback error: https://user-images.githubusercontent.com/16091920/140965056-c02c0a66-a1f2-4e3b-9937-aa7e1f90ef62.mp4

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
christostscommented, Nov 29, 2021

While I’m investigating the issue with the low frame-rate:

I have tried this. increasing the framerate to 30 fps does not seem to help

I created a video out of a single image using ffmpeg: ffmpeg -loop 1 -i image.jpg -r 30 -t 20 output.mp4

where -r 30 is for 30fps and -t 20 is for 20 seconds duration and the playlist played fine. Creating the video with ffmpeg at 0.2fps exhibits the same problem. I’m adding this for two reasons:

  1. Can you please share your 30fps version? I’d like to examine the difference between your file and what ffmpeg created.
  2. Maybe there’s a way to unblock yourself with a typical frame-rate video if you change how the video is encoded, while we try to understand what’s wrong with the 0.2fps videos.
0reactions
brucechou1983commented, Jan 22, 2022

@fredells Sad to hear that. As a workaround, I would try to increase fps first. Maybe implementing a custom image renderer could solve our problem thoroughly, but I haven’t figured out the correct way to do it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Player (ExoPlayer library)
Modifier and Type Field Description static int COMMAND_CHANGE_MEDIA_ITEMS Command to change the... static int COMMAND_GET_CURRENT_MEDIA_ITEM Command to get the curr... static int COMMAND_GET_MEDIA_ITEMS_METADATA Command to get...
Read more >
How To Fix Playback LAG in Premiere Pro | 4 QUICK Tips
Why is PREMIERE PRO so LAGGY? Here are 4 potential reasons - and HOW TO FIX them!TIME STAMPS00:00 Introduction00:36 Issue #1 - Project...
Read more >
The Playlist - FL Studio
PLAYLIST. The Playlist. The Playlist sequences (plays) all elements of the project to make the final song. The Playlist window is a stack...
Read more >
Use Leanback transport controls - Android Developers
On this page · Controls and player. Playback fragment; PlayerAdapter · Glueing the pieces together · Customizing the UI glue. Customizing the title ......
Read more >
Troubleshooting issues related to playback and performance ...
Media Cache contains the.CFA and.PEK files that are generated by Premiere Pro while importing clips for the first time in Project bin. Clearing ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found