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.

1 Answer 1

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

3
  • I'm glad I'm not the only one. I always get this message "Input stream #0:2 frame changed from size:1290x1104 fmt:rgb24 to size:1288x1101 fmt:rgb24". There are both 1290x1104 and 1288x1101 in the g2m file? Re: Audio, not quite understanding 44.1k, 1 channel, 64kb to 16k, mono, 48kb. Isn't 1 channel mono? And why the change in audio bitrate is confusing as well.
    – Sun
    May 17, 2016 at 16:25
  • The audio is being encoded, so the change in bitrate isn't that strange. The video frame change may be a change mid-recording of the g2m. To make it consistent, use -vf scale=1290x1104,setsar=1
    – Gyan
    May 17, 2016 at 16:33
  • Thank you! The output file is similar to g2m. I was getting some unwieldy sized MP4s (I think due to not using -r 30) so this works better. Their converter doesn't play nice with VLC and video doesn't play back correctly, so we've had to resort to using FFMPEG instead of their delivered tool. Awesome work!
    – Sun
    May 17, 2016 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .