<p>H264 allows for much better compression, but image acquisition should be as good as feasible, so cameras will capture at a high bitrate, say, 10+ Mbps, depends on resolution and framerate. Nothing unusual about that.</p>

<p>The full bouquet of H.264 compression methods i.e. lookahead for rate-control, better motion estimation ..etc is usually applied when producing a file for web playback. You can use ffmpeg with libx264 to achieve that.</p>

CC BY-SA 4.0
2018-07-21T08:46:09.100Z
Ok. But I had before a cam with mp2 compression. The file size was IDENTICAL. So, there must be something wrong about this camera if its mp4 compressor produces same results as the old camera.
IceCold
CC BY-SA 4.0
2018-07-21T10:16:35.773Z
Camera compressors aren't trying to squeeze out small files. They have a set of fixed target profiles. Check the camera menu and manual for lower bitrates.
Gyan
CC BY-SA 4.0
2018-07-21T10:18:17.037Z
@gyan-this is a cheap dashboard camera advertised as h264. there are no settings related to video!
IceCold
CC BY-SA 4.0
2018-07-21T10:19:42.433Z
Then you'll have to recompress after recording.
Gyan
CC BY-SA 4.0
2018-07-21T10:22:38.937Z
My problem is that this camera will kill the SD card after a few months only because of the intense writing. I replaced my old mp2 camera with this one hoping to get less I/O activity.
IceCold
CC BY-SA 4.0
2018-07-31T07:11:49.800Z
The producer of this camera finally answered: "The compression ratio system setting of the H.264 AVC codec is 102:1 (This setting cannot be set manually)"
IceCold
CC BY-SA 4.0
2018-07-21T05:46:24.137Z
2018-07-21T05:46:24.137Z
Gyan
<p>I just purchased a cheap dashboard video-camera that is advertised to have a H.264 codec inside. However, after the first video test I have seen that a 43sec movie takes 123MB! How is this possible. I thought that H.264 has a MUCH better compression!</p>

<p>Question:<br>
1. Does my video camera really incorporate a true H.264 codec or is it a fake?<br>
2. If it is a true H264 why is the compression ratio so poor?  </p>

<hr>

<p>UPDATE:<br>
I contacted the producer and they said that "The compression ratio system setting of the H.264 AVC codec is 102:1. This setting cannot be set manually"</p>

<hr>

