Code Monkey home page Code Monkey logo

Comments (12)

mangui avatar mangui commented on June 16, 2024

ok I can see some glitch around t=10s while staying on the lowest level (using http://vhx-uploads-development.s3.amazonaws.com/charlietran/videos/8197/39380/200-dKzMBrZyBbxg-AetqyFD.m3u8 )

also other glitches are visible later on, around fragment boundaries.
this is not a regression from c0284ea, and this is not happening on IOS.

I am suspecting the following could give some clue on the root cause:
DEBUG:TS: partial AVC PES at end of segment

from flashls.

mangui avatar mangui commented on June 16, 2024

I confirm the issue is not linked to AES decryption.
I decrypted the playlist on my machine using a special tool and I got the same glitches while playing back the decrypted playlist.
then I tried concatenating all decrypted fragments into one unique fragment and played it back with flashls, issue is gone.
=> glitch should be related to reassembly issue of video PES packets splitted accross fragments. this case should be handled already but might be buggy.
Cheers,
Mangui

from flashls.

charlietran avatar charlietran commented on June 16, 2024

Thanks so much for confirming that, where in Flashls are split PES packets handled? I'll try to dig in deeper and look for the bug.

from flashls.

mangui avatar mangui commented on June 16, 2024

it is happening in TSDemuxer.as
I found the root cause. there are some AVC NAL Unit overlapping between segments.
basically when parsing the first AVC PES of second fragment, I can see some overflows. it means that first AVC PES of second fragment contains the end of the last NAL Unit of first fragment.

this is checked here : https://github.com/mangui/flashls/blob/master/src/org/mangui/hls/demux/TSDemuxer.as#L300-L304
but last video tag is null at that time, as the demux is reinstanciated between fragments.

I am reviewing the demuxer logic to be able to handle such kind of case.
Cheers,
Mangui

from flashls.

mangui avatar mangui commented on June 16, 2024

Hi @charlietran, you might recheck your stream with flashls/master

from flashls.

mangui avatar mangui commented on June 16, 2024

this should work fine when staying on same level, but there are still issues when switching levels.

from flashls.

mangui avatar mangui commented on June 16, 2024

also there is still an audio glitch while staying on same level
basically my commit just fix the video glitch while staying on same level

from flashls.

mangui avatar mangui commented on June 16, 2024

audio glitch issue should be fixed now.
some issues are remaining when seeking/switching level. i am checking what is going on

from flashls.

mangui avatar mangui commented on June 16, 2024

Hi @charlietran
seeking should work fine now. however there are still video glitches when switching levels. but i dont think this could be fixed.
if a video frame is splitted across two segments and level switching is occuring, there will anyway be artifacts or video frame loss.

but now, flashls should be more robust to bad segmentation when staying on same level.
Cheers,
Mangui

from flashls.

charlietran avatar charlietran commented on June 16, 2024

amazing, thanks @mangui! is there any way to prevent video frames being
split? the way I'm segmenting right now is every 10s with keyframes every
2s, which i figured would prevent frames from being split like this.

On Thu, Jul 31, 2014 at 12:56 PM, Guillaume du Pontavice <
[email protected]> wrote:

Hi @charlietran https://github.com/charlietran
seeking should work fine now. however there are still video glitches when
switching levels. but i dont think this could be fixed.
if a video frame is splitted across two segments and level switching is
occuring, there will anyway be artifacts or video frame loss.

but now, flashls should be more robust to bad segmentation when staying on
same level.
Cheers,
Mangui


Reply to this email directly or view it on GitHub
#31 (comment).

from flashls.

mangui avatar mangui commented on June 16, 2024

you need to use a good segmenter ... yours seems broken.
on my side I use ffmpeg internal segmenter. it works quite well.

from flashls.

charlietran avatar charlietran commented on June 16, 2024

Closing this, the fixes have made streaming MUCH better. We'll look into our segmenter, thanks again.

from flashls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.