[brainstorm] Digital clapper board

Started by Roman, September 26, 2012, 10:16:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Roman

Hey guys,

While filming at a race track I can leave audio recording for a long time without worries, but start and stop a lot of short clips as particular cars etc come past, for maybe 20-30 secs per shot.

If I leave the in camera audio turned on, with current SD cards I can shoot at 1.2x bitrate, turned off 1.7x bitrate.

I've got an external audio setup that works well, but have been thinking about how to sync a lot of small clips to the audio if I had sound disabled to enjoy the benefit of increased bitrate.

So obviously what's required is a way to leave a 'mark' on both the audio and video to denote the start of each shot. Using an actual clapper board would be inconvenient for a lot of short shots.
Especially so if the Mic is intentionally mounted away from the camera to avoid camera noise or cameraman farts etc. :)

So I was thinking of a few ways to implement this for the video portion:

1. Have the ISO cranked right up for a set amount of frames that increases with each 'take'
e.h. shot 1, first 5 frames are cranked to max ISO, next shot first 6 frames, next shot first 7 frames, etc. Similar to how HDR mode works, but only adjusting ISO right at start of clip in a predetermined way.

2. Have ML overlay some text onto the video at the start, if that's possible? Take 1, take 2 etc? I guess just relating back to the .mov filename could work just as well.

3. Have an LED or laser pointer that is out of the shot, but visible when turned on, that flashes x amount of times to denote which take it is (will require a basic circuit board to activate, generate beeps as well, totally external to ML)


And some audio trigger ideas:


1. Wire up an external flash trigger as a trigger for a small speaker/beeper when starting a vid?
Not sure how these work, might not be cost effective to butcher a flash trigger for this.

2. When monitoring Audio, people cut up the AV cable, would it be possible to blip something down through one of the other video monitoring wires to trigger a speaker to make a beep? Or just use the unmodified AV cable audio output to trigger a small beeper speaker perhaps? Since headphone monitoring on camera isnt required if synching to external mic.

3. Use a wired remote trigger, that when starting to record video has a split cable that runs off to a basic circuit that does a simple (last amount of beeps+1) output near the mic that could somehow correspond to the video.

I'm beyond useless with electronics and what not, but my Dad is pretty handy with these kind of things if I can salespitch him with a well thought out plan. :)

Anyone got any thoughts on the above?

Although this is in the 'new features' forum it could potentially be a hardware solution that works well, just wondering what other ideas people had which could help.

Thanks.

a1ex

ML can do a beep when recording starts (with bleeding edge builds it can be quite loud). Can it help?

ilguercio

I was thinking about the PC sync out since an external recorder is mostly placed on the camera itself on a run and gun situation.
First of all, can you trigger the flash when starting and ending a recording?
Second thing, what can you put at the end of a sync cable to produce a beep when triggered?
Shame the H1 can't be triggered via its input port, if needed.
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.

Roman

Hi Al3x, I'll have to have a dig through the menus and test the beep at start.
Is there a volume setting on it?.

It would still be difficult to know how to sync many small vids though if it's the same beep each time. However if it's audible on the mic then it would certainly help!

Generally however I'd use cardioid pattern on the mic with the 'dead' zone where the camera is, so it doesnt pick up camera noise so would have to try it and see.


1%

Recording wav in camera at the same time as external recorder doesn't solve this? When you press rec, wav starts, when you stop it stops. Or still too hard to match up? You can also output from external recorder into the camera if its close enough and match that way.

Or beep and burn red dot or frame onto video at the same time? First one already works for me but I haven't tried matching the wavs to the videos so exact sync isn't tested.

Roman

I havent tried recording any WAV files yet to be honest!

I'll give that a go, and test the sync tonight.

Even in its simplest implementation burning a red dot on the start of the shot, and making a beep would be pretty damn awesome.

It would be preferential to not eat up SD card space with 'throw away' wav files if I could help it. But if it makes for a much easier solution then cant complain. :)

I could possibly look at using the headphones output on my external mic as an input to the camera, it's the only output apart from USB.

Assuming they are compatible voltages etc of course, not sure.

The issue is that I'd shoot maybe say 30-40 clips in a day to match up with 1 audio track, so having some sort of numbering or reference between the two would make things a lot easier than a generic single beep or dot.