<pre><code>000000 File Type (20 bytes)
000000  Header (8 bytes)
000000   Size:                                 20 (0x00000014)
000004   Name:                                 ftyp
000008  MajorBrand:                            qt  
00000C  MajorBrandVersion:                     512 (0x00000200)
000010  CompatibleBrand:                       qt  
000014 ----------------------------
000014 ---   MPEG-4, accepted   ---
000014 ----------------------------
000014 Data (3774264 bytes)
000014  Header (8 bytes)
000014   Size:                                 3774264 (0x00399738)
000018   Name:                                 mdat
00001C  Data:                                  (3774256 bytes)
39974C File header (2128 bytes)
39974C  Header (8 bytes)
39974C   Size:                                 2128 (0x00000850)
399750   Name:                                 moov
399754  Movie header (108 bytes)
399754   Header (8 bytes)
399754    Size:                                108 (0x0000006C)
399758    Name:                                mvhd
39975C   Version:                              0 (0x00)
39975D   Flags:                                0 (0x000000)
399760   Creation time:                        3118707150 (0xB9E3B1CE)
399764   Modification time:                    3118707150 (0xB9E3B1CE)
399768   Time scale:                           1000 (0x000003E8)
39976C   Duration:                             2221 (0x000008AD)
399770   Preferred rate:                       65536 (0x00010000)
399774   Preferred volume:                     256 (0x0100)
399776   Reserved:                             (10 bytes)
399780   Matrix structure (36 bytes)
399780    a (width scale):                     1.000
399784    b (width rotate):                    0.000
399788    u (width angle):                     0.000
39978C    c (height rotate):                   0.000
399790    d (height scale):                    1.000
399794    v (height angle):                    0.000
399798    x (position left):                   0.000
39979C    y (position top):                    0.000
3997A0    w (divider):                         1.000
3997A4   Preview time:                         0 (0x00000000)
3997A8   Preview duration:                     0 (0x00000000)
3997AC   Poster time:                          0 (0x00000000)
3997B0   Selection time:                       0 (0x00000000)
3997B4   Selection duration:                   0 (0x00000000)
3997B8   Current time:                         0 (0x00000000)
3997BC   Next track ID:                        3 (0x00000003)
3997C0  Track (1547 bytes)
3997C0   Header (8 bytes)
3997C0    Size:                                1547 (0x0000060B)
3997C4    Name:                                trak
3997C8   Track Header (92 bytes)
3997C8    Header (8 bytes)
3997C8     Size:                               92 (0x0000005C)
3997CC     Name:                               tkhd
3997D0    Version:                             0 (0x00)
3997D1    Flags:                               15 (0x00000F)
3997D4    Track Enabled:                       Yes
3997D4    Track in Movie:                      2 (0x0000000000000002)
3997D4    Track in Preview:                    4 (0x0000000000000004)
3997D4    Track in Poster:                     8 (0x0000000000000008)
3997D4    Creation time:                       3118707150 (0xB9E3B1CE)
3997D8    Modification time:                   3118707150 (0xB9E3B1CE)
3997DC    Track ID:                            1 (0x00000001)
3997E0    Reserved:                            0 (0x00000000)
3997E4    Duration:                            2221 (0x000008AD)
3997E8    Reserved:                            0 (0x00000000)
3997EC    Reserved:                            0 (0x00000000)
3997F0    Layer:                               0 (0x0000)
3997F2    Alternate group:                     0 (0x0000)
3997F4    Volume:                              0 (0x0000)
3997F6    Reserved:                            0 (0x0000)
3997F8    Matrix structure (36 bytes)
3997F8     a (width scale):                    1.000
3997FC     b (width rotate):                   0.000
399800     u (width angle):                    0.000
399804     c (height rotate):                  0.000
399808     d (height scale):                   1.000
39980C     v (height angle):                   0.000
399810     x (position left):                  0.000
399814     y (position top):                   0.000
399818     w (divider):                        1.000
39981C    Track width:                         1920.000
399820    Track height:                        1080.000
399824   Media (1447 bytes)
399824    Header (8 bytes)
399824     Size:                               1447 (0x000005A7)
399828     Name:                               mdia
39982C    Media Header (32 bytes)
39982C     Header (8 bytes)
39982C      Size:                              32 (0x00000020)
399830      Name:                              mdhd
399834     Version:                            0 (0x00)
399835     Flags:                              0 (0x000000)
399838     Creation time:                      3118707150 (0xB9E3B1CE)
39983C     Modification time:                  3118707150 (0xB9E3B1CE)
399840     Time scale:                         1000 (0x000003E8)
399844     Duration:                           2221 (0x000008AD)
399848     Language:                           0 (0x0000)
39984A     Quality:                            0 (0x0000)
39984C    Handler Reference (45 bytes)
39984C     Header (8 bytes)
39984C      Size:                              45 (0x0000002D)
399850      Name:                              hdlr
399854     Version:                            0 (0x00)
399855     Flags:                              0 (0x000000)
399858     Component type:                     mhlr
39985C     Component subtype:                  vide
399860     Component manufacturer:             
399864     Component flags:                    0 (0x00000000)
399868     Component flags mask:               0 (0x00000000)
39986C     Component name size:                12 (0x0C)
39986D     Component name:                     VideoHandler
399879    Media Information (1362 bytes)
399879     Header (8 bytes)
399879      Size:                              1362 (0x00000552)
39987D      Name:                              minf
399881     Video Media Header (20 bytes)
399881      Header (8 bytes)
399881       Size:                             20 (0x00000014)

    ................
25E131   ------------------------
25E131   ---   AVC, filling   ---
25E131   ------------------------
25E131   slice_data (21876 bytes)
25E131    (ToDo):                              (Data)
2636A8   --------------------------------------------
2636A8   ---   MPEG-4, jumping to offset 3004D4   ---
2636A8   --------------------------------------------
3004D4  2 (64000 bytes)
3004D4   Channel grouping data:                (64000 bytes)
3004D4   Block (64000 bytes)
3004D4    Data:                                (64000 bytes)
30FED4   -------------------------
30FED4   ---   PCM, accepted   ---
30FED4   -------------------------
30FED4   ------------------------
30FED4   ---   PCM, filling   ---
30FED4   ------------------------
30FED4   --------------------------------------------
30FED4   ---   MPEG-4, jumping to offset 399FCB   ---
30FED4   --------------------------------------------
3204D4 ---------------------------
3204D4 ---   MPEG-4, filling   ---
3204D4 ---------------------------
3204D4 ----------------------------
3204D4 ---   MPEG-4, finished   ---
3204D4 ----------------------------
</code></pre>

