Importing Old Files. - page 2 - General Discussion and Assistance - CHDK Forum

Importing Old Files.

  • 24 Replies
  • 11076 Views
*

Offline reyalp

  • ******
  • 14125
Re: Importing Old Files.
« Reply #10 on: 15 / November / 2010, 14:39:58 »
Advertisements
All you need to do is exactly reproduce the codec, resolution, frame rate, naming etc. found in camera files. If this doesn't work, then it means you haven't reproduced it exactly. There is no magic...

Recoding into the camera format is likely to be much easier than getting the camera to play some foreign file, even if it requires hacking some video encoding tools on the PC. There are plenty of open source tools which would offer reasonable starting points.
Don't forget what the H stands for.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: Importing Old Files.
« Reply #11 on: 15 / November / 2010, 14:43:52 »
Quote
reproduce the codec, resolution, frame rate, naming etc
I do that all I could with the sx210 with no results,
and you need to change all the bits for that in the thm file too,

 but  I think there are some checksum bytes that also handle that, and thats why it fails

*

Offline NSS

  • *
  • 26
Re: Importing Old Files.
« Reply #12 on: 15 / November / 2010, 15:30:09 »
Why do they make this like this?

Does anyone have a contact with Canon and can ask why?

Joe

*

Offline reyalp

  • ******
  • 14125
Re: Importing Old Files.
« Reply #13 on: 15 / November / 2010, 16:05:33 »
but  I think there are some checksum bytes that also handle that, and thats why it fails
That's the etc then ;)
My point is, from examining the in camera file, it must be possible to produce a compatible file with different content. Even if they were digitally signing them, we could get the keys from the firmware.
Why do they make this like this?
Two ideas:
1) The Canon firmware simply makes assumptions about the video because it makes the camera code simpler/easier. This seems most likely to me.
2) There is some regulatory difference between a camera and a general purpose media player, and Canon adds code to enforce this. ISTR this is why most P&S cameras are have a time limit for video recording, so they won't be classified as camcorders.
Quote
Does anyone have a contact with Canon and can ask why?
I don't think CHDK developers are in the habit of contacting Canon.

Don't forget what the H stands for.

*

Offline NSS

  • *
  • 26
Re: Importing Old Files.
« Reply #14 on: 15 / November / 2010, 16:22:15 »
he he he on the "H" part.

I would think they'd embrace the "H"  i know personally at least a dozen canon cameras that were chosen over other brands just because of the "H" capability inherent to them.

It WAS the deciding factor of what camera the person bought.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: Importing Old Files.
« Reply #15 on: 16 / November / 2010, 01:00:16 »
Quote
examining the in camera file, it must be possible to produce a compatible file with different content
you need to build 2 files, the mov and the thm(just a special jpg with most of the info in headers and exif part)

I think the thm header is where it checks the stuff, I tried looking at the bits that change with a 6,7,8 secs video and traing to match the changing bits.

About the video you need to match everthing, except the name of the encoder, (that you may be able to hack latter)

This is the closer I get was this:

Orginal file:


 General
      Format : MPEG-4
      Format profile : QuickTime
      Codec ID : qt  
      File size : 24.3 MiB
      Duration : 8s 600ms
      Overall bit rate : 23.7 Mbps
      Encoded date : UTC 2009-07-29 17:00:11
      Tagged date : UTC 2009-07-29 17:00:11
   Video #1
      ID : 1
      Format : AVC
      Format/Info : Advanced Video Codec
      Format profile : Baseline@L4.1
      Format settings, CABAC : No
      Format settings, ReFrames : 1 frame
      Codec ID : avc1
      Codec ID/Info : Advanced Video Coding
      Duration : 8s 600ms
      Bit rate mode : Variable
      Bit rate : 23.0 Mbps
      Width : 1 280 pixels
      Height : 720 pixels
      Display aspect ratio : 16:9
      Frame rate mode : Constant
      Frame rate : 30.000 fps
      Resolution : 24 bits
      Colorimetry : 4:2:0
      Scan type : Progressive
      Bits/(Pixel*Frame) : 0.831
      Stream size : 23.5 MiB (97%)
      Encoded date : UTC 2009-07-29 17:00:11
      Tagged date : UTC 2009-07-29 17:00:11
      colour_primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
      transfer_characteristics : BT.709-5, BT.1361
      matrix_coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
   Audio #2
      ID : 2
      Format : PCM
      Format settings, Endianness : Little
      Format settings, Sign : Signed
      Codec ID : sowt
      Duration : 8s 600ms
      Bit rate mode : Constant
      Bit rate : 705.6 Kbps
      Channel(s) : 1 channel
      Sampling rate : 44.1 KHz
      Resolution : 16 bits
      Stream size : 741 KiB (3%)
      Encoded date : UTC 2009-07-29 17:00:11
      Tagged date : UTC 2009-07-29 17:00:11


