Mike Slinn

Sony Alpha 7 Mark iii Camera Media Encodings

Published 2021-11-03.
Time to read: 4 minutes.

This page is part of the av_studio collection.

The documentation for the Sony Alpha 7 Mark iii camera does not properly describe the differences in encodings between the various video formats available. The settings trade off quality versus file size. I want to know which settings to use for various purposes. To this end, I made a short video clip for each camera setting and examined its properties. This article details my findings.

Sony engineers have no doubt chosen these settings after careful deliberation and testing. Unfortunately, product documentation does not discuss when these settings should be used.

To be specific, after working through all of this material, I still do not know when I should use the various formats. All I know for sure is that higher bit rate settings make larger video clips, and that there might be a quality difference. The degree to which the quality difference is perceptible is unknown. I would like guidelines to make intelligent decisions. Here are the specific formats that need to be rationalized:

4K_30p_100M vs. 4K_30p_60M
4K_24p_100M vs. 4K_24p_60M
HD_120p_100M vs. HD_120p_60M
HD_60p_50M vs. HD_60p_25M
HD_30p_50M vs. HD_30p_16M

Background

Here are a few key aspects from the Sony product specifications, to which I have added comments in italics:

Recording Format
XAVC S, AVCHD format Ver. 2.0 compliant.
The documentation is rather terse; the above means that two recording formats are available: XAVC, a proprietary Sony media format, and AVCHD, described later in this document. Wikipedia says, “XAVC supports resolutions up to 3840 × 2160, uses MP4 as the container format, and uses either AAC or LPCM for the audio.”
Video Compression
XAVC S: MPEG-4 AVC/H.264, AVCHD: MPEG-4 AVC/H.264
Again, the above means that the camera supports two types of video compression: XAVC S and AVCHD.
Audio Recording Format
XAVC S: LPCM 2ch, AVCHD: Dolby® Digital (AC-3) 2ch, Dolby® Digital Stereo Creator.
I understand this to mean that the camera supports three recording formats: Dolby AC-3 (a lossy format), AVCHD, and Dolby® Digital Stereo Creator (which I did not find).
Clean HDMI Output
This is important when streaming (via HDMI).
3840 x 2160 (30p),
3840 x 2160 (25p),
3840 x 2160 (24p),
1920 x 1080 (60p),
1920 x 1080 (60i),
1920 x 1080 (50p),
1920 x 1080 (50i),
1920 x 1080 (24p),
YCbCr 4:2:2 8bit / RGB 8bit.
25p (25 frames per second) is noticeably less smooth than 50p or 60p. I think that the extra resolution of 4K is not as noticeable as the choppy video that it introduces, so my choice for streaming with this camera is 1920 x 1080 (60p). I am unclear about "YCbCr 4:2:2 8bit / RGB 8bit"; does that apply to 3840 x 2160 (25p), or to all the settings, or is it a separate setting?
Color Space
xvYCC standard (x.v.Color when connected via an HDMI cable) compatible with TRILUMINOS Color.
This means that color is somewhat degraded when streamed via HDMI. My experience is that the amount of degradation is significant; however, the reduction in resolution is more significant than the reduction in color.

Script to Examine Media Format

I wrote this bash script to examine video clips recorded at different settings.

mediaDump
#!/bin/bash

function help {
  if [ "$1" ]; then printf "$1\n\n"; fi
  echo "$(basename $0) - Dump information about a media file
  
Usage: $(basename $0) filename
"
  exit 1
}

if [ -z "$1" ]; then help "Error: no media file name specified"; fi

ffprobe \
  -hide_banner \
  -loglevel fatal \
  -show_error \
  -show_format \
  -show_streams \
  -show_private_data \
  -print_format json \
  "$1"
 

Using the Script

Shell
$ mediaDump 4K_24p_60M.mp4
{
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "High",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "avc1",
            "codec_tag": "0x31637661",
            "width": 3840,
            "height": 2160,
            "coded_width": 3840,
            "coded_height": 2160,
            "closed_captions": 0,
            "has_b_frames": 1,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuv420p",
            "level": 51,
            "color_range": "tv",
            "color_space": "bt709",
            "color_transfer": "iec61966-2-4",
            "color_primaries": "bt709",
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "true",
            "nal_lengthsize": "4",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/24000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 108108,
            "duration": "4.504500",
            "bit_rate": "53533087",
            "bits_per_raw_sample": "8",
            "nb_frames": "108",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2021-11-03T17:02:12.000000Z",
                "language": "und",
                "handler_name": "Video Media Handler",
                "encoder": "AVC Coding"
            }
        },
        {
            "index": 1,
            "codec_name": "pcm_s16be",
            "codec_long_name": "PCM signed 16-bit big-endian",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "twos",
            "codec_tag": "0x736f7774",
            "sample_fmt": "s16",
            "sample_rate": "48000",
            "channels": 2,
            "bits_per_sample": 16,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/48000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 216240,
            "duration": "4.505000",
            "bit_rate": "1536000",
            "nb_frames": "216240",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2021-11-03T17:02:12.000000Z",
                "language": "und",
                "handler_name": "Sound Media Handler"
            }
        },
        {
            "index": 2,
            "codec_type": "data",
            "codec_tag_string": "rtmd",
            "codec_tag": "0x646d7472",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/24000",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 108108,
            "duration": "4.504500",
            "bit_rate": "196411",
            "nb_frames": "108",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "creation_time": "2021-11-03T17:02:12.000000Z",
                "language": "und",
                "handler_name": "Timed Metadata Media Handler",
                "timecode": "07:28:14:16"
            }
        }
    ],
    "format": {
        "filename": "4K_24p_60M.mp4",
        "nb_streams": 3,
        "nb_programs": 0,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "format_long_name": "QuickTime / MOV",
        "start_time": "0.000000",
        "duration": "4.505000",
        "size": "33559173",
        "bit_rate": "59594535",
        "probe_score": 100,
        "tags": {
            "major_brand": "XAVC",
            "minor_version": "16785407",
            "compatible_brands": "XAVCmp42iso2",
            "creation_time": "2021-11-03T17:02:12.000000Z"
        }
    }
} 

