Hello everyone.

I'm new here, and I hope to learn a lot here.

I have searched on libav.org <https://libav.org/> , but I have not found an answer.

I use FFmpeg/Libav, to encode the framebuffer of my android devices.
I do this to make some tutorials for using TWRP, an Android custum recovery.

My computer : Kubuntu 12.04 x64 | ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1

ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.9-4:0.8.9-0ubuntu0.12.04.1
libavutil    51. 22. 1 / 51. 22. 1
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0. 0

I asked for your help, for two things :

- Optimize the commands I used to encode the framebuffer of Nexus 4 and Nexus 7
- Find, if it exists, the command to encode the framebuffer of Nexus 5

Thank you in advance

To get the framebuffer from android devices, I do "adb pull /dev/graphics/fb0" (using Android SDK).

Then,

_*On Nexus 7, I do :*_

fb0_nexus_7(2012) -> https://app.box.com/s/qtug6l3lsktiaaacvtat

ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb565le -s 800x1280 -i "fb0_nexus_7(2012)" -f image2 -vcodec png "fb0_nexus_7(2012)_grand.png"


I think the command can be optimized, in view of the result in my Konsole :

ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [rawvideo @ 0x20309e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'fb0_nexus_7(2012)':
  Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: rawvideo, rgb565le, 800x1280, 25 tbr, 25 tbn, 25 tbc Incompatible pixel format 'rgb565le' for codec 'png', auto-selecting format 'rgb24'
[buffer @ 0x2030fc0] w:800 h:1280 pixfmt:rgb565le
[avsink @ 0x203aa20] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x203f380] w:800 h:1280 fmt:rgb565le -> w:800 h:1280 fmt:rgb24 flags:0x4
Output #0, image2, to 'fb0_nexus_7(2012)_grand.png':
  Metadata:
    encoder         : Lavf53.21.1
Stream #0.0: Video: png, rgb24, 800x1280, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=0.04 bitrate= -4.4kbits/s
video:30kB audio:0kB global headers:0kB muxing overhead -100.072311%


Then I get a good picture : http://ikslawok.free.fr/my_nexus_fr/nexus_5/twrp/pb_ffmpeg/fb0_nexus_7%282012%29_post.png



_*On Nexus 4, I do :*_

fb0_nexus_4 -> https://app.box.com/s/z6vko37ywj9vkn8vn0ug

ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 768x1280 -i "fb0_nexus_4" -f image2 -vcodec png "fb0_nexus_4_grand.png"

I think the command can be optimized too, in view of the result in my Konsole :

ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [rawvideo @ 0x188a9e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'fb0_nexus_4':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: rawvideo, rgba, 768x1280, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgba' for codec 'png', auto-selecting format 'rgb24'
[buffer @ 0x188afc0] w:768 h:1280 pixfmt:rgba
[avsink @ 0x1894a40] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x18993c0] w:768 h:1280 fmt:rgba -> w:768 h:1280 fmt:rgb24 flags:0x4
Output #0, image2, to 'b0_nexus_4_grand.png':
  Metadata:
    encoder         : Lavf53.21.1
Stream #0.0: Video: png, rgb24, 768x1280, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=0.04 bitrate= -4.4kbits/s
video:30kB audio:0kB global headers:0kB muxing overhead -100.071004%


Then I get a good picture : http://ikslawok.free.fr/my_nexus_fr/nexus_5/twrp/pb_ffmpeg/fb0_nexus_4_grand.png

_*
*__*I tried, without success on Nexus 5 :*_

fb0_nexus_5 -> https://app.box.com/s/7p2091hg9evyacxi52s3

ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 1080x1920 -i "fb0_nexus_5" -f image2 -vcodec png "fb0_nexus_5_grand.png"
The result in my Konsole :

ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Nov  9 2013 19:08:00 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. [rawvideo @ 0x20199e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'fb0_nexus_5':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: rawvideo, rgba, 1080x1920, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgba' for codec 'png', auto-selecting format 'rgb24'
[buffer @ 0x2019fc0] w:1080 h:1920 pixfmt:rgba
[avsink @ 0x2023a40] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out' [scale @ 0x20283c0] w:1080 h:1920 fmt:rgba -> w:1080 h:1920 fmt:rgb24 flags:0x4
Output #0, image2, to 'fb0_nexus_5_grand.png':
  Metadata:
    encoder         : Lavf53.21.1
Stream #0.0: Video: png, rgb24, 1080x1920, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=0.04 bitrate= -4.4kbits/s
video:50kB audio:0kB global headers:0kB muxing overhead -100.042899%


Then I get this "picture" : http://ikslawok.free.fr/my_nexus_fr/nexus_5/twrp/pb_ffmpeg/fb0_nexus_5_grand.png

I only know that Nexus 5 use pixel format "RGBX_8888", and resolution is 1080x1920

Starting the UI...Pixel format: 1080x1920 @ 32bpp
Pixel format: RGBX_8888
framebuffer: fd 4 (1080 x 1920)


I hope I have provided all the information, and respect the mailing lists rules, to get some help.

Thank you for your help.

Have a good day.
_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools

Reply via email to