-> REENCODED WITH SUPER

General
      Format : MPEG-4
      Format profile : QuickTime
      Codec ID : qt  
      File size : 103 MiB
      Duration : 4mn 19s
      Overall bit rate : 3 326 Kbps
      Movie name : PureVideo_1080p.wmv
      Performer : created.with.SUPER(C).v2009.bld.36
      Encoded date : UTC 2009-07-26 13:52:26
      Tagged date : UTC 2009-07-26 13:52:26
      Writing application : SUPER(C)  
   Video #1
      ID : 1
      Format : AVC
      Format/Info : Advanced Video Codec
      Format profile : Baseline@L4.1
      Format settings, CABAC : No
      Format settings, ReFrames : 1 frame
      Codec ID : avc1
      Codec ID/Info : Advanced Video Coding
      Duration : 4mn 17s
      Bit rate mode : Variable
      Bit rate : 2 641 Kbps
      Width : 1 280 pixels
      Height : 720 pixels
      Display aspect ratio : 16:9
      Frame rate mode : Constant
      Frame rate : 30.000 fps
      Resolution : 24 bits
      Colorimetry : 4:2:0
      Scan type : Progressive
      Bits/(Pixel*Frame) : 0.096
      Stream size : 80.9 MiB (79%)
      Encoded date : UTC 2009-07-26 13:52:26
      Tagged date : UTC 2009-07-26 13:52:26
   Audio #2
      ID : 2
      Format : PCM
      Format settings, Endianness : Little
      Format settings, Sign : Signed
      Codec ID : sowt
      Duration : 4mn 19s
      Bit rate mode : Constant
      Bit rate : 705.6 Kbps
      Channel(s) : 1 channel
      Sampling rate : 44.1 KHz
      Resolution : 16 bits
      Stream size : 21.8 MiB (21%)
      Encoded date : UTC 2009-07-26 13:52:26
      Tagged date : UTC 2009-07-26 13:52:26
« Last Edit: 16 / November / 2010, 01:09:04 by asm1989 »

*

Offline reyalp

  • ******
  • 14125
Re: Importing Old Files.
« Reply #16 on: 16 / November / 2010, 01:25:58 »
I think the thm header is where it checks the stuff, I tried looking at the bits that change with a 6,7,8 secs video and traing to match the changing bits.
Can you use the wrong THM with in camera video ? Lets say you have movies 0001 and 0002, if you rename 0001.THM to 0002.THM, can you play movie 0002 in camera ?
Don't forget what the H stands for.

*

Offline NSS

  • *
  • 26
Re: Importing Old Files.
« Reply #17 on: 16 / November / 2010, 08:35:49 »
Nope tried that, and still nothing happens.  Or i should say It does not see the video..

Joe

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: Importing Old Files.
« Reply #18 on: 16 / November / 2010, 08:48:50 »
you need to change the header bytes of the thm to match video file size and some more things, and  then if
tge video was recorded with the cam it will play

*

Offline NSS

  • *
  • 26
Re: Importing Old Files.
« Reply #19 on: 16 / November / 2010, 09:12:35 »
But even that I have not been able to do.

I have confirmed that the AVI is indeed a MJPG as someone said.  so that all matches.

The ultimate would be,  make a video, using any typical video editor.  Take videos from the camera  edit,  cut  paste add words titles etc.  and again save them as an AVI  that is a MJPG.

Then load that back into the camera to be able to play it in the camera.  but then a totally new THM file is also needed too, and re naming them doesn't work.  etc.

strange yes?

 

Related Topics


SimplePortal © 2008-2014, SimplePortal