I have been playing around with the Electra Player since it seems to accomplish what I need, but I haven’t any success using what I believe is the intended use case.
For context – I have a working m3u8 playlist link (I’ve used it on VLC for example and it outputs what you would expect) and I have added it to my Stream Media Source. The Stream Media Source has Electra as the Player Overwide for Windows (Which is what I’m developing on).
Based on the output logs the player is able to receive the master playlist, but has issues parsing the MP4 file it recieves:
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Received initial stream playlists
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Found 1920 * 1080 video stream at bitrate 7800356
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Found 1280 * 720 video stream at bitrate 3257266
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Found 852 * 480 video stream at bitrate 1262266
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Found 640 * 360 video stream at bitrate 630000
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Found 284 * 160 video stream at bitrate 230000
LogElectraPlayerPlugin: [00000251B1EEE840] IMediaControls::SetRate(1.000000)
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Initial buffering starts
LogElectraPlayer: [00000251B6CBA800][00000251C838BF90] Player switched video quality to 7800356 bps from 0 bps. 0 upswitches, 0 downswitches (0 drastic ones)
LogElectraPlayer: Error: [00000251B6CBA800][00000251C838BF90] MP4 parser: Invalid filler data size of 0x47400008 to read at offset 0x8 in box 0x0000b00d (size 0x47400010, offset 0x0, dataoffset 0x8)
LogElectraPlayer: Error: [00000251B6CBA800][00000251C838BF90] HLS fmp4 reader: Failed to download segment <REMOVED URL>
This repeats through each option and fails on each and eventually closes. I’m also able to download the segment that fails to download manually using the URL it parses and it works as expected. It happens to be .ts not .mp4 but I doubt that should matter.
If anyone is familiar with Electra and can explain what the issue could be or if there is a better place to ask questions, considering Electra appears to be in beta, I would appreciate if someone could point me there.
Adding to the thread in the hopes of generating traffic: I’m seeing the same error. Serving up an MP4 from a Cloudflare hosted HLS stream, the m3u8 link is reached and then I get the error stack listed above.
Bumping this topic as well:
I feel like I have a correct link, but it is not parsing my link as a master playlist so that is the main problem for me at this point. Hoping someone has an answer for all of us here!
Same errors here. tried to play around with some of the codec settings as the variant retrictions on the electra docs are pretty constrained. Still no luck but as another user has pointed out - Electra is still in beta and wont be final version until full UE5 release.
I’ve had some luck generating and playing a live stream with Electra (UE 4.27.2), overall it seems like it requires some specific settings, so, if you cannot control the generation of the stream, you may be out of luck.
To create a stream from your Webcam (command is for linux, tested on Ubuntu 20.04, your Ffmpeg input (-I and -f) will be different on Windows/Mac)
Now the chunks are being generated, you can create a web server using Python to make them accessible over the network by running the following in the directory where the chunks are generated:
python3 -m http.server 8080
(python3 command may not work for you, if python3 is not found try replacing it with “python” or “py”)
You can then play the stream at the following url: http://[COMPUTER_IP]:8080/master.m3u8 where [COMPUTER_IP] is your computer’s ip.
Some things I noticed about the Electra Player:
Chunks cannot be in .ts format and must be in mp4 (.mp4 or .m4v) format (set with -hls_segment_type fmp4 in Ffmpeg)
EXT-X-PROGRAM-DATE-TIME must be present for each chunk (set in -hls_flags independent_segments+delete_segments+program_date_time line, specifically program_date_time)
This is interesting, thanks for the info on the Electra Player nuances. Our current streaming method is using AWS so we have full control over the streaming decoding and setup. Ill play around with these settings and see what works thanks
I know this thread is old, but I’m also curious if others are getting audio working with HLS and the electra player? I just got video working and was surprised to have no audio.
Add this to your ffmpeg command to set up the separate audio stream & audio group that Electra expects: -var_stream_map "a:0,agroup:audio v:0,agroup:audio"
thanks for the pointer! I use a 3rd party software called restreamer, so I don’t know how ot actually implement that FFMPEG command, but I’ve passed it along to the discord they run, and I bet they can get it working from there. Thank you so much for the help, I’ll let you know back if I get it working!
This thread up from sanford87 is another good look into the Electra player. The project is in Unreal Engine 5.1, I manage to play an extracted twitter video and play it into the Electra Media player using stream media source URL
Did anyone get it working in unreal engine 5.1.1? Im constantly getting assertions failed errors: MP4Parser->GetNumberOfTracks() == 1 [File:D:\build++UE5\Sync\Engine\Plugins\Media\ElectraPlayer\Source\ElectraPlayerRuntime\Private\Runtime\Player\HLS\StreamReaderHLSfmp4.cpp] [Line: 862]
Fixed it by adding: -var_stream_map “a:0,agroup:audio v:0,agroup:audio” to the ffmpeg command.