0

There's a thread on the GoToMeeting forum where g2m videos are transcoded to MP4 at a fixed dimension of 1920x1080. So, if you're broadcast is 1290x1104, you're MP4 ends up with a black border all around to make it 1920x1080. See screenshot below.

enter image description here

I did a ffprobe on the output file created by GoToMeeting. If I were to use ffmpeg, what would be the settings to mimic the output without the black borders?

The original g2m has the following codec information:

Input #0, asf, from 'c:\meeting.g2m':
  Metadata:
    DeviceConformanceTemplate: L2
    WMFSDKNeeded    : 0.0.0.0000
    WMFSDKVersion   : 12.0.9600.17415
    IsVBR           : 1
    WM/ToolVersion  : 7.16.0 Build 4800
    WM/ToolName     : GoToMeeting
    BitRateFrom the writer: 173566
    Audio samples   : 18871
    Video samples   : 6977
    recording time  : Fri, 29 Apr 2016 12:12:57 Mountain Daylight Time
  Duration: 00:31:30.99, start: 0.000000, bitrate: 176 kb/s
    Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 1 channels, fltp, 48 kb/s
    Stream #0:1: Data: none, 2 kb/s
    Stream #0:2: Video: g2m (G2M5 / 0x354D3247), rgb24, 1290x1104, 125 kb/s, 1k tbr, 1k tbn, 1k tbc
Unsupported codec with id 0 for input stream 1

The output MP4 from GoToMeeting converter is:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:\meeting.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42isomavc1
    creation_time   : 2016-05-12 20:00:32
  Duration: 00:31:30.94, start: 0.000000, bitrate: 163 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 98 kb/s, 6.13 fps, 29.85 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      handler_name    : Citrix h264 stream handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : AAC stream handler

I see mention about h264 (Baseline) and aac (LC), but not sure how you configure that in ffmpeg to create the MP4 with those settings.

Sun
  • 6,480

1 Answers1

3

To mostly match the MP4 created by GTM, but with no padding, I'd use

ffmpeg -i meeting.g2m -profile:v baseline -c:v libx264 -crf 23 -r 30 -pix_fmt yuv420p
       -c:a aac -b:a 64k -ar 16k -ac 1 output.mp4

Some notes:

The MP4 produced by GTM is variable frame rate, which FFmpeg does not do for MP4 output. The notional frame rate reported by the GTM MP4 is ~30fps, so that's what I've used. Note that the -r option should be present, as the .g2m is reporting a framerate of 1000!, which is a false flag, and FFmpeg will try to output at that rate if not overridden by -r 30

If the dimensions of the .g2m have odd values, then they will have to be made even. To do that, insert -vf scale=2*trunc(iw/2):-2 after the -i meeting.g2m option.

It's weird that a 44100 Hz audio track is being downsampled to 16K. You should keep it at source rate, so skip -ar 16k

Gyan
  • 38,955