<encoding><mp4><compression><h.264>
Video cam with poor compression ratio (H.264 produces videos at 2.9MB/sec)
IceCold
# Video cam with poor compression ratio (H.264 produces videos at 2.9MB/sec)

(Asked by: username_0 on 2018-07-20)

I just purchased a cheap dashboard video-camera that is advertised to have a H.264 codec inside. However, after the first video test I have seen that a 43sec movie takes 123MB! How is this possible. I thought that H.264 has a MUCH better compression!
Question:
1. Does my video camera really incorporate a true H.264 codec or is it a fake?
2. If it is a true H264 why is the compression ratio so poor?  

UPDATE:
I contacted the producer and they said that "The compression ratio system setting of the H.264 AVC codec is 102:1. This setting cannot be set manually"

000000 File Type (20 bytes)
000000  Header (8 bytes)
000000   Size:                                 20 (0x00000014)
000004   Name:                                 ftyp
000008  MajorBrand:                            qt  
00000C  MajorBrandVersion:                     512 (0x00000200)
000010  CompatibleBrand:                       qt  
000014 ----------------------------
000014 ---   MPEG-4, accepted   ---
000014 ----------------------------
000014 Data (3774264 bytes)
000014  Header (8 bytes)
000014   Size:                                 3774264 (0x00399738)
000018   Name:                                 mdat
00001C  Data:                                  (3774256 bytes)
39974C File header (2128 bytes)
39974C  Header (8 bytes)
39974C   Size:                                 2128 (0x00000850)
399750   Name:                                 moov
399754  Movie header (108 bytes)
399754   Header (8 bytes)
399754    Size:                                108 (0x0000006C)
399758    Name:                                mvhd
39975C   Version:                              0 (0x00)
39975D   Flags:                                0 (0x000000)
399760   Creation time:                        3118707150 (0xB9E3B1CE)
399764   Modification time:                    3118707150 (0xB9E3B1CE)
399768   Time scale:                           1000 (0x000003E8)
39976C   Duration:                             2221 (0x000008AD)
399770   Preferred rate:                       65536 (0x00010000)
399774   Preferred volume:                     256 (0x0100)
399776   Reserved:                             (10 bytes)
399780   Matrix structure (36 bytes)
399780    a (width scale):                     1.000
399784    b (width rotate):                    0.000
399788    u (width angle):                     0.000
39978C    c (height rotate):                   0.000
399790    d (height scale):                    1.000
399794    v (height angle):                    0.000
399798    x (position left):                   0.000
39979C    y (position top):                    0.000
3997A0    w (divider):                         1.000
3997A4   Preview time:                         0 (0x00000000)
3997A8   Preview duration:                     0 (0x00000000)
3997AC   Poster time:                          0 (0x00000000)
3997B0   Selection time:                       0 (0x00000000)
3997B4   Selection duration:                   0 (0x00000000)
3997B8   Current time:                         0 (0x00000000)
3997BC   Next track ID:                        3 (0x00000003)
3997C0  Track (1547 bytes)
3997C0   Header (8 bytes)
3997C0    Size:                                1547 (0x0000060B)
3997C4    Name:                                trak
3997C8   Track Header (92 bytes)
3997C8    Header (8 bytes)
3997C8     Size:                               92 (0x0000005C)
3997CC     Name:                               tkhd
3997D0    Version:                             0 (0x00)
3997D1    Flags:                               15 (0x00000F)
3997D4    Track Enabled:                       Yes
3997D4    Track in Movie:                      2 (0x0000000000000002)
3997D4    Track in Preview:                    4 (0x0000000000000004)
3997D4    Track in Poster:                     8 (0x0000000000000008)
3997D4    Creation time:                       3118707150 (0xB9E3B1CE)
3997D8    Modification time:                   3118707150 (0xB9E3B1CE)
3997DC    Track ID:                            1 (0x00000001)
3997E0    Reserved:                            0 (0x00000000)
3997E4    Duration:                            2221 (0x000008AD)
3997E8    Reserved:                            0 (0x00000000)
3997EC    Reserved:                            0 (0x00000000)
3997F0    Layer:                               0 (0x0000)
3997F2    Alternate group:                     0 (0x0000)
3997F4    Volume:                              0 (0x0000)
3997F6    Reserved:                            0 (0x0000)
3997F8    Matrix structure (36 bytes)
3997F8     a (width scale):                    1.000
3997FC     b (width rotate):                   0.000
399800     u (width angle):                    0.000
399804     c (height rotate):                  0.000
399808     d (height scale):                   1.000
39980C     v (height angle):                   0.000
399810     x (position left):                  0.000
399814     y (position top):                   0.000
399818     w (divider):                        1.000
39981C    Track width:                         1920.000
399820    Track height:                        1080.000
399824   Media (1447 bytes)
399824    Header (8 bytes)
399824     Size:                               1447 (0x000005A7)
399828     Name:                               mdia
39982C    Media Header (32 bytes)
39982C     Header (8 bytes)
39982C      Size:                              32 (0x00000020)
399830      Name:                              mdhd
399834     Version:                            0 (0x00)
399835     Flags:                              0 (0x000000)
399838     Creation time:                      3118707150 (0xB9E3B1CE)
39983C     Modification time:                  3118707150 (0xB9E3B1CE)
399840     Time scale:                         1000 (0x000003E8)
399844     Duration:                           2221 (0x000008AD)
399848     Language:                           0 (0x0000)
39984A     Quality:                            0 (0x0000)
39984C    Handler Reference (45 bytes)
39984C     Header (8 bytes)
39984C      Size:                              45 (0x0000002D)
399850      Name:                              hdlr
399854     Version:                            0 (0x00)
399855     Flags:                              0 (0x000000)
399858     Component type:                     mhlr
39985C     Component subtype:                  vide
399860     Component manufacturer:             
399864     Component flags:                    0 (0x00000000)
399868     Component flags mask:               0 (0x00000000)
39986C     Component name size:                12 (0x0C)
39986D     Component name:                     VideoHandler
399879    Media Information (1362 bytes)
399879     Header (8 bytes)
399879      Size:                              1362 (0x00000552)
39987D      Name:                              minf
399881     Video Media Header (20 bytes)
399881      Header (8 bytes)
399881       Size:                             20 (0x00000014)

    ................
