this post was submitted on
205 points (68% like it)
382 up votes 177 down votes
all 94 comments

[–]deferCyanogenMod 59 points60 points ago

I don't think this is possible on most phones, at least running Android 2.x. While the Camera and MediaRecorder APIs may be able to do so, there are some lower level limitations.

The main problem is that, at a lower level, both Cameras use the same buffers for preview/recording and mixing them will result in buffer corruptions.

Now, on Android 3.0+, things work differently and the userspace explicitly requests and requires access to Camera buffers directly. So, it may be possible to do this bearing in mind the version restriction.

[–]NotSeriousAtAll 12 points13 points ago

I tried it with my Atrix(Gingerbread) and my Transformer Prime(ICS) without success. The cameras probably share hardware and can't run simultaneously.

[–]mountainwalker 2 points3 points ago

How long does it take android to initialize the camera? Would it be possible to switch back and forth, alternating frames at ~half fps?

[–]deferCyanogenMod 4 points5 points ago

Depends on the hardware, but typically it's very slow to initialize. So much, that we usually do it asynchronously in order to prevent ANR screens.

So yeah, this is possible but I would be surprised if you could get a global 4 fps out of this.

[–]IAmASocketMan 0 points1 point ago

You can do this, yes... I might try it as an alternative for older devices.

[–]IAmASocketMan 2 points3 points ago

API Level 10 "Your application should only have one Camera object active at a time for a particular hardware camera."

So the docs suggest it is possible, my phone doesn't seem to or I'm misunderstanding things elsewhere.

[–]smeenz 23 points24 points ago

The android camera API doesn't appear to prohibit this... it looks like you could create two camera objects and lock them both, though I haven't tried it.

[–]ScottyNuttzCaptivate, CM9 | Nook Color, CM9 7 points8 points ago

It would be cool to see a picture-in-picture type video recording app.

[–]NotSeriousAtAll 2 points3 points ago

I did, didn't work.

[–]nom_trees[S] 2 points3 points ago

Been reading your posts and ive come to this conclusion http://www.imgur.com/fZCDe.jpg

[–]nom_trees[S] 0 points1 point ago

God damnit baconreader.... can someone tell me how to delete comments on here?

[–]MstrKiefSamsung Infuse SGH-1997 | CM7.1.0 1 point2 points ago

You can't.

[–]superdude4agze 1 point2 points ago

Reddit news, and Reddit is fun can.

[–]nom_trees[S] 0 points1 point ago

Ill check out Reddit news but I hate Reddit is fun

[–]ambitious 0 points1 point ago

Can you call the setcamera method for two cameras though?

[–]IAmASocketMan 1 point2 points ago

You can create two MediaRecorders, and setCamera on each of them, they both write to independent files. I'm sure there's a better way but my device won't even let me open both cameras concurrently.

[–]jamuraaDroid 3, CM9 KANG 14 points15 points ago

While the Android API doesn't prohibit using both cameras at once, I would be very surprised if many of the phones on the market supported it based on the fact that the underlying hardware is not easy to set up to record both streams simultaneously. The chips usually only have one camera interface which can be active at a time or they would need to have low level driver changes in order to record one of the streams into memory and put the other one through the GPU.

It definitely would depend on the specific mobile processor and the underlying hardware services supported by the Linux kernel, and you would probably have a very short list of compatible phones as a result.

[–]Sockatees 10 points11 points ago

Some tape and two phones?

[–]rafael000Samsung Galaxy SII (4.0.4), Bezke's AOKP 11 points12 points ago

I would use it to record a rollercoaster ride: the view and my face.

Please, do it!

[–]2_4_16_256Galaxy Nexus, Stock, VZW 18 points19 points ago

I dont in any way see this ending badly. Please live stream results

[–]NeebatSamGal Note FITS IN POCKET Stock 4.0.3 0 points1 point ago

... if you get your phone back after it flies out of your hand, and it still works.

The video would be awesome.

