Dashcam -- Joying Intel - MTCD Android Head Units General

Ok, so people have found that standard USB cameras don't work on these units. The only known working camera is actually a fully self-contained recording device, that really only uses the USB wire for power and a few pointless controls.
https://www.carjoying.com/car-acces...-for-joying-new-android-system-head-unit.html
Really, if you're going to make the camera self contained, then what the heck is the point of bothering with the hookup with the head unit to begin with? Makes no sense.
Now the reason they did this is quite obvious... in their OLDER head units, they used the complete piece of trash ROCKCHIP 3188 SoC. I'm referring, of course, to MTC units. Those units would be *completely crippled* if you tried to record video on them, since they had neither video encoder nor even video decoder hardware blocks, which means that the video processing would be done entirely on the CPU! So they sold a camera that would mask this problem by recording the video itself!
The Intel SoC's have a video CODEC, so obviously the right way to do this now is to actually record the video on the head unit, using standard file formats.
I initially theorized that they had crippled either the kernel or the camera HAL.
So last night I watched the kernel log while plugging a PROPER USB camera in, and found something very interesting;
1) The kernel detected the camera, and properly associated it with the UVC video driver!
2) It was assigned a devfs entry of /dev/video5 --- 5? FIVE?
That's interesting. Why 5? Because there are already entries of /dev/video0 through /dev/video4.
Wonder what those extra inputs correspond to? Typically, when you plug in a device like a camera, the devfs entry is created dynamically. Yes, in this case, it was! But it was created at 5 (the 6th video device). Very likely, the HAL is hardcoded to use specific inputs from 0-4. I'm not aware of any Android mechanism for manually selecting the device. So blank screen on "DVR"? Because its trying to pull video from a video device that has no video INPUT.
It is certainly worth some investigation. I wonder what those inputs correspond to. Don't suppose that they could actually have video feeds from things like BACKUP camera and VIDEO IN, that feed Android, could they? Note that some video devices can create multiple devfs entries that correspond to different modes of operation, which could explain why there are so many.
It is also possible that the FYT5009 SoM has video input option that may not even be hooked up. Depends on how the MCU board is wired up.
I also note that in the configuration options for backup camera, there is an option for it to use a USB camera.
EDIT:
Checked into the camera HAL, it has hardcoded values for /dev/video0 through /dev/video3. What this means, is that there is currently no way in hell that Android can access /dev/video5, which is where an external USB camera is attached.
THIS IS SOMETHING WE CAN WORK WITH!!!!
AOSP USB Camera HAL:
https://android.googlesource.com/platform/hardware/libhardware/+/master/modules/usbcamera
Found something more...
There is an executable at /sbin/camcap
What it is, is a butchered build of ffmpeg
Which, of course, is licensed as GPL/LGPL.
So... intentionally and knowingly violating GPL, else why would they be hiding the identity of the program!

Great findings!
I have a USB camera I'd like to use as a DVR on one of the intel headunits. I really hope this can be done/

Good news, everyone!
I have successfully captured a video from a generic uvcvideo USB camera! And even better, over a test with a duration of about 2 minutes of HD MJPEG at whatever maximum frame rate it was able to deliver, the CPU utilization never exceeded 2% of *one* core.
Now truth is that I completely bypassed Android for this test, and ran ffmpeg directly with /dev/video5. Now this actually is a great option for running dashcam, since it is low overhead, greater running stability (no worry about Android coming around and killing the process!), and very effective.
I will begin working on a utility for managing it.
I would like to be able to capture the camera's audio stream as well, mux multiple cameras into a single video file, time based auto splitting, and a subtitle track containing a coordinate / speed readout from GPS. Ffmpeg should be able to handle all of it, except interfacing with the GPS, I will need something else to come up with the data stream for that.

doitright said:
Good news, everyone!
I have successfully captured a video from a generic uvcvideo USB camera! And even better, over a test with a duration of about 2 minutes of HD MJPEG at whatever maximum frame rate it was able to deliver, the CPU utilization never exceeded 2% of *one* core.
Now truth is that I completely bypassed Android for this test, and ran ffmpeg directly with /dev/video5. Now this actually is a great option for running dashcam, since it is low overhead, greater running stability (no worry about Android coming around and killing the process!), and very effective.
I will begin working on a utility for managing it.
I would like to be able to capture the camera's audio stream as well, mux multiple cameras into a single video file, time based auto splitting, and a subtitle track containing a coordinate / speed readout from GPS. Ffmpeg should be able to handle all of it, except interfacing with the GPS, I will need something else to come up with the data stream for that.
Click to expand...
Click to collapse
Well, that's worth being an app on Play store. Keep up the gr8 work!

