fabled / bmd-tools

Tools to connect and manage Blackmagic Design video equipment with built-in H.264 encoder
MIT License
37 stars 14 forks source link

Display modes not supported #5

Closed martialgallorini closed 10 years ago

martialgallorini commented 10 years ago

Hi,

Thanks a lot for your work and this pretty nice peace of software ! I was able to use it during my tests with a camera in 1080i50 on a macmini under Debian Jessie. Everything was running smoothly.

unfortunately for the production i use another camera which is using 1080p30, 1080p25, or 720p60 and bmd-streamer doesn't seem to manage those format or am i wrong ?

Input Mode, 0xff (display mode 0x02) not supported

or

Input Mode, 0x8e (display mode 0x09) not supported

really too bad. Do you plan to make your soft support other formats ?

thanks a lot

fabled commented 10 years ago

It is basically matter of recovering the chip initialization values, and adding them to the source.

Steps to do it: 1) Record some video using the official drivers in desired video format 2) Stop drivers / reconnect to another computer with bmd-tools 3) Run bmd-streamer with "-v -v" and it'll dump the chip initialization values 4) Post the values here

martialgallorini commented 10 years ago

ok thanks ! i would be happy to contribute. i will have a look at it when i have access to the camera.

by the way do you know about another project called MXPTiny ?

This is a similar project but for h264 Pro recorder and windows only. Maybe you could grab some usefull information in there : https://github.com/baycom/MXPTiny

you can grab a binary here : http://www.atemuser.com/forums/atem-vision-mixers/live-web-streaming/mxptiny-free-h264-recorder-previewer-streamer

thanks again for your work

fabled commented 10 years ago

Yes, I am aware of MXPTiny. But it is useless for this project. MXPTiny uses the official Blackmagic drivers using the Windows API to do recording. Thus it is non-portable, and has no insight on the hardware. This project implements the USB driver natively using *nix compatible libraries.

martialgallorini commented 10 years ago

Ok, that's great. I'll try to give you more info about the input format selection thanks

martialgallorini commented 10 years ago

Following your suggestions here is what i grabbed (hope i did it right) for H.264 Pro Recorder. Hope this helps.

1080p25 input

[2/12 1edb:bd43]: device connected EP8: 8 bytes: 00 08 05 0e 01 ee a1 4f EP8: 67 bytes: 00 43 05 0e 02 3b 0b bc 05 0e 02 87 76 40 05 0e 02 d3 e0 c0 05 0e 03 20 4b 45 05 0e 03 6c b5 c2 05 0e 03 b9 20 44 06 01 03 c0 38 12 07 02 04 02 02 05 83 02 07 04 02 06 09 09 08 03 c0 39 3b 00 00 00 00 [2/12 1edb:bd43]: FX2Status: Encoding (7) [2/12 1edb:bd43]: Input Mode, 0x83 (display mode 0x07) not supported EP8: 9 bytes: 00 09 06 01 03 c1 8a 16 08 [2/12 1edb:bd43]: FX2Status: Preparing for Null output (8) EP8: 8 bytes: 00 08 05 03 00 05 73 78 EP8: 9 bytes: 00 09 06 01 03 d6 e6 8c 09 [2/12 1edb:bd43]: FX2Status: Null output (9) EP8: 9 bytes: 00 09 06 01 03 d8 bb 36 0a [2/12 1edb:bd43]: FX2Status: Preparing for Stop (10) EP8: 9 bytes: 00 09 06 01 03 d9 57 72 0b [2/12 1edb:bd43]: FX2Status: Stopped (11) EP8: 9 bytes: 00 09 06 01 03 d9 68 15 05 [2/12 1edb:bd43]: FX2Status: Idle (5)

Detected mode: 07 .fps_numerator = 25, .fps_denominator = 1, .fx2_fps = 0x3, .ain_offset = 0x0708 .r1000 = 0x0500, .r1404 = 0x0071, .r140a = 0x17ff, .r1430_l = 0xff .r147x = { 0x26, 0x7d, 0x56, 0x07 }, .r154x = { 0x0001, 0x07ff, 0x0abd, 0x0465, 0x00c3, 0x0015, 0x07ff, 0x0780, 0x0438, 0x0019 },

