Bit rate investigation

Started by Audionut, July 19, 2012, 04:54:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ilguercio

Can't access ML on your autoexec, trash button doesn't do anything.
I can access it only while in LV mode. Still, the continuous redrawing of the screen doesn't allow me to set things properly.
Send this patch to A1ex and let him compile the whole, maybe?
I can test it right now.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex

QuotemvrSetDeblockingFilter
I've tried these, but could not notice any effect, even at CBR 0.1. Maybe my eye is not trained for this.

Those mvr functions set values in mvr_config structure. I prefer to set them manually, rather than calling mvr functions (because you have access to all parameters in a portable way).

They have usually one argument - a pointer to an array (or structure) containing all the parameters they use. They are also registered via the call-by-name (eventproc) mechanism.

ilguercio

Well, i just shut the camera off with this autoexec while still in LV and the camera generated a strange noise or a series of very fast beeps, i can't understand.
What is this? :S
I can record it if you want.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex


ilguercio

Nope, and by the way beep is always disabled on my 50D (just double checked it) .
This is the noise. It has never done it with any other build, just with this one from 1%.
https://dl.dropbox.com/u/1087972/ML/strange%20noise.WAV
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex

Very cool - if I know how to get these from normal ML, we could solve the audio sync part :d

ilguercio

Lol, it does it only when i turn the camera off while in LV but it is not reproduceable because it doesn't always occur.
Ask 1%, i never experienced such stuff.
What might it be, in your opinion?
I can't understand if it's coming from the little speaker placed in the back cover or it is something related to the screen trying to shut down (and all the electronics related) .
Does the LCD driver have the ability to trigger sounds (ok, that was just a wild guess) .
Anyway, you should probably allow users to fiddle with each available setting related to the encoder.
I can't test with this build, i don't know if it's my 50D that doesn't like it.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex

If 1% can post a diff of the code, maybe I can figure out what's going on.

ilguercio

Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

a1ex


ilguercio

Probably, why did it buzz anyway?
It doesn't do it all the time, can you take his code and try to log what happens at shutdown?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

ilguercio

Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

If you're having issues with the menu its because I disabled menu piggyback and menu closing to have access to ML while in the movie player. I guess this is the side effect. I can take it off.. I think we've learned all we need from play mode.

2 audio registers may be switched on other cameras from when I was audio testing with them. Can't really think of anything else.

unity2k

I'd like to add a thought, maybe not the smartest, but anyway. What if upon the start of recording video, a sync sound is recorded, both on camera and on an external audio device, at this point the audio is disabled on camera and the CBR is pushed higher, as the recording approaches the end of what is needed to be filmed, a button push lowers the CBR, audio is re-enabled and a second sync sound recorded? Then in post the sound could be synced back to the footage (think PluralEyes).

ilguercio

But why is the something buzzing?
It is not the usual beep.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

Something in audio.c write to those registers on 50D. I only made sure it didn't on 600D.

ilguercio

But the 50D doesn't have audio so where does it come from?
It could be the LCD driver buzzing but it's just speculating about nothing, really.
Could you generate a beep from the 50D? It has got a tiny speaker for the audio confirmation of the focus and i think that's the only thing it can generate.
What do you think?
Also, what is left about the video compression codec?
Just P and I regulate the amount of data?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

Lots is left about the codec, I looked in the firmware. Can alter the movie recorder to ignore 30 minute and 4gb limit with some effort. that is the only place I see the limit in firmware (so far). Movie recorder is just set to stop on those, nothing in actual file writing stuff.

There are the gop opts to figure out and setting gop length... that deblocking filter.


* look in audio.c and find what is writing to what and then experiment. You'll find your LCD speaker or whatever that makes noise... maybe you have an audio IC thats not used? I don't have 50D. I'll fix the trash button stuff though we have PTP I don't think its needed anymore.

Look through repo/audio.c and see what is writing

https://bitbucket.org/OtherOnePercent/tragic-lantern


*mvrSetD_FULLHD


is this gop length?

The modes:
FULLHD = 1080P?
HD= 720P?
VGA= duh?

5 gop bitrate options for each mode. Good thing is we can now ONLY tweak FULLHD and forget the crazy loops.


50D only:

http://www.qfpost.com/file/d?g=d3NJAuL9W

Does this fix ML menu on 50D?

Chungdha

Any possibility to lower the sound bitrate as its should not be using that much as sound recorder still use standard sd cards with way less bitrate than that, as max sound be just 192kb/s

ilguercio

Well, the guys which have initially analyzed the firmware have found references to AK4646 as audio chip but i can't see it on my camera.
I don't know if it is integrated in something else or what, i even asked lensrentals' Roger Cicala about that and he said he couldn't find it even on 5DII and III so that could be a clue and a hope.
Unfortunately i don't know about C and ARM in general, i can just guess and test but i can't surely write any code.
I'm going to try your autoexec and see if it solved the problem with my 50D.
Thanks.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

Looking at 50D firmware would probably tell all. Or try writing to power registers of 50D for AK style IC and Lapis style IC.


QuoteAny possibility to lower the sound bitrate as its should not be using that much as sound recorder still use standard sd cards with way less bitrate than that, as max sound be just 192kb/s

You can lower sampling rate. The audio is uncompressed. Its something to investigate for sure.


ilguercio

I can't even compile the code, if you know any good manner of getting me started into this i would really appreciate it.
Things started here:
http://chdk.setepontos.com/index.php?topic=6161.75
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

1%

Thats a bit of a process... quickest way is to get current ML source and edit the 50D parts. You can compile on linux and mac (yagarto?) not sure on windows. If you don't know anything about C its going to be a tough road.

1%

*Update

Set D1 and D2 values. I get abnormal instant bit rates even over 500 but then MvRecorder seems to reset to regular values without stopping. Maybe there are more hidden things in the other registers?


*Update 2

looking through the fw, gop opts also set the timers? like x67e4;   

D1_30fps;   is never set by canon functions, why?

Register    ; 0x2f is set by BOTH gop opts and D setting functions but I don't see it in the MVR.H

I saw the discussion on google ~(2011) and wow, nobody really looked at this besides alex? Nobody wants higher quality videos to compete with GH1?

Any more hints?

Leon

@ 1% :  How on earth can audio be 40 Mbps?  I just demuxed a video shot with the firmware default, and the audio file is 1.5 Mbps, which is what it should be at 48,000 Hz, 16 bit, stereo:  48000 * 16 * 2 = 125 kB/s = 1.5 Mbps.

The question is why does this 1.5Mbps make such a difference to the max video bitrate allowed?  Does anyone know?

@weldroid :  Thanks for those reduced FPS images.  The difference is obvious.  Even if one may be slightly defocused, there's still a lot more compression artifacts in the more compressed frame, and it would be even more noticeable after editing.