KamaL said:
Well, that's worth being an app on Play store. Keep up the gr8 work!
Click to expand...
Click to collapse
I have no interest or intention of touching play store.

doitright said:
I have no interest or intention of touching play store.
Click to expand...
Click to collapse
Well, that was a sort of a compliment, but I'm not surprised of your reply...

KamaL said:
Well, that was a sort of a compliment, but I'm not surprised of your reply...
Click to expand...
Click to collapse
One of the great strengths of Android is that you don't need to mess around with the "manufacturer's only authorized software source" -- as in apple. Reality is that play store is only there for people who don't have the faintest idea about how powerful their devices actually are. Apple's store is there to restrict their users' freedom.

So I've been playing with ffmpeg, and have figured out how to use it to capture any number of v4l2 video streams into a single mkv file, with unequal video configurations, and automatic time-based file splitting.
Its pretty cool what you can do.
For instance, BETTER camera does mjpeg at high resolution (say 800x600, or even higher), 30 fps. Crappy camera only does raw 320x240 at 5 fps. I can simultaneously shove BOTH of their streams into a single mkv file **WITHOUT TRANSCODING THE STREAMS***.
This makes sense because (1) you might have a bunch of leftover cameras that you want to use, (2) you probably want to go with a higher quality on the front than the back -- backwards cameras are a lot less interesting (though still useful enough to make sense to record).
In any case, this is going to be pretty nice.
I wonder if our head units have one USB port with a hub chip? Or if they have two genuine USB ports? Easy enough to find out, I just haven't bothered to look yet.
One "issue" I'm having with the CHEAP USB cameras I'm playing around with, is that I can't select framerate or quality. It would be nice to be able to tell the camera to increase the compression ratio and drop the framerate down to, say 5 fps.... since it would make the storage requirements significantly lower. Of course, I could turn on transcoding, but couldn't use the hardware codec with ffmpeg, which means it would be on the CPU. I wonder if the cameras support it? Or if its a limitation of uvcvideo (the driver)?

Great job!
What USB camera are you currently using?
This is the one I bought, thinking it was a rear view camera! Oh well....
http://www.ebay.com/itm/351843416292?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
Claims resolution to be 728 * 582 , not sure if it's true. It would be great if I could use it for basic DVR functionality on the Intel 2GB units.

Now that @doitright is banned, is there anyone capable of continuing his work with this issue?
I'd love to use my USB camera for DVR.
I contacted Joying with this regard, and they weren't helpful at all. They keep claiming on their USB camera is supported. True nonsense.

why was he banned????

gtxaspec said:
why was he banned????
Click to expand...
Click to collapse
Read some of his posts on the forum and you'll understand.
Is anyone here capable of doing the same changes for adding support to USB DVR ??

KamaL said:
Read some of his posts on the forum and you'll understand.
Is anyone here capable of doing the same changes for adding support to USB DVR ??
Click to expand...
Click to collapse
I ve read his last 25 posts and I cant see anything that would get his account temporally disabled (XDA doesnt ban people).

typos1 said:
I ve read his last 25 posts and I cant see anything that would get him banned.
Click to expand...
Click to collapse
AFAIK Some were deleted , but it doesn't matter. Let's get back to topic

Weird, he was a helpful user, giving us full bluetooth and all. Seems counterproductive to ban a good resource, oh well....

Hilari0 said:
Weird, he was a helpful user, giving us full bluetooth and all. Seems counterproductive to ban a good resource, oh well....
Click to expand...
Click to collapse
Yep, I know. I'm trying to contact him through the official Joying forums, he was active there too, but no traces of him yet. I'm sure he could have found a solution for this issue.
I have my USB dvr cam installed in the car, waiting for a fix.

