Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £129! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £179! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[Mut@nt HD2400] Software crash when fast forward a recording

Well, I've been sent an "offending" recording, run through it backwards at 16x(twice) and 8x, and all hung.
So something to work on....

One thing I did note was that the spinner doesn't get cleared when I run init 4/init 3 to restart enigma2. Does anyone know of any way to clear whatever is doing this other then a full reboot?
 
Last edited:
@birdman On Saturday I was watching a recording from 30.0 and by mistake went above 4x and the spinner got stuck as usual , I left it for about 1h to see if it would stop and go back to normal tv but it didn't I had to power off the box and back on


Sent from my TIMEBOMB!!!
 
One thing I did note was that the spinner doesn't get cleared when I run init 4/init 3 to restart enigma2. Does anyone know of any way to clear whatever is doing this other then a full reboot?
;) . .
Code:
http://forums.openpli.org/topic/40837-impossible-to-exit-endless-spinner-with-init-4
 
That's what C++ destructors are for.
Well, I suppose I'll find out shortly....
Well. By adding a call to disableSpinner() (in gDC::~gDC()) I got rid of the spinner. Or rather, I got it to stop on init 4, then it started performing "as normal" as init 3 started up enigma2 again.
BUT - it also managed to totally remove the actual picture (and the showiframe background image). Menus worked OK, but no picture.
All cleared by rebooting, but that's what I'm trying to avoid.

In the meantime I did find that the looping recording keeps going through the is_mpeg2 block in eDVBTSTools::findFrame(). It does exit it each time, so the loop problem is somewhere else.
 
That sounds complicated lol


Sent from my TIMEBOMB!!!
 
Well, I can now see what is happening. When looking for a suitable(?) Iframe it sometimes moves forwards (when it is running backwards overall).
And it can get to the state where it does neither:

< 13850.296874> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80553699 new_len: 91363 dir: -13
< 13850.301578> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13850.301747> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 81003741 new_len: 47406 dir: 0
< 13850.301845> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 13
< 13850.301909> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80553699 new_len: 91363 dir: -13
< 13850.302112> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 8
< 13850.302188> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80329979 new_len: 53204 dir: -8
< 13850.305704> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13850.305860> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80330137 new_len: 53046 dir: 0
< 13850.305946> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13850.306109> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80330129 new_len: 8 dir: 0
< 13850.306198> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13850.306260> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 80330129 new_len: 8 dir: 0
< 13850.306337> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
...ad infinitum...

However, there is more to it than that, as this sequence occurred earlier:

< 13842.431813> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 19
< 13842.431891> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 393154835 new_len: 56959 dir: -19
< 13842.447405> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13842.447580> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 393489633 new_len: 67334 dir: 0
< 13842.447694> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 19
< 13842.447763> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 393154835 new_len: 56959 dir: -19
< 13842.447859> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 10
< 13842.447930> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 392917579 new_len: 67675 dir: -10
< 13842.454324> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 0
< 13842.454804> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 392917737 new_len: 67517 dir: 0
< 13842.454946> [GML: eDVBTSTools::findFrame] is_mpeg2 end - nr_frames: 10
< 13842.455414> [GML: eDVBTSTools::findNextPicture] findFrame() new_offset: 392728639 new_len: 59403 dir: -10
and it somehow handled getting to 393154835 twice....
 
Think the current unstable gstreamer build included in release builds is borked for media, not recorded shows.
Too many similar issues on multiple manufacturers boxes here too, no matter the encoding.
 
Making progress.
I've found out (roughly) what the structure of an MPEG-2 TS file looks like and added various other debug statements to work with that.
Then discovered that the positioning is actually done with the help of the ts.sc (and ts.ap?) files, so I've found out what they look like (and have scripts to print out the info). They both look OK, so hopefully I can now find out why the code loops when looking for the "next" frame to display.

Mind you, as I work on this I do start to wonder how it actually does do 2x, 4x etc., as you can't just skip frames.- since most of them depend on you knowing what the previous/next one looked like it still has to calculate them. I also have no idea whether any of this is done in hardware - hopefully I don't need to know this in order to find the bug.
 
Last edited:
Any idea why it just happens to recording from 30 degrees whereas 28.2 degrees is fine?
 
Great work . Even if I didn't understand half of it cause I don't know much about programming lol
Hope you can get this fixed because fast forward at x4 is painful lol


Sent from my TIMEBOMB!!!
 
