1337Misom / Panasonic_Image_app_reverse

Applications Created by reverse enginnering the Panasonics Cameras
GNU General Public License v3.0
1 stars 0 forks source link

Panasonic HC-V270 #1

Closed a-boukhicha closed 1 year ago

a-boukhicha commented 1 year ago

Hi, Thank you for this project. I'm trying to use PanLivePlayerControl with the HC-V270 camcorder model. The audio and the control is working, but I have an issue with the video.I get the following message: "Jpeg Decompression failed because : Not a JPEG file: starts with 0x02 0x03" I tried to dump the received buffer in a file. It starts with this:

00000000 02 03 02 02 02 03 03 03 03 04 07 04 04 04 04 04 |................| 00000010 08 06 06 05 07 0a 09 0a 0d 0a 09 0a 09 0b 0c 10 |................| 00000020 0d 0b 0c 0f 0c 09 0a 0e 13 0e 0f 10 11 12 12 12 |................| 00000030 0d 0d 13 15 13 11 15 10 11 12 11 01 03 03 03 04 |................| 00000040 04 04 08 04 04 08 11 0b 0a 0b 11 11 11 11 11 11 |................| 00000050 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 |................| 00000070 11 11 11 11 11 11 11 11 11 11 11 11 ff c0 00 11 |................| 00000080 08 01 68 02 80 03 01 21 00 02 11 01 03 11 01 ff |..h....!........| 00000090 c4 01 a2 00 00 01 05 01 01 01 01 01 01 00 00 00 |................| 000000a0 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b |................| 000000b0 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 01 |................| 000000c0 7d 01 02 03 00 04 11 05 12 21 31 41 06 13 51 61 |}........!1A..Qa| 000000d0 07 22 71 14 32 81 91 a1 08 23 42 b1 c1 15 52 d1 |."q.2....#B...R.| 000000e0 f0 24 33 62 72 82 09 0a 16 17 18 19 1a 25 26 27 |.$3br........%&'| 000000f0 28 29 2a 34 35 36 37 38 39 3a 43 44 45 46 47 48 |()456789:CDEFGH| 00000100 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 |IJSTUVWXYZcdefgh| 00000110 69 6a 73 74 75 76 77 78 79 7a 83 84 85 86 87 88 |ijstuvwxyz......|

Do have some advice to identify this video compression format?

Thanks

1337Misom commented 1 year ago

Could you try dumping the raw tcp packets using Wireshark and post the pcapng. This would help a lot.

1337Misom commented 1 year ago

FYI the beginning of a jpeg file must be 0xFF 0xD8.

1337Misom commented 1 year ago

This is a dump with my camera (HC-V380) using wireshark. As you can see bytes 9-10 are ff d8 meaning jpeg. The rest seems very similar to your's so i doubt that they used another format. They prbly. only changed the length of their header.

00000468 ff ff ff ff ff ff ff ff ff d8 ff db 00 84 00 05 ........ ........ 00000478 04 04 04 04 03 05 04 04 04 06 05 05 06 08 0d 08 ........ ........ 00000488 08 07 07 08 10 0b 0c 09 0d 13 10 14 18 12 10 12 ........ ........ 00000498 12 15 17 1d 19 15 16 1c 16 12 12 1a 23 1a 1c 1e ........ ....#... 000004A8 1f 21 21 21 19 19 24 27 24 20 26 1d 20 21 20 01 .!!!..$' $ &. ! . 000004B8 05 06 06 08 07 08 0f 08 08 0f 20 15 12 15 20 20 ........ .. ...
000004C8 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000004D8 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000004E8 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
000004F8 ff c4 01 a2 00 00 01 05 01 01 01 01 01 01 00 00 ........ ........ 00000508 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a ........ ........ 00000518 0b 10 00 02 01 03 03 02 04 03 05 05 04 04 00 00 ........ ........ 00000528 01 7d 01 02 03 00 04 11 05 12 21 31 41 06 13 51 .}...... ..!1A..Q 00000538 61 07 22 71 14 32 81 91 a1 08 23 42 b1 c1 15 52 a."q.2.. ..#B...R 00000548 d1 f0 24 33 62 72 82 09 0a 16 17 18 19 1a 25 26 ..$3br.. ......%& 00000558 27 28 29 2a 34 35 36 37 38 39 3a 43 44 45 46 47 '()4567 89:CDEFG 00000568 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 HIJSTUVW XYZcdefg 00000578 68 69 6a 73 74 75 76 77 78 79 7a 83 84 85 86 87 hijstuvw xyz..... 00000588 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 ........ ........ 00000598 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 ........ ........ 000005A8 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da ........ ........ 000005B8 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea f1 f2 f3 f4 f5 f6 ........ ........ 000005C8 f7 f8 f9 fa 01 00 03 01 01 01 01 01 01 01 01 01 ........ ........ 000005D8 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a ........ ........ 000005E8 0b 11 00 02 01 02 04 04 03 04 07 05 04 04 00 01 ........ ........ 000005F8 02 77 00 01 02 03 11 04 05 21 31 06 12 41 51 07 .w...... .!1..AQ. 00000608 61 71 13 22 32 81 08 14 42 91 a1 b1 c1 09 23 33 aq."2... B.....#3 00000618 52 f0 15 62 72 d1 0a 16 24 34 e1 25 f1 17 18 19 R..br... $4.%.... 00000628 1a 26 27 28 29 2a 35 36 37 38 39 3a 43 44 45 46 .&'()56 789:CDEF 00000638 47 48 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 GHIJSTUV WXYZcdef 00000648 67 68 69 6a 73 74 75 76 77 78 79 7a 82 83 84 85 ghijstuv wxyz.... 00000658 86 87 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 ........ ........ 00000668 a4 a5 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba ........ ........ 00000678 c2 c3 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 ........ ........ 00000688 d9 da e2 e3 e4 e5 e6 e7 e8 e9 ea f2 f3 f4 f5 f6 ........ ........

1337Misom commented 1 year ago

Try changing #define HEADER_OFFSET 56 in defines.h. If you found the value which worked for you please tell me so that i can implement this here.

1337Misom commented 1 year ago

If you want you can also try dumping buf while capturing the frames. Here is a modified version of PanLivePlayerControl: PanLivePlayerControl.txt

a-boukhicha commented 1 year ago

Thank you a lot for your help.

define HEADER_OFFSET 44

It work for HC-V270 model with the header offset 44

1337Misom commented 1 year ago

Ok will implement this now.

1337Misom commented 1 year ago

Could you try out if the changes i made work?

a-boukhicha commented 1 year ago

It ~work. I got the live steam working with an artefact in the end of the image with the following error message:

"Jpeg Decompression failed because : Premature end of JPEG file"

1337Misom commented 1 year ago

Try again but change MAXBUFLEN in defines.h to something like 1024*675

1337Misom commented 1 year ago

If prior doesn't work try connecting to the camera over an external hotspot. If you haven't already.

1337Misom commented 1 year ago

I now also have created a seperate library which can be found at : https://github.com/1337Misom/Panasonic_Lib

a-boukhicha commented 1 year ago

Thans a lot for your projetct. You did an amazing work! I will try it later. In fact, I'm only interessed by controlling zoom, il will get the video feed from the hdmi output for a better resolution. I create this issue just for giving a feed back.