Hilari0 said:
Weird, he was a helpful user, giving us full bluetooth and all. Seems counterproductive to ban a good resource, oh well....
Click to expand...
Click to collapse
KamaL said:
Yep, I know. I'm trying to contact him through the official Joying forums, he was active there too, but no traces of him yet. I'm sure he could have found a solution for this issue.
I have my USB dvr cam installed in the car, waiting for a fix.
Click to expand...
Click to collapse
Not weird at all if he broke forum rules (which he must have to be suspended).
Unless you think that if someone is helpful then theyre allowed to break the rules ?

Great news everyone, we have a working solution for running any USB cam on the joying intel units!
I'll let you guess who is working on it. check the progress on github:
https://github.com/lbdroid/FFMpeg-DashCam
It's working pretty well for me!!

KamaL said:
I'll let you guess who is working on it.
Click to expand...
Click to collapse
Thanks to the wonderful worker(@doitright), everyone can talk, only some can and will work!!Kudos

KamaL said:
Great news everyone, we have a working solution for running any USB cam on the joying intel units!
I'll let you guess who is working on it. check the progress on github:
https://github.com/lbdroid/FFMpeg-DashCam
It's working pretty well for me!!
Click to expand...
Click to collapse
Kudo's to him! Hopefully he still read this forum.

Related

QIK Video Streaming (possible to improve performance? )

As I am sure many already know, there is a service called QIK which allows you to transmit live audio and video from your phone.
I've been trying it out on my Verizon HTC TouchPro 2, and it's a pretty fun application, but the one thing that is a bit annoying is that the frame rate is low - something like four or five frames per second and therefore very jumpy. It does not seem to matter if it is 3G or Wifi, either way it's just not very fast. Other phones, however, seem to get much better frame rates, Nokia's and the iPhone 3G look like they're doing at least 15fps or better.
As I have come to understand, the reason for this is that HTC has not published their camera system hardware API, thus forcing developers to capture the images directly and encode them in software. While the phone is able to encode pretty good mpeg-4 on the fly, they don't give any kind of SDK to actually use this capability in any third party software.
So...
This leads me to wonder if there are any ways of doing this that have been developed independently. We all know that a vendor's refusal to put out a public API does not stop others from developing one using a combination of reverse-engineering, API sniffing, backdooring etc.
I am aware that developers have managed to get 3D acceleration working on HTC models, despite the lack of openness from HTC.
Alternatively, are there any other services like QIK that might do better when it comes to streaming?
great question. I am looking for the same answer.
The quality of the video is much better if you upload a video taken directly with the HTC camera app.
This would be fine for me, but it always make the upload Private, which is the opposite of what I need.
Have you found any workarounds?

Unrestricted hdmi out

