Skip to content

Instantly share code, notes, and snippets.

@mablae
Last active September 22, 2018 00:24
Show Gist options
  • Save mablae/6050018a92a67ae2b55a07516d79a414 to your computer and use it in GitHub Desktop.
Save mablae/6050018a92a67ae2b55a07516d79a414 to your computer and use it in GitHub Desktop.
ffmpeg -i 01\ -\ Green\ Beret\ Loading\ Theme.flac \
-map 0:1 \
-c:a:0 alac \
01\ -\ Green\ Beret\ Loading\ Theme.m4a
@sebastianbergmann
Copy link

ffmpeg -i 01\ -\ Green\ Beret\ Loading\ Theme.flac -map 0:1 -c:a:0 alac 01\ -\ Green\ Beret\ Loading\ Theme.m4a
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, flac, from '01 - Green Beret Loading Theme.flac':
  Metadata:
    ALBUM           : Reformation 2
    album_artist    : Matt Gray
    ALBUMARTIST2    : Matt Gray
    ARTIST          : Matt Gray
    DATE            : 2018
    disc            : 1
    TITLE           : Green Beret Loading Theme
    TRACKNUM        : 1
    track           : 1
    TRACKTOTAL      : 13
    DISCTOTAL       : 2
    COMPOSER        : Martin Galway
  Duration: 00:05:58.15, start: 0.000000, bitrate: 1593 kb/s
    Stream #0:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)
    Stream #0:1: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Other
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[ipod @ 0x5628f65cf540] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x5628f65db2c0] using SAR=1/1
[libx264 @ 0x5628f65db2c0] MB rate (129960000) > level limit (16711680)
[libx264 @ 0x5628f65db2c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x5628f65db2c0] profile High, level 6.2
[libx264 @ 0x5628f65db2c0] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[ipod @ 0x5628f65cf540] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
Conversion failed!

@mablae
Copy link
Author

mablae commented Sep 22, 2018

Okay, we are on the right path it seems, but I selected the video stream, not the audio...

@mablae
Copy link
Author

mablae commented Sep 22, 2018

ffmpeg -i 01\ -\ Green\ Beret\ Loading\ Theme.flac -map 0:0 -c:a:0 alac 01\ -\ Green\ Beret\ Loading\ Theme.m4a

This should work ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment