Author Topic: elapsed time indicator is gone on nightly build 5D 3  (Read 13688 times)

dustatron

  • New to the forum
  • *
  • Posts: 3
elapsed time indicator is gone on nightly build 5D 3
« on: November 11, 2013, 07:09:07 PM »
I have been playing with the newer nightly builds. One of the things I really miss is the elapsed time indicator for H.264 movies. I have it selected in the menu to display the elapsed time but when I hit record where the indicator would show I just see the temp, file name, frame rate, card size.

I am wondering if I am missing something in the menu.

The other things that I miss is the color indicators for bad settings.


TekAzurik

  • New to the forum
  • *
  • Posts: 9
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #1 on: December 21, 2013, 12:53:04 AM »
I have been wondering about this myself for a while now.  Have you heard anything?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #2 on: December 21, 2013, 03:30:00 AM »
Last I heard, that feature was broken on the 5D3.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #3 on: December 21, 2013, 05:56:32 AM »
It's very easy to bring it back (see http://www.magiclantern.fm/forum/index.php?topic=8539.msg79753#msg79753 )

(would it be a good idea to have a EasyCoding page to list things that would take 5 lines of code or so? maybe beginner developers can jump in easier)

dustatron

  • New to the forum
  • *
  • Posts: 3
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #4 on: January 14, 2014, 07:15:18 AM »
I wonder if this feature is any closer to coming back to life? or do I need to learn to code to get it back?

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #5 on: February 06, 2014, 08:40:50 PM »
I'm looking into this, would this be due to the changes to the LVINFO_UPDATE_FUNC and this code is not in that new format?
from src/bitrate-5d3.c:
Code: [Select]
switch(rec_indicator)
    {
        case 0:
            return;
        case 1: // elapsed
            bmp_printf(
                FONT(FONT_MED, COLOR_WHITE, COLOR_BLACK),
                time_indic_x + 160 - 6 * font_med.width,
                time_indic_y,
                "%3d:%02d",
                elapsed_time / 60,
                elapsed_time % 60
            );
            return;

so if I replaced the code there with the new LVINFO_UPDATE_FUNC information would that do the trick?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #6 on: February 06, 2014, 10:02:52 PM »
Yep, you are on the right track.

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #7 on: February 07, 2014, 09:27:25 PM »
So question about that then, would I replace this code with something like this:

Code: [Select]

case 1: // elapsed
            LVINVO_UPDATE_FUNC(elapsed)
            {
                     //code here to get same data avialable?
             }
            );

and then define the elapsed in the lv info section as well?

Code: [Select]

static struct lvinfo_item info_items[] = {



Also I don't know where the old UI used to show these values?  Bottom, top or wherever it fits?

~Phil

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #8 on: February 07, 2014, 09:30:35 PM »
The API is described here: http://www.magiclantern.fm/forum/index.php?topic=8539.msg79753#msg79753

and it used to be in the top-right corner. Take a look here: http://www.magiclantern.fm/forum/index.php?topic=8518.0

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #9 on: February 11, 2014, 06:05:54 AM »
Okay so I think I have a pass at this that is compiling, but all of a sudden, when I do "make zip" it errors out:

Code: [Select]
cd /home/pdavis/src/123/magic-lantern/platform/all; make docs
make[1]: Entering directory `/home/pdavis/src/123/magic-lantern/platform/all'
cd ../../doc && RST2LATEX=rst2latex.py python2 mkdoc.py
[[Focus distance]]
[[Cropmarks]]
[[External Recorders]]
[[Unbricking]]
[[install]]
[[HDMI recorder]]
sh: rst2latex.py: command not found
make[1]: *** [docs] Error 1
make[1]: Leaving directory `/home/pdavis/src/123/magic-lantern/platform/all'
make: *** [docs] Error 2


I don't know where the python latex script would be provided, but I'm going to search the wiki etc, it seems my build is failing due to docs, but I thought previously that the docs weren't forced on a make zip?

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #10 on: February 11, 2014, 06:10:50 AM »
I'm building it by bypassing that, I read the Makefile, looks like the target for zip: after the docs is to cd into platform/all and make zip.  I'll report back with progress, I'd still like to know why that python script is missing?

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #11 on: February 11, 2014, 06:16:53 AM »
man noob move, I forgot you cd into platform/5D3.123/ to do make zip.  That worked.

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #12 on: February 11, 2014, 06:41:48 AM »
okay so the compile runs fine, but doesn't work as expected.  If someone can look at my src and tell me what seems off here I'd appreciate the pointers.  I'm sure its my
limited C skills hitting me.

https://bitbucket.org/frenchiefilms/phil/src/e4ae07b43c4879a71774a6524da8cec68d693994/src/bitrate-5d3.c?at=unified

~Phil


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #13 on: February 11, 2014, 06:47:59 AM »
Quote
if (RECORDING_H264)
    {
        lvinfo_add_item(&info_item);
    }
Try to start recording before ML has a chance to run its init functions (you have at least 200ms, more likely around 1 second) and it should work ;)

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #14 on: February 11, 2014, 07:25:48 AM »
Nope, sadly it didn't, it still just shows the top with temp, framerate, and disk remaining.   I did try but it almost takes 3 seconds or more to show the screen.

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #15 on: February 11, 2014, 08:19:20 AM »
Oh know what, I tweaked a few things as guesses and rebuilt, if you think that is okay, I can try to fix it back and rebuild give me a few.

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #16 on: February 11, 2014, 08:29:30 AM »
Nope, no luck, I keep thinking I see somthing flicker but not seeing anything.  Are the default overlays covering it up or something?  Is there a way to disable the liveview bars in record mode for testing?  Is that what covers it up?

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #17 on: February 11, 2014, 08:50:37 PM »
I was looking over the code again and found a few errors in my code, fixed those, tested, and still nothing shows up if I hit rec as soon as I have screen before the liveview ML bars come over the top except the histogram and the rec red light.  Not sure what I'm missing.  If anyone wants to take a peek and give me hints:

https://bitbucket.org/frenchiefilms/phil/src/6c947a0e0965796e040177305aa083f3e17cf43d/src/bitrate-5d3.c?at=unified

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #18 on: February 12, 2014, 12:03:50 AM »
If nobody says anything in maybe a day, I'll submit a pull request for review so it can at least be tested.   

But I would rather get it working on mine first. 

~Phil

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #19 on: February 12, 2014, 12:17:08 AM »
a1ex has already given you the clue as to what is wrong: the way you have it coded, it will only work if the camera is already recording when ML initializes, you should change your code to work no matter what mode the camera is in when it initializes ;)

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #20 on: February 12, 2014, 12:26:00 AM »
One more clue:

PROP_HANDLER(PROP_MVR_REC_START) gets called every time the canon property PROP_MVR_REC_START changes value (the value is held inside buf[0]). property.h has the values decoded for you. That's one possible way of doing it btw.
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #21 on: February 12, 2014, 01:09:00 AM »
a1ex has already given you the clue as to what is wrong: the way you have it coded, it will only work if the camera is already recording when ML initializes, you should change your code to work no matter what mode the camera is in when it initializes ;)

Oh man I totally missed that, sorry, I saw the smiley but missed the sarcasm, I was literally trying to record within 1 second of boot... /facepalm

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #22 on: February 12, 2014, 02:10:14 AM »
I tried that again, I think I get what is being hinted at, but not sure if my method is sound, it doesn't work yet anyway.  I'll keep trying, but someone can look and see if what I'm doing makes sense at all maybe:

https://bitbucket.org/frenchiefilms/phil/src/6633808ec34cb23eff9c936681104d2af1ecda66/src/bitrate-5d3.c?at=unified

~Phil

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #23 on: February 12, 2014, 08:04:04 PM »
Not yet :-)

The thing is init functions are called exactly once per boot / module load.

Property handlers, on the other hand....
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #24 on: February 12, 2014, 08:26:26 PM »
Yes but I"m using a property handler, I'm guessing I'm doing it wrong obviously, but I do this:

Code: [Select]
static int movie_recording = 0;
PROP_HANDLER(PROP_MVR_REC_START)
{
    if (buf[0] == 1)
        movie_start_timestamp = get_seconds_clock();
    if (buf[0] == 2)
        movie_recording = 1;
}

to set a flag if the state is 2.  maybe that should be an else if?   and then an else for ==0?  But still, I would think that means it could be 'stuck on' in that case.  But ultimately I was trying to use the PROP_HANDLER on purpose there. 

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #25 on: February 12, 2014, 08:42:16 PM »
HEY!  It showed up, but I've got something else wrong now, it showed just a 0:00 so data isn't making it into it, but from there at least I have a starting point.  Cool!

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #26 on: February 12, 2014, 08:44:43 PM »
Remaining time seems to update every 2 seconds as if it were elapsed time hehe.  Elapsed doesn't show up, avg bitrate seems to show nothing, but 0:00 for a second then a white block. and instant bitrate shows some data definitely.  So I'm on track and can debug this, cool!

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #27 on: February 13, 2014, 04:56:25 AM »
Okay, working the kinks out.  I've got this working but a few questions. 

Problem 1.  the elapsed works well but seems to update only every 2 seconds not sure why.  ideas?
problem 2.  remaining seems to be doing something but it goes all over the place and sometimes has a really large non time number at the start 2345282934 or something. 
problem 3(?not a necessarily a problem). avg bitrate seems logical, goes up and down a bit but when I'm doing ALL-I, its seems to sit around 50-60mb/s is that normal? 
problem 4. the instant bitrate isn't, its total bits drawn, so I'm going to try and divide that by time elapsed and see if that seems more correct. 

At any rate, the only other thing that remains is how do I reset it after I stop recording?  Elapsed time just keeps ticking until I hit record again, what stops the LVINFO from writing data?  do I look for some other buf[0] value change for 'stopping recording' or in my == 0 value is there some 'LVINFO' reset function I can wipe it?

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #28 on: February 13, 2014, 05:07:58 AM »
Okay so solution to 4, dividing by elapsed time seems to give a constant value, about 6/7 Mb/s.  This seems more realistic for MB/s, and the raw seems to be more along the 50-60Mb/s from what I recall, so I realized the previous calculation for Mb/s seemed to do this;

raw_bitrate / 1024 * 8 / 1024 (HUH?)

but in the lower instant they did

raw bitrate / 1024 / 1024

this makes more sense.  so I'm removing the *8 because 4*7 is wow 42 ish heheh.

I'll see if that resolves it.  building now.

~Phil

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #29 on: February 13, 2014, 08:40:21 PM »
This seems related to issue: https://bitbucket.org/hudson/magic-lantern/issue/1759/record-indicator-not-visible  I've commented there,  the code is working now and could use some testing via nightly etc.  It looks like it may not be working in other cameras, likely for the same reason, I'll have to take a look at blind porting my code over in the other bitrate*.c files, as I don't have another camera to test against.  (other than my wife's t3i I guess but I'd have to ask her if she minds :P)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #30 on: February 14, 2014, 10:44:12 AM »
Work in progress from pompeiisneaks and nanomad added to 5D3 123 repo.

https://bitbucket.org/chris_miller/magic-lantern/commits/all

From this point, one has to double-check the formulas and the MVR constants.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12297
  • Emergencies only
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #31 on: February 15, 2014, 12:17:49 PM »
chris_overseas finished it and the indicator is working again on 5D3, hopefully on both firmware versions.

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #32 on: February 18, 2014, 01:21:23 AM »
So last I left this, I had functioning code but it was using the wrong methods to provide it, so we changed the code to use methods that don't work at all.  Did we determine why expected behavior was not working?  This issue could be considered resolved if we can sort that out.  Is it because I'm on the 5D3.123 code base by Chris Miller and its causing the LVINFO code to not trigger as expected by the INIT_FUNC method?

pompeiisneaks

  • Freshman
  • **
  • Posts: 66
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #33 on: February 18, 2014, 01:22:15 AM »
Oh odd, sorry looks like somehow my browser didn't update the last few posts.  I'll give it a test soon and see what I get.

~Phil

chris_overseas

  • Moderators
  • Member
  • *****
  • Posts: 222
Re: elapsed time indicator is gone on nightly build 5D 3
« Reply #34 on: February 18, 2014, 01:41:39 AM »
Yes the elapsed time and bitrates should be working correctly now. It turned out the instant bitrate had been broken for a very long time, it was showing the average rate rather than instant. Also note that I think you're mistaking Mb/s (megaBITs/second) for MB/s (megaBYTEs/second). The factor of 8 was required to give Mb/s so I put it back in.

https://bitbucket.org/chris_miller/magic-lantern/commits/c93085ca474d720819e0d79c40c308b0780d8bd1
5D Mark IV 1.1.2 | 5D Mark III v1.2.3 | Canon 16-35mm f4.0L | Tamron SP 24-70mm f/2.8 Di VC USD G2 | Canon 70-200mm f2.8L IS II | Canon 100-400mm f4.5-5.6L II | Canon 800mm f5.6L | Canon 100mm f2.8L macro | Sigma 14mm f/1.8 DG HSM Art | Yongnuo YN600EX-RT II