The WAV file solution might work out well though, assuming pluraleyes can yank the video along with the wav file when it matches up to the main audio clip.

tin2tin

Quote from: 1% on September 27, 2012, 02:43:08 AM
Or beep and burn red dot or frame onto video at the same time?
I think that this is an excellent idea. Maybe a big circle, so it later on also can be used for checking if the aspect ratio is correct during editing.

Just having an idea: To mark the the takes differently morse code could be used, that is if the beep duration can be changed too. http://en.wikipedia.org/wiki/Morse_code

So to mimic the traditional way of announcing the shot first and then clap with the clapper-board, first there could be a letter in morse code(a dot=1 frame, a dash=3 frames and 1 frame black between) at 50% volume and ยท and - visual markings. Then 3 frames black and then 1 frame sync beep at 100% volume with a big circle.  Letters a-z could be looped.   

Maybe to complicated, but it would be very useful if run audio separately and have no sync sound recording on camera(ex. recording 720p 25fps).

tin2tin

Here's an example of how it could look:

Done with an Avisynth script:
clip=BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dot.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,-1)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(3,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("sync1.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync2.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync3.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip1=clip.subtitle("Sync leader for the letter 'A'",size=30,text_color=$FFFFFF,align=7)

clip=BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dot.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,-1)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(3,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("sync1.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync2.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync3.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip3=clip.subtitle("Sync leader for the letter 'Q'",size=30,text_color=$FFFFFF,align=7)

clip=BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dot.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,-1)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dash.png",0,2).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,2)
clip=clip+BlankClip(1,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("dot.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 0.5)).trim(0,-1)
clip=clip+BlankClip(3,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip=clip+ImageReader("sync1.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync2.png",0,0).audiodub(Tone(10.0, 0, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+ImageReader("sync3.png",0,0).audiodub(Tone(10.0, 440, 48000, 2, "sine", 1.0)).trim(0,-1)
clip=clip+BlankClip(20,800,600,pixel_type="rgb24",stereo=true,audio_rate=48000)
clip2=clip.subtitle("Sync leader for the letter 'C'",size=30,text_color=$FFFFFF,align=7)

clip1++clip2++clip3

tin2tin

What do you guys think about the morse code idea? Is it a bad idea or not possible to implement?

Anyway a camera beep and a dot in the frame would be very useful.

a1ex

It's possible. Only that I didn't understand the meaning of those drawings...

nanomad

I do understand the meaning (it's announcing the shot using morse, the red dot is the clap), but I don't see how it would help Roman (he said that the audio recorder is away from the camera so that it doesn't pick up the noise from the cameraman)
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

tin2tin

The letters in morse code consists of dots and dashes(.&-). In audio a dot is one frame and a dash is 3 frames long. There is 1 blank frame between each sign. Visually the dots would be visible for one frame and the dashes visible visible for 3 frames with one frame between. The red circle is the clap. If the volume of the camera beep is controlable then the beep for the clap should the higest volume, so the difference between anoucement and clap beep would be visible in the audio waveform.

To record beeps from a camera with the seperate audio equiptment would be possible in most cases, but not in all of course.

But is it at all possible to write graphics into the recorded images an can the duration and volume of the camera beeps be controlled?

a1ex

It is possible to write graphics (I've burned the magic zoom image in a video just for fun). Audio and beeps can be controlled, compile the bleeding edge and give it a try.

1%

Pop from audio override on 600D is already a marker too. I think the last revs mostly took it out tho.

tin2tin


Roman

Thanks for replies.

I went out and took some more video at the track last weekend.

Turned out to be about 80 individual clips recorded.

With this volume of material to match up, I dont think it's worth doing anything apart from keeping audio enabled and using pluraleyes to match it all.

Otherwise I'll be spending 3 weeks editing 1 days footage just to match the audio :)

However I still think some digital equivilent of a clapper board would be handy in some circumstances.

That last pic makes it a bit clearer Tin2tin, seems like it could be reasonably easy to match up that way without actually having to understand morse code. :)
I guess the only challenge would be how to automate a unique sequence for start of each shot.

1%

After today's testing with external/internal I'm dissapointed to say the wavs are out of sync.

I recorded a clip and Total length is 1:22, 1,990 frames but audio is only 1:18 and doesn't sync from either end. I think when first bit of wav is written a frame with red "not recording" X should be injected into video buffer in addition to maybe the wav filename. I *HOPE* this would let me match up begining of wav to where it is actually starting and kill sync issues. I figure I could throw the function in beep.c but I don't know how to draw on the HD buffer. With this and other sync issues people are having I think something like this sorely needed.


tin2tin

Been googeling a bit on morse to text and there are several tools out there which can convert audio with morse to text - so I guess it could be possible to extract the "announcement" letter(or letters) out of an audio recording and add it to the audio-filename. If ML could add the same letter(or letters) to the video filename it could be a bit easier so pair video and audio. And with the "announcement" in both audio and video it would be easy to check if the two of them would fit.

I'm not that good a coder, so I do not dare to tinker with the ML code myself. I'm sorry for rambling about this, it will properly be quite time consuming to implement it.

@1% I Recorded some very long takes with a low bitrate. Properly around 30 minutes and when syncing I realised that the speed of my Tascam DR-40 wasn't correct - so the audio had to be speed up with 1.08 - which I could easily do in Audacity. So it is not necessarily the camera making things out of sync.

1%

I don't have a separate recorder. Rec start triggers the ml sound recorder to start a wav, there is just some missing audio at start and end. I tested with both internal and external mic and had the same issues. But you have a good idea there if I find delay, which I can't because sync is so off. Not sure if its off by a different amount in every file either as this is the first time I'm giving it a serious workout. *** Actually I think I could test delay by recording internal on one side and external on other channel but that is least of my worries.

No need for morse code, just any kind of pop or uniform easily recognizable sound with something on the screen to match it. ML can generate morse code fine without a wav having to be stored, you can make sine wavs and notes already. For me it *SHOULD* line up if I see on the screen when the first wav chunk was written.

I think you guys can try it on other cameras if you add yours to "HIGH BR wav record" menu in bitrate.c and compile. Separate wav for me is the bees knees except for this.

tin2tin

The idea was that the camera beeps could do the morse code, not stored wavs.

1%

I threw 3 beeps into the buffer 100ms apart and only get one if sound recording while beeping but its enough if I can also write something on HD buffer. Also get a squiggle at start/stop but its not enough unless audio is muted. Will need to get timing right of course but first part is in the bag.

http://imgur.com/pKyYe

Recording something normal I get 2 beeps. The timing seems to match up file to file.

http://i.imgur.com/JP8s9.jpg

*Got something into HD buffer but its not consistent, I need to grab a better function.

I tried to draw with this:


void hd_draw_rect(uint8_t color, int x0, int y0, int w, int h)
{
    uint8_t * const hdram = YUV422_HD_BUFFER_DMA_ADDR;
   // if (!bvram) return;
   
    draw_line(x0,   y0,   x0+w,   y0, color);
    draw_line(x0+w, y0,   x0+w, y0+h, color);
    draw_line(x0+w, y0+h,   x0, y0+h, color);
    draw_line(x0,   y0,     x0, y0+h, color);
}
hd_draw_rect(COLOR_BLACK, 0, 0, 1024, 1024);


But the rectangle never appears. When I converted draw_pallet it drew sometimes but took a long time to complete. Tried some other things and so far nothing.

tin2tin

@1% - Thank you for giving this stuff a shot.

I had not idea at ML could record audio separately with the video being recorded too - if I understand you correctly? What's the advantage of this?

Roman

Currently if you record with sound on, the buffer gets full, on account of something presumably to do with how it stitches the video and audio together.

For example with 600D and particular SD card I've got, can record at 1.2x bitrate with audio on, 1.7x bitrate with audio off.

Recording them seperately (both in camera) seems to alleviate this problem as best I understand it, and allows recording at a higher bitrate while still having sound recorded internally.

1%

Pretty much what you said. Without this function I have to use a real clapper/marker or sync is very hard. I think audio isn't even stopped by the buffer but by FW. I've thought about patching that out and seeing if it will keep recording but then you have to fight with canon changing volume/gain, etc (at least for 600D).

Need to speed up + figure out the function that worked. Unlike LV/Bitmap there is no back-end for writing on the HD buffer. That function I was trying was still writing on the screen. There might be another way like changing tint or turning on an image effect.

Roman

Yeah I thought maxing out ISO for a few frames might be a good idea just because the bulk of the code would already be there for HDR mode. (At a guess, I'm not a programmer)