Change bitrate for recorded videos? (reduce filesize) - One (M7) Q&A, Help & Troubleshooting

Hello good people of XDA
I was using Viper 5.8.0 before (sense 5.5) and it had a modded camera which let me define bitrate for videofiles. I usually set it to 4-8mbps because I only shoot family vids that are to be shared with other members abroad.
But with move to Sense 6, there is no customized camera. I was wondering if it is possible to do? Are the values hardcoded or can be changed from within a file somewhere?
If not, then any app you know of that can reduce 1080 videos to a manageable size? (its ok even if it downsizes to 720p).

Related

[Q] MediaCoder preset for encoding videos

Hi all
I want to know if someone has a working preset for encoding videos in mediacoder for galaxy s? I have looked over the threads on mediacoders forums but there seems to be only one working preset and that one is just copied settings from a 720p recording from the camera (which is not designed for viewing on the SGS because the resolution doesn't match the sgs's screen for starters). I need something that gives the best picture and sound for the least amount of space.

1080P Video Recording!!!!!!

Alright don't chew my arse if I am not right, but I think I just might be...
Gspot image attached of a 10sec. sample video using the below settings and attached media_profiles.xml
What I have done is edited the build.prop with a new property using Prop Editor:
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
So property is:
Code:
ro.media.camcorder.1080p
Value:
Code:
mp4,h264,60,24000000,aac,128000,44100,2
I also made changes to the Media_profiles.xml file and have attached that file in zip format.
To install:
Unzip the file
using root explorer go to /System/etc
Rename media_profiles.xml to media_profiles.xml.bak
copy the new media_profiles.xml file to /System/etc
Change permissions to rw-r--r--
Reboot
Open up the camcorder
Goto Settings 1080P Shows HD+ on the screen when recording..
enjoy 1080P video recording...
FYI.. In 720p mode the same 10sec video had a file size of 14MB
In 1080 mode same subject matter video 10 sec. with a file size of 21MB.
Another build.prop edit:
ro.camcorder.videoModes=true
Default is false
This enables Video mode, which includes Video message, Normal, Slow motion, and Fast motion.
Hope this helps!!
The BIG question is, why do you want 1080P recordings? The optics can not really even support 720P and 1080P will not make it look better, probably even worse and the file will be twice as big. Playback of 1080P I can understand.
Just my 0.02
Cheers
nice post, but is the 1080p recording still only 24fps?
Also, to solve the spacing problem in the post, put the lines inside the Code tags
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
pederb said:
The BIG question is, why do you want 1080P recordings? The optics can not really even support 720P and 1080P will not make it look better, probably even worse and the file will be twice as big. Playback of 1080P I can understand.
Just my 0.02
Cheers
Click to expand...
Click to collapse
Being able to extract any frame and have it 2mp is pretty cool to me. It the highest resolution, if you're playing it on a nice full HD screen, it will fill every pixel. It does look better in 1080p
andy2na said:
nice post, but is the 1080p recording still only 24fps?
Also, to solve the spacing problem in the post, put the lines inside the Code tags
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
Click to expand...
Click to collapse
I'm actually glad that it's 24fps. If you think, any professional movie on a dvd only plays 24fps. When it gets up to 30fps, it plays faster and looks more like a home video, so I like the 24fps look better.
Thanks for this will try it out tonight!
Sent from my MB860 using XDA Premium App
Not work on Stock rom! At least for me...
It looks better but our software is not optimized to record 1080p yet. So videos are slightly choppy.
Sent from my MB860 using XDA Premium App
Works great on CherryBlur!
Still a little choppy during recording, but the output file is definitely 1080p at 24fps.
Playback is very smooth.
Nice find on the xml file.
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
agurzhiy said:
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
Click to expand...
Click to collapse
same as me
A agurzhiy and yusmiza... Did you change the permissions of the media_profiles.xml to rw-r--r-- and reboot after copying the file over and making the changes in the build prop?
does the front camera work? noticed in you xml you put the high setting for the front cam at 720P
Seems to work for me. At least 720 and 1080 the file sizes were different anyway (for the same time frame) Nothing to really test it on here at work.
edit: When taking pictures the 720 and 1080 file sizes are different also...though both say 3.8 mp still
i just edited myself!
Please tell me the version of your FW and is it a stock camera?
p.s. i do not care 1080, i need SloMo, but my buildProp has on default ro.camcorder.videoModes=true
Default was true for me
running Ken's GB beta 4 and yes stock camera
i'll try to copy your file. I found slomo and fastmo
but both of them, while playing are just usual video. Nothing faster, nothing slower, despite the fact that camera on slomo each second counts as 3 seconds (so it shows after 3 seconds that 9 seconds were recorded)
y2... Thanks for catching that!! I didn't realize I didn't put the front camera setting back to norm.. My front Camera doesn't work due to a swimming pool incident with my Atrix, but it will usually come up with a black screen.. now I get a FC.. I will make the appropriate changes and update the file.. Let me know if the new file lets the front cam work on yours...
agurzhiy said:
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
Click to expand...
Click to collapse
the optics don't matter, it's the sensor. the sensor is also not able to capture constant data at the full 5 MP (video); it can take pictures at that level but it can't handle video at that level. that's why whenever you record a video on you digital camera, it's at a much smaller resolution, or why when you do burst-mode on some cameras, the maximum size is smaller than the regular MP rating.
agurzhiy said:
i'll try to copy your file. I found slomo and fastmo
but both of them, while playing are just usual video. Nothing faster, nothing slower, despite the fact that camera on slomo each second counts as 3 seconds (so it shows after 3 seconds that 9 seconds were recorded)
Click to expand...
Click to collapse
ag.. Mine records like you said counts as 3, but will play back slow. I do have the app HERE loaded as well...