The following attributes, which were of interest to me, had the same values for all the video clips I tested:

streams[0].codec_name: h264
streams[0].codec_long_name: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

streams[1].codec_name: pcm_s16be
streams[1].codec_long_name: PCM signed 16-bit big-endian
streams[1].sample_rate: 48000

format.format_long_name: QuickTime / MOV

In other words, the audio codec (pcm_s16be) and video format (QuickTime / MOV) were the same for all recording settings. The audio for the sample video clips was always recorded as 16-bits at 48 kHz, which is DVD quality. The only significant differences between the video clips are the bit rate of the H.264 codec and the video resolution.

I wrote another bash script called mediaSummary that simply outputs the details of interest.

mediaSummary
#!/bin/bash

function help {
  if [ "$1" ]; then printf "$1\n\n"; fi
  echo "$(basename $0) - Dump selected information about a media file
  
Usage: $(basename $0) filename
"
  exit 1
}

if [ -z "$1" ]; then help "Error: no media file name specified"; fi

LC_NUMERIC=en_US.utf8

JSON="$( mediaDump "$1" )"

STREAM0="$( jq '.streams[0]' <<< "$JSON" )"
codec_bit_rate0="$( jq -r .bit_rate <<< "$STREAM0" )"
codec_bit_rate0_formatted="$( printf "%'d" $codec_bit_rate0 )"

echo "codec_bit_rate: $codec_bit_rate0_formatted"

Media Formats Tested

I used the following menu sequence to set the camera to various media settings:

4K Video Settings

4K video files are much larger than HD video files and require significantly more processing power for post-production.

MENU → Movie1 → File Format → XAVC S 4K
MENU → Movie1 → Record Setting → 30p 100M, 30p 60M, 24p 100M and 24p 60M.

4K Video Format Details

All the 4K formats had the same resolution: 3840 x 2160 pixels.

Shell
$ mediaSummary 4K_24p_100M.mp4
codec_bit_rate: 95,404,278
Shell
$ mediaSummary 4K_24p_60M.mp4
codec_bit_rate: 53,533,087
Shell
$ mediaSummary 4K_30p_100M.mp4
codec_bit_rate: 96,398,171
Shell
$ mediaSummary 4K_30p_60M.mp4
codec_bit_rate: 56,046,286

HD Video Settings

HD, also known as 1080p, is the most common video resolution on the internet today: 1920 x 1280 pixels.

MENU → Movie1 → File Format → XAVC S HD
MENU → Movie1 → Record Setting → 60p 50M / 60p 25M, 30p 50M, 30p 16M, 24p 50M, 120p 100M and 120p 60M

HD Video Format Details

Shell
$ mediaSummary HD_120p_100M.mp4
codec_bit_rate: 95,430,311
Shell
$ mediaSummary HD_120p_60M.mp4
codec_bit_rate: 56,137,995
Shell
$ mediaSummary HD_60p_50M.mp4
codec_bit_rate: 47,991,727
Shell
$ mediaSummary HD_60p_25M.mp4
codec_bit_rate: 24,176,270
Shell
$ mediaSummary HD_30p_50M.mp4
codec_bit_rate: 46,589,694
Shell
$ mediaSummary HD_30p_16M.mp4
codec_bit_rate: 15,483,830
Shell
$ mediaSummary HD_24p_50M.mp4
codec_bit_rate: 47,529,910

AVCHD Video Format

Warning! Davinci Resolve has issues with this format.

Because I use Davinci Resolve, I did not test AVCHD.

Developed jointly by Sony and Panasonic, the format was introduced in 2006 primarily for use in high definition consumer camcorders.

For video compression, AVCHD uses the H.264/MPEG-4 AVC standard, supporting various standard, high definition, and stereoscopic (3D) video resolutions. For audio compression, it supports both Dolby AC-3 (Dolby Digital) and uncompressed linear PCM audio. Stereo and multichannel surround (5.1) are both supported.

This format is compatible with Blu-ray.
 – From Wikipedia

To enable AVCHD, use this menu sequence:

MENU → Movie1 → File Format → AVCHD

Jonny Elwyn has a good article entitled Should Editors Transcode AVCHD to ProRes in Premiere?

* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.