1080p30 input

[2/13 1edb:bd43]: device connected EP8: 8 bytes: 00 08 05 0e 0e eb d3 57 EP8: 55 bytes: 00 37 05 0e 0f 38 3d de 05 0e 0f 84 a8 41 05 0e 0f d1 12 c4 05 0e 10 1d 7d 3e 06 01 10 24 ab ab 07 02 04 02 02 05 8e 02 07 04 02 06 09 09 08 10 24 ac d4 00 00 00 00 [2/13 1edb:bd43]: FX2Status: Encoding (7) [2/13 1edb:bd43]: Input Mode, 0x8e (display mode 0x09) not supported EP8: 9 bytes: 00 09 06 01 10 25 e7 ff 08 [2/13 1edb:bd43]: FX2Status: Preparing for Null output (8) EP8: 8 bytes: 00 08 05 03 00 03 88 8a EP8: 9 bytes: 00 09 06 01 10 33 a3 6f 09 [2/13 1edb:bd43]: FX2Status: Null output (9) EP8: 9 bytes: 00 09 06 01 10 35 2a 06 0a [2/13 1edb:bd43]: FX2Status: Preparing for Stop (10) EP8: 9 bytes: 00 09 06 01 10 35 ac 3a 0b [2/13 1edb:bd43]: FX2Status: Stopped (11) EP8: 9 bytes: 00 09 06 01 10 35 bc de 05 [2/13 1edb:bd43]: FX2Status: Idle (5)

Detected mode: 09 .fps_numerator = 30, .fps_denominator = 1, .fx2_fps = 0x5, .ain_offset = 0x0a8c .r1000 = 0x0500, .r1404 = 0x0071, .r140a = 0x17ff, .r1430_l = 0xff .r147x = { 0x26, 0x7d, 0x56, 0x07 }, .r154x = { 0x0001, 0x07ff, 0x0897, 0x0465, 0x00c5, 0x0015, 0x07ff, 0x0780, 0x0438, 0x001e },

720p30 input

[2/14 1edb:bd43]: device connected EP8: 8 bytes: 00 08 05 0e 16 c6 cf d2 EP8: 43 bytes: 00 2b 05 0e 17 13 3a 40 05 0e 17 5f a4 c5 06 01 17 9c be 00 07 02 04 02 02 05 88 02 07 04 02 06 09 09 08 17 9c bf 2a 00 00 00 00 [2/14 1edb:bd43]: FX2Status: Encoding (7) [2/14 1edb:bd43]: Input Mode, 0x88 (display mode 0x12) not supported EP8: 9 bytes: 00 09 06 01 17 9d 7e 58 08 [2/14 1edb:bd43]: FX2Status: Preparing for Null output (8) EP8: 8 bytes: 00 08 05 03 00 02 23 39 EP8: 9 bytes: 00 09 06 01 17 a9 b3 2f 09 [2/14 1edb:bd43]: FX2Status: Null output (9) EP8: 9 bytes: 00 09 06 01 17 aa 76 68 0a [2/14 1edb:bd43]: FX2Status: Preparing for Stop (10) EP8: 9 bytes: 00 09 06 01 17 aa b7 8c 0b [2/14 1edb:bd43]: FX2Status: Stopped (11) EP8: 9 bytes: 00 09 06 01 17 aa c8 30 05 [2/14 1edb:bd43]: FX2Status: Idle (5)

Detected mode: 12 .fps_numerator = 60, .fps_denominator = 1, .fx2_fps = 0x8, .ain_offset = 0x02ee .r1000 = 0x0500, .r1404 = 0x0071, .r140a = 0x17ff, .r1430_l = 0xff .r147x = { 0x10, 0x70, 0x70, 0x10 }, .r154x = { 0x0001, 0x07ff, 0x0671, 0x02ee, 0x010b, 0x001a, 0x07ff, 0x0500, 0x02d0, 0x003c },

fabled commented 10 years ago

Looks like you did it correctly, but unfortunately I had a bug in the dumping code. Could you pull the latest changes, and retry? Sorry for the trouble.

martialgallorini commented 10 years ago

oh too bad... i will try to do it again in the following days when i have access to the device.

martialgallorini commented 10 years ago

ok, faster than expected ;) updated my previous post

martialgallorini commented 10 years ago

Trying 1080p25... doesn't seem to work

when launching bmd-streamer it keeps complaining : [2/11 1edb:bd43]: Input Mode, 0xff (display mode 0x02) not supported

launched with -v -v and it says :

[2/10 1edb:bd43]: device connected [2/10 1edb:bd43]: firmware downloaded needed [2/10 1edb:bd43]: firmware downloaded succesfully [2/10 1edb:bd43]: closing device [2/11 1edb:bd43]: device connected EP8: 8 bytes: 00 08 05 0e 00 17 2e 3a EP8: 64 bytes: 00 40 02 04 02 06 01 00 17 2e 9f 03 02 05 83 02 07 04 02 06 09 06 01 00 17 2f e9 04 06 01 00 17 35 7a 05 06 01 00 20 03 d1 05 02 04 02 02 05 83 02 07 04 02 06 09 09 08 00 20 04 fb 00 00 00 00 [2/11 1edb:bd43]: FX2Status: Programming H56 (3) [2/11 1edb:bd43]: Display Mode: 1080p 25 [2/11 1edb:bd43]: FX2Status: Booting H56 (4) [2/11 1edb:bd43]: FX2Status: Idle (5) [2/11 1edb:bd43]: Configuring and starting encoder [2/11 1edb:bd43]: FX2Status: Idle (5) [2/11 1edb:bd43]: Configuring and starting encoder [2/11 1edb:bd43]: Display Mode: 1080p 25 EP8: 9 bytes: 00 09 06 01 00 2c a6 ff 0b [2/11 1edb:bd43]: FX2Status: Stopped (11) EP8: 5 bytes: 00 05 02 04 02 EP8: 9 bytes: 00 09 06 01 00 4d d5 45 03 [2/11 1edb:bd43]: FX2Status: Programming H56 (3) EP8: 8 bytes: 00 08 02 07 04 02 06 09 EP8: 9 bytes: 00 09 06 01 00 52 40 16 04 [2/11 1edb:bd43]: FX2Status: Booting H56 (4) EP8: 9 bytes: 00 09 06 01 00 52 45 bf 05 [2/11 1edb:bd43]: FX2Status: Idle (5) [2/11 1edb:bd43]: Configuring and starting encoder EP8: 9 bytes: 00 09 06 01 00 5e fd 36 0b [2/11 1edb:bd43]: FX2Status: Stopped (11) EP8: 5 bytes: 00 05 02 05 83 [2/11 1edb:bd43]: Display Mode: 1080p 25 EP8: 9 bytes: 00 09 06 01 00 60 a1 ac 06 [2/11 1edb:bd43]: FX2Status: Preparing for Encode (6) G@?????b?c???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????GA?&??? HDMV???????d@?!??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????G@????? ?2[?????? 0???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????G ?H~0????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????EP8: 9 bytes: 00 09 06 01 00 63 12 a2 07 [2/11 1edb:bd43]: FX2Status: Encoding (7) G ? ?~M????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????G@?????b?c???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????G ??~i????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????GA?&??? HDMV???????d@?!??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????EP8: 20 bytes: 00 14 11 0d 00 63 af 2c ff 00 00 01 00 06 00 09 00 00 00 00 [2/11 1edb:bd43]: H56 Error. Restarting device. EP8: 5 bytes: 00 05 02 04 02 EP8: 9 bytes: 00 09 06 01 00 74 79 e8 03 [2/11 1edb:bd43]: FX2Status: Programming H56 (3) EP8: 8 bytes: 00 08 02 07 04 02 06 09 ^CEP8: 9 bytes: 00 09 06 01 00 86 27 f3 04 [2/11 1edb:bd43]: FX2Status: Booting H56 (4)