Camera app with 640*480 recording?

Ive noticed that the Ones camera app doesnt have a resolution lower than 1280*720 (720p) but I need to go as low as 320*240 for files size reasons. I often send video clips through whatsapp and the file size limit for transfers on there is 12mb but a scant 10 seconds of 720p is over 15. Ive had a searched around for an alternative camera and also a converter app but havent had any luck.
Can anyone recommend a good camera or converter app that will get me as low as 320*240 resolution?
Thanks
I used to use lgcamera from the market on my Sensation. Bunch of different resolutions to choose from.
Sent from my HTC One using Tapatalk 2
Thanks gustav, that app is perfect! It has tons of settings and adjustments for pics and vids.

Youtube resolution

Hi guys, I'm sorry if this has been discussed in another thread, but I've been digging into this for about 2 hours now, and found nothing. I have a backup galaxy s advance, that I recently flashed with a cm 11 rom, and I'm not sure, but I'm under the impression that before with 4.1.2 stock, I could watch 480p videos on youtube, now the maximum resolution is 360p, and it's kinda pixelated. My question is....stock, is 360p the maximum resolution supported ? Also, is there any mod/fix whatever that can force youtube to go to 480p ? From my limited knowledge a 800x480 display should be 480p compatible, but please correct me if I'm wrong I've tried to modify the pixel density from build prop, but with no effect. Any help would be much appreciated
somewhere on the internet I read that Youtube does this restriction when you use HDMI connection to the screen.
I used to have very nice HD streaming for long time but after one of the app updates it is restricted, nothing else changed. I tried even to compare how it looks on my laptop. same video is showing full hd on laptop while on android it shows 360p max.
so by the experience I have it is definitely youtube app which restricts the options!!!!!!!
On stock (and stock based roms) you can watch 480p videos.
On KitKat you can't.
But you could try alternative apps like this one for 720p videos.
ALSO you can use this module in XPOSED called YOURTUBE you can change the resolution of the playing video ( i have not used it myself but the dev has mensioned it in module info)
Thanks for the suggestions guys

[GUIDE]Record better videos+low light fps workaround+increase bitrate on the Redmi 2