Has anyone made any progress on getting the hdmi out to just just display whats on the screen and bypass the drm limitations?
Either that or Composite out...for mobile use...(car audio)...but unrestricted HDMI would be SICK....
hopefully this happens...definitely donation-worthy!
Composite out from the HDMI? I guess, but the hardware is there fro HDMI. Sprint wrote their own API for it So I am guessing that Tweeking it a bit will allow for full screen display.
The Desire already does Composite output and it is full display. I don't get the DRM issue, because who cares if the home screen displays on the HDMI and the videos are pushed out the HDMI so where is the issue?
It seems like it would be relatively trivial to write an app that takes a screen shot 30 times per second and broadcasts it over the HDMI cable. I don't know if its the most elegant way to do it, but it should be worth a shot.
that would be one way to skin a cat, but damn it would make the phone slooooooowwwww
Need a thread with wishes for hardware/software tweaks.
Like higher fps and bitrate in video recording.
Better algorithm to focus camera for taking photos.
Etc.
theillustratedlife said:
It seems like it would be relatively trivial to write an app that takes a screen shot 30 times per second and broadcasts it over the HDMI cable. I don't know if its the most elegant way to do it, but it should be worth a shot.
Click to expand...
Click to collapse
I already tried that, by directly copying the framebuffer for the LCD to the HDMI framebuffer. It didn't work. It steals the frames from the display, but it refuses to output it over HDMI, probably because the HDCP (right term for HDMI DRM?) handshake hasn't been completed.
acrh2 said:
Need a thread with wishes for hardware/software tweaks.
Like higher fps and bitrate in video recording.
Better algorithm to focus camera for taking photos.
Etc.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=716547
Here's a thread dedicated to that
Geniusdog254 said:
I already tried that, by directly copying the framebuffer for the LCD to the HDMI framebuffer. It didn't work. It steals the frames from the display, but it refuses to output it over HDMI, probably because the HDCP (right term for HDMI DRM?) handshake hasn't been completed.
Click to expand...
Click to collapse
Mind sharing the code for exactly what you did? I've been looking through the code on this as well and might just provide a starting point for someone else or atleast let us see what hasn't worked so we can try a different approach. thanks
Geniusdog254 said:
I already tried that, by directly copying the framebuffer for the LCD to the HDMI framebuffer. It didn't work. It steals the frames from the display, but it refuses to output it over HDMI, probably because the HDCP (right term for HDMI DRM?) handshake hasn't been completed.
Click to expand...
Click to collapse
From what I found, the HDMI is already sharing a framebuffer with the LCD...
Cicatrize said:
From what I found, the HDMI is already sharing a framebuffer with the LCD...
Click to expand...
Click to collapse
I admit I am still learning linux but isn't the FB_BASE the base address for the memory allocated for the frame buffer? If so, they don't appear to be the same...
#define MSM_HDMI_FB_BASE 0x02B00000
#define MSM_HDMI_FB_SIZE 0x00400000
http://github.com/toastcfh/HTC-Supe...ster/arch/arm/mach-msm/board-supersonic.h#L23
#define MSM_FB_BASE 0x03B00000
#define MSM_FB_SIZE 0x00465000
http://github.com/toastcfh/HTC-Supe...ster/arch/arm/mach-msm/board-supersonic.h#L46
Cicatrize said:
From what I found, the HDMI is already sharing a framebuffer with the LCD...
Click to expand...
Click to collapse
Nope it doesn't. Look either the memory init code in board-supersonic.h to see both memory banks initiated separately or run "adb shell ls /dev/graphics" and you'll see fb0 & fb1.
u guys are nerds and i love u for it... i really hope u guys figure this out, i don't program or anything like that, but if there's a way i can help, pls don't hesitate to ask. i'm sure alot more people feel the same way. cheers n ty for ur hard work.
Sorry, what I meant was it's probably sharing the same display RAM. Too busy thinking about old school hardware framebuffers. lol

Video Player that support filter/post processing effects

I am looking for a Video player app that supports effect/filter/post processing mainly Sharpening. possibly other options like contrast, saturation/hue etc.
VLC for desktop and many other PC player apps support this, but I have yet to see one for mobile.
I've used MX Player Pro for long time, but i has no way to tweak the actual video it plays...any suggestions?
EDIT: MPV
That does it all if u setup a .conf.
Now use it for Android and PC.
https://mpv.io/manual/stable/
Sharpening while playing is a Hardware based ability
Hi there,
Unfortunately, for now, Sharpening while playing, is a mere Hardware ability (in contrast to HUE, SATURATION, BRIGHTNESS, CONTRAST etc which are software depended).
Sharpening works on its best with PCs hardware architecture, but on mobile platform you should go for proper hardware, not all SOCs support SHARPENING. for instance some MEDIATEK SOCs support it and the ability is called MIRAVISION by MediaTek. i had your problem, and finally bought a midrange tablet with MEDIATEK MTK MT8783 chipset which supports Sharpening and other MiraVision abilities very well, satisfied me with crystal clear and crisp video playing on FullHD IPS screen, far better than any TV.
Amir1975 said:
Hi there,
Unfortunately, for now, Sharpening while playing, is a mere Hardware ability (in contrast to HUE, SATURATION, BRIGHTNESS, CONTRAST etc which are software depended).
Sharpening works on its best with PCs hardware architecture, but on mobile platform you should go for proper hardware, not all SOCs support SHARPENING. for instance some MEDIATEK SOCs support it and the ability is called MIRAVISION by MediaTek. i had your problem, and finally bought a midrange tablet with MEDIATEK MTK MT8783 chipset which supports Sharpening and other MiraVision abilities very well, satisfied me with crystal clear and crisp video playing on FullHD IPS screen, far better than any TV.
Click to expand...
Click to collapse
WOW....really...reply to 2yr old thread.....mods will probably ban u for that....they very picky here.....
And your very wrong......
Discovered over a year ago...no thanks to anyone here on XDA.....that MPV player app has everything u can set via its .conf file. Sharpness, brightness,contrast, scalers, etc. I now use it on Android and PC. Even find it much better then MPC-HC i was using on PC.
tnx for your reply, i tried it but never works correctly bro, at least i couldnt make it to work like miravision. if you have a config file please upload it here and share.
Amir1975 said:
tnx for your reply, i tried it but never works correctly bro, at least i couldnt make it to work like miravision. if you have a config file please upload it here and share.
Click to expand...
Click to collapse
What u mean "never works correctly". What device and source file are you playing?
By default, it should work just fine to play pretty much anything. Works fine on my Pixel 3
If u fuss with the settings, and your devices does not support those settings, or the hardware is not strong enough, then things will have issues.
MPV has extensive documentation on how to use each syntax command and what scalers, and hw accel/decode modes support what etc.
The .conf would be unique to each device/platfourm etc.
The only things i have in my mpv.conf on my phone is:
sharpen=1.18
saturation=10
I also use ewa_lanczossharp for up and downscaling filter. I have noticed that using Interpolation makes the video look wonky, but that is very device specific experience, screen refresh rate and gpu power etc.
wow!!
thats great pal, really great. i used your config and then changed it, changed sharpness to 5! though uses more system resources but works great. now i can use my abandoned android box on tv too, it doesnt have battery so no worries about battery drainage.
also found some instructions on net, so complicated for me to read and use it all, but at least learned how to use cfg file.
tnx again
unfortunately, it doesnt work with my Amlogic s905 CPU of Android box. player runs well but commands like sharpen never get to work with any parameter. i tried it again on my Mate9 phone and worked well with KIRIN chip, so about Amlogic, it needs more development.