25E131   ------------------------
25E131   ---   AVC, filling   ---
25E131   ------------------------
25E131   slice_data (21876 bytes)
25E131    (ToDo):                              (Data)
2636A8   --------------------------------------------
2636A8   ---   MPEG-4, jumping to offset 3004D4   ---
2636A8   --------------------------------------------
3004D4  2 (64000 bytes)
3004D4   Channel grouping data:                (64000 bytes)
3004D4   Block (64000 bytes)
3004D4    Data:                                (64000 bytes)
30FED4   -------------------------
30FED4   ---   PCM, accepted   ---
30FED4   -------------------------
30FED4   ------------------------
30FED4   ---   PCM, filling   ---
30FED4   ------------------------
30FED4   --------------------------------------------
30FED4   ---   MPEG-4, jumping to offset 399FCB   ---
30FED4   --------------------------------------------
3204D4 ---------------------------
3204D4 ---   MPEG-4, filling   ---
3204D4 ---------------------------
3204D4 ----------------------------
3204D4 ---   MPEG-4, finished   ---
3204D4 ----------------------------

**Tags:** encoding, mp4, compression, h.264


---

## 1 answers

### Answer by username_1 on 2018-07-21. Score: 1

H264 allows for much better compression, but image acquisition should be as good as feasible, so cameras will capture at a high bitrate, say, 10+ Mbps, depends on resolution and framerate. Nothing unusual about that.

The full bouquet of H.264 compression methods i.e. lookahead for rate-control, better motion estimation ..etc is usually applied when producing a file for web playback. You can use ffmpeg with libx264 to achieve that.

> **Comments:**
> **username_0**: Ok. But I had before a cam with mp2 compression. The file size was IDENTICAL. So, there must be something wrong about this camera if its mp4 compressor produces same results as the old camera.  
> **username_1**: Camera compressors aren't trying to squeeze out small files. They have a set of fixed target profiles. Check the camera menu and manual for lower bitrates.  
> **username_0**: @gyan-this is a cheap dashboard camera advertised as h264. there are no settings related to video!  
> **username_1**: Then you'll have to recompress after recording.  
> **username_0**: My problem is that this camera will kill the SD card after a few months only because of the intense writing. I replaced my old mp2 camera with this one hoping to get less I/O activity.  
> **username_0**: The producer of this camera finally answered: "The compression ratio system setting of the H.264 AVC codec is 102:1 (This setting cannot be set manually)"  

---