I posted ages ago in this thread, and now that real progress is being made it might be worth repeating....

For me, x2 and x4 start straight away. When I go to x8, the picture goes back to x1 for about 3 seconds before x8 kicks in.
 
Any idea why it just happens to recording from 30 degrees whereas 28.2 degrees is fine?
Just guessing, but probably because one is an MPEG-2 stream and the other an H.264. These do have different start code structures and the mpeg one goes through additional frame-finding code (which is where I suspect the issue is).
 
Making progress.
I've found out (roughly) what the structure of an MPEG-2 TS file looks like and added various other debug statements to work with that.
Then discovered that the positioning is actually done with the help of the ts.sc (and ts.ap?) files, so I've found out what they look like (and have scripts to print out the info). They both look OK, so hopefully I can now find out why the code loops when looking for the "next" frame to display.

Mind you, as I work on this I do start to wonder how it actually does do 2x, 4x etc., as you can't just skip frames.- since most of them depend on you knowing what the previous/next one looked like it still has to calculate them. I also have no idea whether any of this is done in hardware - hopefully I don't need to know this in order to find the bug.

fair play mate as its all well over my head glad the files i did are helping to find out where the issue may lie and thank you for taking your own time to look into this :)
 
I can see the problem. Both in the file structure and in the enigma2 code.

The file is an MPEG2-TS stream, with mpeg2 video (and some audio stream - which don't come into play). Such a file is a series of 188 byte packet. Packets contain headers which say what they are (or, if they are the data part of the video, which stream - PID - they belong to).
mpeg2 stream have 3 sort of video-frames I-, which are "stand-alone", P- which contain just contain the differences from an earlier frame and B-, which contain differences from earlier and later frames. So to play a stream you need to start at an I-frame. This is what the enigma2 code is looking for.
But it does it in a truly Byzantine manner. Despite having a an ordered list of the location of all the I-, P-, and B- frame headers it seeks backwards and forward through this list counting how many frames it has skipped over (and includes sequence header and group frames in the count when it probably shouldn't - depends on what nr_frames is counting, which isn't clear at all).

And then along comes a file with a group of pictures which just contains an I-frame - nothing else (something IBBPBBPBB is more usual). So if the fast-backwards gets to the I-frame after this, the code start where it is, goes to the previous frame (the single I-frame), goes forward from there to the next frame. It is now back where it started. It returns this info and the frame gets displayed (presumably). The file offset is now back at the the original I-frame and we just get stuck in that one position.

I have implemented a fix such that if findFrame() finds it has got back to where it started (or beyond) it goes through the code again, but this time with the offset of the earlier I-frame it found. A terrible kludge (it uses a goto to jump backwards...), but it's no worse than the rest of the code in that area. And it does work (at least for that Home&Away recording).
I have a distinct feeling that the code could be re-written to be much simpler and cleaner.
 
One thing I did note was that the spinner doesn't get cleared when I run init 4/init 3 to restart enigma2. Does anyone know of any way to clear whatever is doing this other then a full reboot?

;) . .
Code:
http://forums.openpli.org/topic/40837-impossible-to-exit-endless-spinner-with-init-4
My attempts to disable the spinner if enigma2 is "killed" work OK (call disableSpinner() in gRC::~gRC()).. HOWEVER, this just leaves things in a state where the TV picture doesn't display when enigma2 is restarted!! (menus etc. show up OK).

I noticed this in the log when it happens:
Code:
<   521.045359> [eDVBVideo0] VIDEO_PLAY failed: Operation not permitted
so presumably something isn't shutting down the device properly when enigma2 is killed?
 
Still a work in progress....

I'm still looking at the FF/FR code (with the object of tidying it up).

In the process I have found what might actually be the cause of the original issue.

The problem is that findFrame() calls getStructureEntryNext(offset, ....) to get the next frame (so that it can get a length for the current one). THEN, if we have an mpeg, it calls getStructureEntryFirst(start, ....), the object here being to roll back start to the preceding sequence header. BUT, these two routines share an index into the cache file, so in fact the second call actually works back from offset, rather than from start (which is what it really intends to do).

It's possible that correcting this (which is possible) would fix the rewind hang. I'll need to test. At the moment my attempt at tidying up the code seems to have found a bug in the binary chop code in getStructureEntryNext(), so I'm checking that out too.
 

OpenViX Feeds Status

Back
Top