How to extract audio track from G7 High quality recording video -Roger Waters concert

Hi guys
I don't know if already exists some specific thread to talk about this.
Last week I recorded some live songs in Italy, in the concert Roger Waters kept inside Lucca wall.
I recorded in VIDEO MANUAL MODE, so I flag HDR10 video and 24bit HIFI audio mode.
Really good live recording, considering we are speaking about a mobile phone.
How to extract the audio track, beeing sure to extract the "raw" audio track and put it in some container that I can reproduce on my high quality player?
Thank you!
Ciao!
While I'm not sure if the artist would appreciate this, I suppose if you don't reproduce it / distribute it it'd be fine.
In either case, try using a program like Goldwave. It's a great, lightweight yet powerful, free audio editing software. You should be able to import the video file and it'll isolate the audio track from it in it's original form. From there you can save it using any codec you like including FLAC.
While I'm not sure if the artist would appreciate this, I suppose if you don't reproduce it / distribute it it'd be fine.
Click to expand...
Click to collapse
I'm not sure I've understood the purpose of your words....no reflex camera for photo purpose or any other object, nothing of nothing were allowed and in fact nobody had any professional camera....but the phone were allowed and THOUSANDS of mobile phones (like mine) were raised above our heads to capture the event.......
gannjunior said:
I'm not sure I've understood the purpose of your words....no reflex camera for photo purpose or any other object, nothing of nothing were allowed and in fact nobody had any professional camera....but the phone were allowed and THOUSANDS of mobile phones (like mine) were raised above our heads to capture the event.......
Click to expand...
Click to collapse
What I meant was, sometimes artists don't appreciate when you record their live performances and host it online or share it or sell it, etc. I suppose if you are only creating an audio track for your personal enjoyment, then it shouldn't be an issue. People are allowed in concert venues and whatnot with phones because you can't take them away. What if there's an emergency? How would you enforce removing phones from the entire audience? Just not plausible.
Anyways, it doesn't matter. Did you try Goldwave?

Question Camera software and HDR integration with other apps