[–]danopiaDroid 2 Global, Stock 2.3, Verizon 4 points5 points ago

That's why he said live stream, so it'll stream and record on the cloud up to when it hits the ground.

[–][deleted] 46 points47 points ago

Best original app idea i have heard in years. If this does not exist it could easily go for 5 bucks on the market and make somebody a fortune.

[–]positronusHP TouchPad CM 9 ALPHA 2, HTC Inspire 4G aospX ICS 21 points22 points ago

Well, not $5. May be $4.99. Quick search didn't reveal any apps. How would the recording be stored? Is split-view possible?

[–]TDVSGSII - CM7 RC 7.2 3 points4 points ago

it would probably need its own media player to playback both videos at the same time. Unless there is something out there like that already. But this is a great idea. Could record reaction vids and whatnot with your phone!

[–]ps02210 11 points12 points ago

Why not record it as PIP?

[–]sarah4ever000 4 points5 points ago

Whats a pip?

[–]noroom 16 points17 points ago

Picture-in-picture.

[–]algo2Galaxy Nexus, stock 4.02 26 points27 points ago

I couldn't resist.

I'm so ashamed of myself now :(

[–]db2gtab, Mountain Laurel 3.1 (2.2) | TF101, stock rooted (3.2.1) 4 points5 points ago

I find myself disappointed that wasn't a Farscape reference.

[–]acidic_compound 7 points8 points ago

[–]db2gtab, Mountain Laurel 3.1 (2.2) | TF101, stock rooted (3.2.1) 1 point2 points ago

Much better.

[–]bexisonfire 0 points1 point ago

It's an inception joke isn't it? Edit: Never mind, link finally loaded for me. Bad connection!

[–]adrianmonk 0 points1 point ago

I expected a picture of a domino.

[–]sportsokkendrager -1 points0 points ago

French people piss me off!

[–]ps02210 0 points1 point ago

Picture-in-Picture, i.e. a small picture inset into the main picture, a'la your typical videoconferencing software or mult-channel DVR/cable/sat box.

[–]HollistarHTC G2 0 points1 point ago

it is definitely possible for android to shoot from 2 cameras at once. look at the way video is done on the evo3D. if you shoot one, and then open it on a pc, you'll see that it's 2 images side by side. the downside to doing it on a 2d android phone is that the front facing cam is always using a lower resolution than the back camera. it could add to the processing time to have 1 image get downgraded so the resolution matches the other.

[–]NotSeriousAtAll 1 point2 points ago

Yes, but those camera were designed to work together. I think the front/back cameras on most devices probably share components to save space and cost.

[–]lojicVibrant + Touchpad | CM9 nightlies 0 points1 point ago

On my Vibrant they certainly do. I'm installing an FFC soon and the way you do it is pop off the back camera and install the two-camera chip in its place.

[–]db2gtab, Mountain Laurel 3.1 (2.2) | TF101, stock rooted (3.2.1) 2 points3 points ago

Never heard of padding?

[–]HollistarHTC G2 1 point2 points ago

I couldn't remember what it's called so early on a Sunday morning. :)

[–]MercurialMadnessManGalaxy S i9000m, ICS, Bell Canada 0 points1 point ago

Yeah, this isn't the same issue. It's related, but the android API probably has a limitation for "front OR back camera". With the evo3D, it's essentially just building on that, so you can do "front OR back(2d) OR back(3d) camera"

[–]ProbablyGeneralizingGalaxy Nexus- Liquid-Rom- Touchpad-CM9 12 points13 points ago

Is this really the best app idea you've heard?

If you don't mind me asking, what would you use this app for?

[–]doubleDHOLY SHIT A 90 CHARACTER LIMIT??? I HAVE A GALAXY NEXUS. 2 points3 points ago

Driving camera?

[–][deleted] ago

[deleted]

[–]Kalkasmotorola Atrix MB860, AT&T -2 points-1 points ago

Too show how the party looks like in thhe front n the back. Or show ur reaction to something happening.

