Encoding for Facebook

Hi!

Has anyone successfully encoded a video for uploading to Facebook?

If so, what settings should I use?

I have tried the YouTube settings (which works fine for uploading to YouTube), but Facebook just says that the file is invalid. Tutorials explaining how to encode for Facebook, like this one:

Just says to use H.263 and AAC, same as YouTube. So it should work, but doesn’t…

If I upload the video to YouTube and download it from there I can upload it to Facebook, but that’s a bit of a cludgy workaround.

Any suggestions welcome!

According to Facebook, they do accept MP4 among other formats.
The maximum file size is 4.0 GB.

The YouTube preset encodes to MP4 (a video container of H.264), AAC format.

The article you linked does say “H.264”, not H.263.

Oh sorry, that was a typo… I mean H.264…

Yes, according to Facebook they accept MP4, with H.264 codec and AAC… Which is precisely the settings I have in Shotcut… Still… Facebook doesn’t accept the video, it just says that the file is invalid. YouTube does accept the file without problems, however. Also, if I download the video from YouTube after uploading it there, then Facebook accepts the file that has been “re-coded” by YouTube.

Wanted to know if someone else has encountered this problem and knows what to do about it?

Here is some more info that I obtained by doing ffmpeg -i on the file as encoded by Shotcut as well as when the file is “re-coded” and downloaded from YouTube.

This is the info given by ffmpeg when the file is encoded by Shotcut:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '_directions.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:01:54.41, start: 0.000000, bitrate: 4311 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 960x540 [SAR 1:1 DAR 16:9], 4089 kb/s, 28.38 fps, 28.38 tbr, 14528 tbn, 56.75 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 214 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

And this is the info when re-coded and downloaded from YouTube:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'directions.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2018-10-23T10:22:42.000000Z
  Duration: 00:01:54.40, start: 0.000000, bitrate: 738 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709/unknown/bt709), 640x360 [SAR 1:1 DAR 16:9], 639 kb/s, 28.38 fps, 28.38 tbr, 14528 tbn, 56.75 tbc (default)
    Metadata:
      creation_time   : 2018-10-23T10:22:42.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 10/23/2018.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2018-10-23T10:22:42.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 10/23/2018.

Does this mean anything to anyone? Could it be related to the bitrate? Could it be that Facebook expects some specific metadata? And if so, can I use ffmpeg so set it after the encoding by Shotcut?

Any ideas on how to troubleshoot and solve this would be very welcome! Might also do some more experimentation with this and post my results…

Oooh… I found it…

It seems that the default filename when exporting will be .mp4 followed by a space(!)… Don’t know if this is just something depending on my OS (Xubuntu 17.01)… But anyway… That was the problem, when I renamed the file it worked fine…

:slight_smile:

You can use the default export settings for this.

You must be using an older version. That problem in the YouTube preset was fixed in March.

Indeed! My version was 18.03.06. I upgraded to 18.10.08 and the problem went away.

Thanks for a great project!!!

So … to make this 'blindingly obvious for non-techos like me, who need the UX vvv simple, would you please put a save for ‘facebook’ in the export options please

Just use Default that already exists.