So one thing that I understood from the launch live is that google has collabbed with Snapchat to bring full implementation of HDR within the app.
My biggest doubt is.. will it also fully integrate with all the other social network apps or not? I mean apps like TikTok, Instagram and most of all, Whatsapp..
What makes an android phone so bad for socials is that they totally cripple camera performance once you use a third party camera app. On the other end iPhone's do it perfectly. If only the Pixel filled this gap, it would be a no brainer choosing Android over iOS..!
I currently have a Pixel 3 XL and every time I use the camera to take photos in Whatsapp or videos in tiktok, its utterly ugly, it looks like the pic was taken from a Galaxy s4.
I'm still not so sure if we even have "true" HDR10 (or better, like Dolby Vision on Iphone 13Max) on the Pixel. Did anyone actually try to look at picture/videofootage at a HDR capable monitor/TV and did HDR kick in?
As far as I know, it's all some fake-ass SDR vivid-algorithm BS.
Morgrain said:
I'm still not so sure if we even have "true" HDR10 (or better, like Dolby Vision on Iphone 13Max) on the Pixel. Did anyone actually try to look at picture/videofootage at a HDR capable monitor/TV and did HDR kick in?
As far as I know, it's all some fake-ass SDR vivid-algorithm BS.
Click to expand...
Click to collapse
I used HDR Display Check
plasticarmyman said:
I used HDR Display Check
Click to expand...
Click to collapse
I wasn't talking about the Panel. All Pixels have HDR10 Display capabilities, I was talking about the camera.
Morgrain said:
I wasn't talking about the Panel. All Pixels have HDR10 Display capabilities, I was talking about the camera.
Click to expand...
Click to collapse
ah fair enough, i need more coffee i guess
Morgrain said:
I wasn't talking about the Panel. All Pixels have HDR10 Display capabilities, I was talking about the camera.
Click to expand...
Click to collapse
how would I potentially test this?
plasticarmyman said:
how would I potentially test this?
Click to expand...
Click to collapse
I guess we/you'd have to transfer footage of your phone (video/photos) to a HDR capable device (like an LG CX or something like that) and see if HDR kicks in. It's also possible to detect this with Windows tools like MediaInfo. If the video is recorded with HDR it will have a color space of BT. 2020 also know as REC.2020.
Even though it's kinda tricky to determine if it really is shot in 10bit. There is a differenec between color depth and color space, meaning a video can be shot in 8bit and can still output a HDR signal, even though it lacks all basic features that HDR should offer. This whole HDR story is a joke at this point, it's basically broken in Windows, the whole industry is split in several factions (HDR10, HDR10+, Dolby Vision...), there is almost no cross-compatibility and then you can't even trust the output of a file, as explained earlier.
It sucks, and it sucks hard. I - for example - tried to get Mass Effect: Andromeda working with Windows 11 (Dolby Vision) and stopped after about 9 hours of troubleshooting because of Black Screen problems, rainbow color issues, crashs, forced restarts because the Windows UI crashed/became invisible...
HDR is just a mess. It only works well if you put a streaming device directly into an HDR capable Television and use Apps like Disney+, Netflix, HBO MAX or something like that.
It's a shame, because footage shot in true HDR look simply stunning.
Morgrain said:
I guess we/you'd have to transfer footage of your phone (video/photos) to an HDR capable device (like an LG CX or something like that) and see if HDR kicks in. It's also possible to detect this with Windows tools like MediaInfo. If the video is recorded with HDR it will have a color space of BT. 2020 also know as REC.2020.
Even though it's kinda tricky to determine if it really is shot in 10bit. There is a differenec between color depth and color space, meaning a video can be shot in 8bit and can still output a HDR signal, even though it lacks all basic features that HDR should offer. This whole HDR story is a joke at this point, it's basically broken in Windows, the whole industry is split in several factions (HDR10, HDR10+, Dolby Vision...), there is almost no cross-compatibility and then you can't even trust the output of a file, as explained earlier.
It sucks, and it sucks hard. I - for example - tried to get Mass Effect: Andromeda working with Windows 11 (Dolby Vision) and stopped after about 9 hours of troubleshooting because of Black Screen problems, rainbow color issues, crashs, forced restarts because the Windows UI crashed/became invisible...
HDR is just a mess. It only works well if you put a streaming device directly into an HDR capable Television and use Apps like Disney+, Netflix, HBO MAX or something like that.
Click to expand...
Click to collapse
i'm getting ColorSpace YUV with video and pictures, even when using Open Camera with HDR enabled.
I haven't had any issues in Windows with my second Monitor that has HDR capabilities....but there are times when I turn it off because it doesn't look the best in some games.
Mass Effect Legendary Edition was having wash out issues on my pc until I turned it off

Categories

Resources