[–]NotSeriousAtAll 18 points19 points ago

I've never tried. I'll see if I can throw something together. I have plans later so I might not finish today.

[–]sugar0Galaxy Nexus - AOKP - Francokernel 25 points26 points ago

Are you serious ?

[–]NotSeriousAtAll 3 points4 points ago

Yes but I'm not promising anything. I have stuff to do today. I've got an old project on my work machine that would be a good start. I just have to remote in and find it.

[–]sugar0Galaxy Nexus - AOKP - Francokernel 11 points12 points ago

Nice to know :)

Btw i was referring to your username, i think you forgot about it.

[–]NotSeriousAtAll 5 points6 points ago

I realized that but I thought you would assume I'm playing you. That damn user name again!

[–]NeebatSamGal Note FITS IN POCKET Stock 4.0.3 1 point2 points ago

I've thought about making a novelty account that says everything I'm writing is a lie. (So I could tell a stupid person, "You make an excellent point," and without noticing the username, they'd never know I was insulting them.) But I can't imagine going through day-to-day life on Reddit with a name like that.

[–]NotSeriousAtAll 5 points6 points ago

It's a burden I'm willing to bear.

[–]Battleflame 1 point2 points ago

My brain is melting at this point

[–]thatsadamnlieDesire HD, TF101 2 points3 points ago

My time has come.

[–]NeebatSamGal Note FITS IN POCKET Stock 4.0.3 -1 points0 points ago

I was thinking more like "this_is_a_lie", or "HereComesTheLie", or "JustLyingToPleaseYou"

[–]unavailable4comment -1 points0 points ago

Wait so are you going to or not?

[–]VyRuZ_ 3 points4 points ago

You do know your own username, right?

[–]NotSeriousAtAll 4 points5 points ago*

OK, I tried it. When I turn on the other camera the first one just stops (Frozen screen) and vise-versa. I assume this is a hardware limitation. I may try it on an iphone tomorrow at work.

[–]NeebatSamGal Note FITS IN POCKET Stock 4.0.3 1 point2 points ago

Are you using ICS or something earlier? User defer says it's impossible pre-ICS.

[–]NotSeriousAtAll 3 points4 points ago

I tried it on an Atrix and Transformer Prime (ICS)

[–]nom_trees[S] 0 points1 point ago

So I've been reading your posts and I've come to the following conclusion... http://www.imgur.com/fZCDe.jpg

[–]NotSeriousAtAll 0 points1 point ago

HA!

[–]thedoctor692 7 points8 points ago

I'm a camera design engineer. Most camera modules I've seen used by cell phone companies have 2 sensors hooked up to a single set of processing hardware, controlled by a mux. It's not only a cost thing, it's also a size and power/heat concern. It's possible there's some that do both, but I haven't seen them.

Nice idea, probably not practical on existing hardware.

[–]gdptAT&T Galaxy SII, CM9 2 points3 points ago

That would be very cool! But what would you use it for?

[–]willfeSamsung Nexus S, CyanogenMod 9 Nightlies 11 points12 points ago

Recording police encounters immediately comes to mind.

[–]MilitantNegroHTC Desire, CM7 2 points3 points ago

What does a double camera view add to this situation?

[–]willfeSamsung Nexus S, CyanogenMod 9 Nightlies 4 points5 points ago

Assuming front-facing and back-facing cameras, you have simultaneous recording of the officer and yourself -- facial expressions, movements, gestures, etc. -- in addition to the audio.

More recordings/angles of a given event are never a bad thing if it escalates to the point that a recording becomes necessary.

[–]IAmASocketMan 5 points6 points ago

Cover those pigs sneaking up behind you.

[–]BTMPL 3 points4 points ago

vlog?

[–]subcypherSGS2E4GT&SGT10 1 point2 points ago

I was thinking dash mount camera, actually.

[–]DriedT 0 points1 point ago

I just had this idea the other day and was disappointed to find that quite a few dash cam apps already existed. Maybe I'll try to get motivated into android programming again with this two camera idea, only problem is my Galaxy S (Fascinate) doesn't have a front facing camera for me to test it on, but I could go to my local hackerspace and see if someone has a phone I could test on. Now I'm just typing my thoughts...

[–]subcypherSGS2E4GT&SGT10 0 points1 point ago

I'm not in a position like this, but I believe it would be handy for parents to say, "Make sure your dash cam is on. No texting while driving. You can still use a headset to make calls. If you wreck, I want to see the footage." And it would show the inside and outside of the car.

Of course you might see something horrible in a worst case scenario...

[–]DriedT 0 points1 point ago

I never thought of the parenting scenario. The worst case footage could be useful for vehicle safety research, if people were willing to hand it over.

[–]subcypherSGS2E4GT&SGT10 0 points1 point ago

True. Insurance purposes are fairly apparent as well. I remember a recent video of someone being backed into and the driver of the other vehicle trying to claim they were rear ended until the guy pointed out the dash cam.

[–]RandomsillinessE4GT, Caulkins 2 points3 points ago

oh god, someone please make this!

[–]orivar 2 points3 points ago

I'll just leave this here...

[–][deleted] 1 point2 points ago

for making POV porn while capturing your O face?

[–]thebudgie 0 points1 point ago

So you can PIP(picture in picture) while you PIP(penis in pussy)?

EDIT: something about 'we have to go deeper!'

[–]andytubaGalaxy Nexus, ICS 4.0.4 AOKP, VZW 0 points1 point ago

That would integrate well with the FleshPad.

[–]senectus 0 points1 point ago

While using it as a dildo... Inception Pr0n...

[–]silentplDell Streak 5 1 point2 points ago

yeah, cool idea. Hope someone makes it.

[–]IAmASocketMan 1 point2 points ago

Hmm I set up a test app on my Epic 4g, and it doesn't seem to allow both cameras to be opened at the same time.

[–]psilokanSamsung Galaxy S II 0 points1 point ago

Hmm... interesting idea,especially if the audio track is perfectly synced. Sometimes I do impromptu hiking videos and it'd be nice to cut back and forth between the front and rear cameras.

[–]ambitious 0 points1 point ago

This would be a cool idea for travelling, get two perspectives of the experience.

[–]nom_trees[S] 0 points1 point ago

Yeah I had a sneaking suspicion this would be the case. Thanks

[–]benmarvinTheAndroidSite.com 0 points1 point ago

According to this post on Sprint dev forums, at least the EVO 4G doesn't support it at a hardware level, apparently they asked HTC directly.

I imagine the camera interface/design is pretty similar across most new generation Android phones, but I don't have specific knowledge.

Great idea for an app though.

[–]SephrVZW Galaxy Nexus, Nexus One, Asus Transformer 0 points1 point ago

Try running Stick it! while you record video in your preferred video recording app.

[–]mshenrickDream/G1, CM 6.1 + Jailbroken iPhone 4 + CM9 Motorola Xoom Wi-fi -1 points0 points ago

I'd like this for iPhone, but since app store apps use apples camera api so the interface is uniform, it might have to be a jailbreak app, not that that's a problem for me

[–]nom_trees[S] -2 points-1 points ago

Look out we got a real badass over here

[–]electricsandstormNexus S, 2.3.6 -1 points0 points ago

Congrats, you just made someone rich.

[–]ReesesPoofs -1 points0 points ago

Yes then I can finally record me fucking my gf doggy style and also get that sexy male face shot everybody wants to see.

What? Wasn't that what you guys wanted to use it for?

[–]neoknights -2 points-1 points ago

[–]tk338 0 points1 point ago

Now that would be cool in an app if any phone had the power to do it! Be able to slide a line in the centre of the screen to reveal more of the front facing cameras view, or more of the rears... Damn! I wonder if there's a patent for that...

[–]neoknights 0 points1 point ago

Nope... well probably not. The link I gave you if from a DIY website and they are all about open source and copyleft