So you want to record more natural looking videos on your Redmi 2? Maybe so you get more headroom when video editing? Or does recording in low light look too choppy? Then this might be for you!
After reading Redmi 2 on XDA and checking out FreeDCam, I can say that it’s the best looking video recorder I’ve tried on my phone.
Of course you want to see some samples (Sorry if the samples aren’t that great but there weren’t any colourful flowers around. )
YouTube samples
Outside and sunny...
CM Snap
FreeDCam
Outside...
CyanogenMod Snap
FreeDCam
FreeDCam with some adjustments
Low light with workaround
CyanogenMod Snap
FreeDCam
This camera app will give you more manual controls than any other video recording app plus, you can even change them while recording! Here’s some specific settings that you should change…
Exposure: Adjust so nothing looks too dark or too bright (find the balance).
Contrast: Change to 0 (or something slightly higher). I guess the problem with other apps is that the contrast is set too high and makes shadows look too dark and highlights look too bright.
Sharpness: Set to 0 as the video will look more soft and natural. Sharpening after recording (i.e. using a program) seems to look better…
Denoise: Turn off as colours get washed out and we start to lose some of that detail. (Or keep it on if you really hate noise.)
There’s some issues regarding focussing, manual focus doesn’t seem to work. If you want to set your focus to infinity, after launching the app, set the focus to auto, tap to focus once and then set your focus to infinity.
Ok great now I can record better videos! But at night the video looks blurry, choppy…
The reason why this happens is so that more light can enter the camera for longer, causing the video to look blurry, choppy and noisy. Here is a workaround where you can now record at a constant 30fps even in the dark! This idea came from some OnePlus thread where you could rename a front camera video binary file to the rear camera video binary as the front camera records at a constant 30fps. Be aware there is a trade-off and it is that dark places won’t be as bright at 30fps compared to 15fps!
If you don’t do this, then 15fps could actually be helpful as you can see more with less light! FreeDCam will help a lot with a low light situation with the increased exposure and decreased contrast. You’ll get more noise though. You can either activate the denoiser and/or run a denoiser plugin after you have recorded your video.
(Note: I’m not responsible for anything that might happen on your phone. I’ve only tested this on cm13 so the files might be different across different roms.)
Note that this mod will affect all apps that record video and dark places will look very dark.
Go to /vendor/lib/
Copy the name libchromatix_ov8865_sunny_default_video.so and then back it up (rename it to something like libchromatix_ov8865_sunny_default_video.so1
Create a copy of libchromatix_ov2680_5987fhq_default_video.so and rename it to libchromatix_ov8865_sunny_default_video.so
To revert change libchromatix_ov8865_sunny_default_video.so1 back to libchromatix_ov8865_sunny_default_video.so
Increase bitrate…
You can increase the video bitrate with FreeDCam (or any other video recording app if you mess with media_profile.xml) so you can record all that fine detail (including especially the noise). Here, we’ll change the bitrate to 40Mbps.
Just head to /system/etc/media_profiles.xml and look for: (tip: near the end)
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="20000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1088"
minFrameRate="15" maxFrameRate="30"
maxHFRFrameWidth="1920" maxHFRFrameHeight="1080"
maxHFRMode="120" />
Click to expand...
Click to collapse
Change maxBitRate to 40000000 and save. This edit only tells the phone the maximum bitrate it can encode at.
In FreeDCam, make sure you’re in 1080p! Change video bitrate to 40000000 and audio bitrate 320000. Be aware that the video size will now be around 300MB/min so make sure you have plenty of storage. (I tried using an USB OTG Drive. It works! But the USB device interfered with the microphones and created noise. )
So yeah. The difference might not be that noticeable to some, but to me, it looks a lot better to me. While recording, the viewfinder might lag a bit but in the actual recorded video, it’ll be fine. I might put more samples up or maybe you try this out and get some samples for me! Hopefully there are some people here who are interested in video. :good:
My first thread
Awesome!! Works flawlessly with this app!
why dont you just give the edited file
gamernayeem said:
why dont you just give the edited file
Click to expand...
Click to collapse
Of what?
magmar452 said:
Of what?
Click to expand...
Click to collapse
media_profiles.xml
gamernayeem said:
media_profiles.xml
Click to expand...
Click to collapse
I'll make a flashable zip for both the mods
magmar452 said:
I'll make a flashable zip for both the mods
Click to expand...
Click to collapse
thanks
If you can you post guide for better picture quality in general,I am overwhelmed by amount of options it provides can you post screenshots of balanced set of options to choose specifically for our device. Thanks for this thread anyway .
rohitsonone said:
If you can you post guide for better picture quality in general,I am overwhelmed by amount of options it provides can you post screenshots of balanced set of options to choose specifically for our device. Thanks for this thread anyway .
Click to expand...
Click to collapse
Sorry, this is a video specific guide. I'm making some flashable zips and I'll put some screenshots when I have time. Perhaps @shanx_verma can make a picture guide? If I have lots of time then maybe I'll make one.
Prioritizing FPS Over Exposure
Hi magmar452.
Thank you very much for this. This is some juicy detail you uncovered here!
magmar452 said:
Go to /vendor/lib/
Copy the name libchromatix_ov8865_sunny_default_video.so and then back it up (rename it to something like libchromatix_ov8865_sunny_default_video.so1
Create a copy of libchromatix_ov2680_5987fhq_default_video.so and rename it to libchromatix_ov8865_sunny_default_video.so
To revert change libchromatix_ov8865_sunny_default_video.so1 back to libchromatix_ov8865_sunny_default_video.so
Click to expand...
Click to collapse
My front-facing camera also goes into "Slideshow Mode" in low light, so following your exact steps above didn't work for me. However, I fiddled a bit and found what does work for me:
Trade exposure for fps priority:
1. Go to /vender/lib/
2. Rename "libchromatix_ov8865_sunny_default_video.so" to "libchromatix_ov8865_sunny_default_video.so1"
3. Create a copy of "libchromatix_ov8865_sunny_hfr_60fps.so" and rename it to "libchromatix_ov8865_sunny_default_video.so"
EDIT1: Getting decent night time results using "libchromatix_ov8865_q8v18a_default_video.so" as the source. It actually allows me proper exposure/fps control. "libchromatix_ov8865_q8v18a_hfr_60fps.so" handles similarly, but prioritizes fps.
EDIT2: Various vendor libs from github/TheMuppets/xiaomi/cancro also work. However, results are all over the place.
This isn't a proper fix, but it's really good to be Slideshow-free.
Samples:
ov8865_sunny (default): youtu.be/pS544qW35ZM
ov8865_q8v18a: youtu.be/PcCC95EIceg
imx226_video_hdr: youtu.be/E79zcYlq7pU
pexxie said:
Hi magmar452.
Thank you very much for this. This is some juicy detail you uncovered here!
My front-facing camera also goes into "Slideshow Mode" in low light, so following your exact steps above didn't work for me. However, I fiddled a bit and found what does work for me:
1. Go to /vender/lib/
2. Rename "libchromatix_ov8865_sunny_default_video.so" to "libchromatix_ov8865_sunny_default_video.so.org"
3. Create a copy of "libchromatix_ov8865_sunny_hfr_60fps.so" and rename it to "libchromatix_ov8865_sunny_default_video.so"
EDIT: I'm getting decent night time results using "libchromatix_ov8865_q8v18a_default_video.so" as the source. It actually allows me proper exposure/fps control.
Not sure why it works, but it works. Maybe it's coincidence. I still get the occasional brief dips to 20-odd fps, but they're too infrequent to be a nuisance. It's not a proper fix, but it's really good to be Slideshow-free.
Short Samples: Original & Hack Job
Original: youtu.be/3VHuGj33vp4
Hack Job: youtu.be/oEH2E7t_5EI
P.S. I'm running CyanogenMod Nightly 6.0.1 (wt88047) on my Redmi 2 Pro (2014817)
Click to expand...
Click to collapse
I think most roms have switch to the lollipop canera blobs and that's why the front camera is choppy now to fix the 'dark video' problem. I've switched to Resurrection Remix, there are some few changes that had to be made to the instructions (getting the old front camera file) so I can still get 30fps.I'll check it out renaming to the 60fps file. Currently I'm quite busy
magmar452 said:
So you want to record more natural looking videos on your Redmi 2? Maybe so you get more headroom when video editing? Or does recording in low light look too choppy? Then this might be for you!
Afterreading Redmi 2 on XDA and checking out FreeDCam, I can say that it’s the best looking video recorder I’ve tried on my phone.
Of course you want to see some samples (Sorry if the samples aren’t that great but there weren’t any colourful flowers around. )
YouTube samples
Outside and sunny...
CM Snap
FreeDCam
Outside...
CyanogenMod Snap
FreeDCam
FreeDCam with some adjustments
Low light with workaround
CyanogenMod Snap
FreeDCam
This camera app will give you more manual controls than any other video recording app plus, you can even change them while recording! Here’s some specific settings that you should change…
Exposure: Adjust so nothing looks too dark or too bright (find the balance).
Contrast: Change to 0 (or something slightly higher). I guess the problem with other apps is that the contrast is set too high and makes shadows look too dark and highlights look too bright.
Sharpness: Set to 0 as the video will look more soft and natural. Sharpening after recording (i.e. using a program) seems to look better…
Denoise: Turn off as colours get washed out and we start to lose some of that detail. (Or keep it on if you really hate noise.)
There’s some issues regarding focussing, manual focus doesn’t seem to work. If you want to set your focus to infinity, after launching the app, set the focus to auto, tap to focus once and then set your focus to infinity.
Ok great now I can record better videos! But at night the video looks blurry, choppy…
The reason why this happens is so that more light can enter the camera for longer, causing the video to look blurry, choppy and noisy. Here is a workaround where you can now record at a constant 30fps even in the dark! This idea came from some OnePlus thread where you could rename a front camera video binary file to the rear camera video binary as the front camera records at a constant 30fps. Be aware there is a trade-off and it is that dark places won’t be as bright at 30fps compared to 15fps!
If you don’t do this, then 15fps could actually be helpful as you can see more with less light! FreeDCam will help a lot with a low light situation with the increased exposure and decreased contrast. You’ll get more noise though. You can either activate the denoiser and/or run a denoiser plugin after you have recorded your video.
(Note: I’m not responsible for anything that might happen on your phone. I’ve only tested this on cm13 so the files might be different across different roms.)
Note that this mod will affect all apps that record video and dark places will look very dark.
Go to /vendor/lib/
Copy the name libchromatix_ov8865_sunny_default_video.so and then back it up (rename it to something like libchromatix_ov8865_sunny_default_video.so1
Create a copy of libchromatix_ov2680_5987fhq_default_video.so and rename it to libchromatix_ov8865_sunny_default_video.so
To revert change libchromatix_ov8865_sunny_default_video.so1 back to libchromatix_ov8865_sunny_default_video.so
Increase bitrate…
You can increase the video bitrate with FreeDCam (or any other video recording app if you mess with media_profile.xml) so you can record all that fine detail (including especially the noise). Here, we’ll change the bitrate to 40Mbps.
Just head to /system/etc/media_profiles.xml and look for: (tip: near the end)
Change maxBitRate to 40000000 and save. This edit only tells the phone the maximum bitrate it can encode at.
In FreeDCam, make sure you’re in 1080p! Change video bitrate to 40000000 and audio bitrate 320000. Be aware that the video size will now be around 300MB/min so make sure you have plenty of storage. (I tried using an USB OTG Drive. It works! But the USB device interfered with the microphones and created noise. )
So yeah. The difference might not be that noticeable to some, but to me, it looks a lot better to me. While recording, the viewfinder might lag a bit but in the actual recorded video, it’ll be fine. I might put more samples up or maybe you try this out and get some samples for me! Hopefully there are some people here who are interested in video. :good:
My first thread
Click to expand...
Click to collapse
Can you make a guide for MI 5? I'm trying to record guitar videos but it's choppy
luigi0824 said:
Can you make a guide for MI 5? I'm trying to record guitar videos but it's choppy
Click to expand...
Click to collapse
Sorry I don't have an Mi 5. See if lowering resolution helps or not having enough light causes this issue.
flashable zip is there?
It will be easy then

Categories

Resources