[FFmpeg-user] Tips on compressing videos created by GoPro
Kieran O Leary
kieran.o.leary at gmail.com
Thu Oct 19 17:26:08 EEST 2017
Hi,
On Thu, Oct 19, 2017 at 2:33 PM, Andrey Goreev <aegoreev at gmail.com> wrote:
>
> ffmpeg -i [INPUT-FILE] -y -f mp4 -c:a libfdk_aac -b:a 192k -c:v libx264
> -crf 23 -preset slow -map_metadata 0 [OUTPUT-FILE]
>
On a side note: I think the internal ffmpeg aac encoder might as good
if not better now than libfsk_aac, so you should be able to just use
-c:a aac instead. BUT is there a reason why you are increasing the
bitrate from 128kb/sec to 192kb/sec? You're just making the file
bigger. Why not just copy that stream instead with -c:a copy.
> FFprobe:
> "Unsupported codec with id 0 for input stream 2"
>
This looks like it's referring to your timecode track - do you really
want this? It looks like ffmpeg is ignoring it anyhow and not
including it in your output. It is storing the initial timecode value
as metadata though.
> FFmpeg:
> "No pixel format specified, yuvj420p for H.264 encoding chosen.
> Use -pix_fmt yuv420p for compatibility with outdated media players. "
>
This is a seperate issue. It's most likely relating to your camera
using the full range of 8-bit values (0-254) rather than the broadcast
range (16-235). DSLR cameras are like this as well. You may find that
your files are more compatible by heeding the warning and choosing
-pix_fmt yuv420p, but you might experience some clipping, I am not
sure actually. If you can play back the files on whatever device you
wish to use, then I'd say ignore this warning for now, but keep it in
mind if your files are unsupported in some media player.
> FFmpeg does do the job though and I am able to open the output file with VLC
> player.
ya
> I was wondering if there is something I should be aware about. Just don't
> want to run into issues with the produced files in future.
[
...]
> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
> fltp, 128 kb/s (default)
This is where you can see that your input audio is 128 kb/sec aac
> Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
> Metadata:
> creation_time : 2016-12-26T14:08:07.000000Z
> timecode : 14:07:16:09
> Unsupported codec with id 0 for input stream 2
Timecode track ^^
> ----------------------------------------------------------
>
> full ffmpeg output:
> ----------------------------------------------------------
[...]
> Stream mapping:
> Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
> Stream #0:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
You can see here that ffmpeg is only using two of the three tracks in
your source, the audio and video. It is ignoring that timecode track.
> Output #0, mp4, to
> '/mnt/data/FamilyPictures/2016/2016-12/2016-12-26/20161226_140807_198_x264_v2.MP4':
> Metadata:
> major_brand : avc1
> minor_version : 0
> compatible_brands: avc1isom
> creation_time : 2016-12-26T14:08:07.000000Z
> firmware : HD3.10.03.02
> encoder : Lavf57.71.100
> Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
> yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 59.94 fps, 60k tbn,
> 59.94 tbc (default)
> Metadata:
> creation_time : 2016-12-26T14:08:07.000000Z
> handler_name : GoPro AVC
> timecode : 14:07:16:09
Here's that timecode metadata in your outputshould you need it.
Best,
Kieran.
More information about the ffmpeg-user
mailing list