svenjacobs / chipcaco

Node.js command line tool and library for converting .264 files produced by some Chinese IP cameras
MIT License
11 stars 7 forks source link

New IPCam creates .265 files #4

Closed bobbydriver closed 4 years ago

bobbydriver commented 4 years ago

Got a new 5mp IPCam that is creaying .265 files. Unlike my old IPCam that created .264 files which chipcaco handled fine, these new .265 files seem even more proprietary. Handbrake doesn't even let me open them, let alone convert. Running chipcaco on them sits there a while and then says

<--- Last few GCs ---> a[3432:0000000000552C00] 89196 ms: Mark-sweep 2048.8 (2052.0) -> 2048.5 (205 2.5) MB, 2331.1 / 0.0 ms (+ 437.0 ms in 14 steps since start of marking, bigges t step 395.3 ms, walltime since start of marking 2786 ms) (average mu = 0.077, c urrent mu = 0.006[3432:0000000000552C00] 91794 ms: Mark-sweep 2049.2 (2052.5) -> 2048.9 (2052.7) MB, 2565.5 / 0.0 ms (+ 19.3 ms in 11 steps since start of m arking, biggest step 6.6 ms, walltime since start of marking 2598 ms) (average m u = 0.041, current mu = 0.005) a

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0000000140C1A09D]

Security context: 0x02c102c008d1 1: promiseRejectHandler(aka promiseRejectHandler) [0000028600282AF9] [intern al/process/promises.js:~74] [pc=00000265C8ACB697](this=0x02d812dc04b1 <undefined

,2,0x00f77096b229 ,0x0256df610121 ) 2: InternalFrame [pc: 0000000140B9C581] 3: EntryFrame [pc: 0000000140B9C16C] 4: ExitFra...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaS cript heap out of memory 1: 000000014000538F napi_wrap+114751 2: 000000013FFAFE26 v8::base::CPU::has_sse+66646 3: 000000013FFB0C26 v8::base::CPU::has_sse+70230 4: 00000001407C5B3E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00000001407ADC11 v8::SharedArrayBuffer::Externalize+833 6: 0000000140679E7C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436 7: 00000001406850B0 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312 8: 0000000140681BD4 v8::internal::Heap::PageFlagsAreConsistent+3204 9: 00000001406773D3 v8::internal::Heap::CollectGarbage+1283 10: 0000000140675A44 v8::internal::Heap::AddRetainedMap+2452 11: 0000000140696D8D v8::internal::Factory::NewFillerObject+61 12: 00000001403FCD5F v8::internal::interpreter::JumpTableTargetOffsets::iterator ::operator=+1295 13: 0000000140C1A09D v8::internal::SetupIsolateDelegate::SetupHeap+546637 14: 00000265C8ACB697

example .265 file attached (renamed as .txt to allow attachment) short.txt

svenjacobs commented 4 years ago

Hello @bobbydriver, thanks for the report.

I did not write the algorithm for video parsing myself. chipcaco is a port of the C application by Ralph Spitzner. Without his video encoding skills I probably would have never guessed the proprietary extensions myself. In order to support the proprietary .265 files you mentioned, I require the help of a video encoding specialist. Pull requests are very welcome :)

bobbydriver commented 4 years ago

Thanks Sven - it's something in your port I think as I went back and compiled Ralph's C code and that converts the .265 file as intended. Don't worry about fixing this for me, as I can use Ralph's C code now instead of Chipcaco. Thanks

svenjacobs commented 4 years ago

Okay, maybe indeed there is an error in the JavaScript code or Ralph's code was revised in the meantime /shrug. Anyway, I will close this issue then :)