Issues working with HLS and Electra Player

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.

1 Like

Looks like there hasn’t been any update on this on other posts that seem related (see: Electra Player not decoding .ts files - Cinematics & Media - Unreal Engine Forums)

It would be nice if there was a way to communicate issues like this considering the plugin is in beta.

Maybe this forum will get more attention…

Having the same issues. Invalid filler data, Failed to download segment

I also get a UE application crash when I try the second time after restarting the stream in OBS.

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.

Anybody streaming HLS with Electra?

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)

ffmpeg \
    -f v4l2 -video_size 640x480 \
    -i /dev/video0 \
    -c:v libx264 -crf 21 -preset veryfast \
    -b:v 2000k -b:a 128k \
    -f hls -hls_list_size 4  -hls_init_time 1 -hls_time 0.5 -g 0.5 \
    -vf format=yuv420p \
    -hls_flags independent_segments+delete_segments+program_date_time \
    -hls_segment_type fmp4 \
    -hls_segment_filename data%02d.m4s \
    -master_pl_name master.m3u8 out1

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)
  • A master playlist is required
  • In addition, the stream must conform with every line in the Variant stream restrictions documentation.

Note that these tests were performed on Windows 10 and Oculus Quest 2 (Android)

2 Likes

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

Did you manage to get the audio + video out of this method on your Quest 2 ?

Using the native implementation on Quest 2 I’m only getting the video without audio

Didn’t tried with Electra Player yet, only native

I’ll give it a try tonight

Thank a lot, hope it’s help :heart: