[FFmpeg-user] ProRes HQ video file with 5.1 SMPTE DTV Audio?

Mark Scott markascott77 at gmail.com
Thu Jul 19 01:08:26 EEST 2018


How can I create ProRes HQ video files with 5.1 SMPTE DTV audio using
ffmpeg? The input file is:
Apple FCP Uncompressed 10-bit 422 1920X1080
FPS 23.98.

The audio has 6, 24-bit integer (little endian) mono channels, plus a
stereo track, configured like this:
Mono = Left
Mono = Right
Mono = Center
Mono = LFE
Mono = Left surround
Mono = Right surround
Stereo

The output file needs to be per the distribution company specs:
Apple ProRes 422 HQ 1920x1080
FPS 23.98
Audio format: 24-bit integer (little endian)
SMPTE DTV (L R C LFE Ls Rs Lt Rt)

Currently I use Telestream’s Episode to encode, and select (mix to 7.1)
audio option. The resulting output file’s audio configuration comes out
like this:

7.1 (L R C LFE Ls Rs Lsd Rsd)

I then have to open the output file in an old version of  Quicktime player
(7), which allows me to edit the audio configuration so I can change
channel 7 and 8 from Left Surround Direct and Right Surround Direct, to
 Left Total and Right Total. I have figured out that the following ffmpeg
command line input will create the type of file that I need, but with
stereo audio. How can I change the command line to give me the SMPTE DTV
audio as described above? This command line also cuts of the 1 second of
black at the end of the :30 sec spot:

ffmpeg -i TEST.mov -t 37 -c:v prores -profile:v 3 -acodec pcm_s24le
TEST_ProResHQ.mov

ffmpeg version N-91273-g67747c89ad Copyright (c) 2000-2018 the FFmpeg
developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-appkit --enable-avfoundation --enable-coreimage
--enable-audiotoolbox
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 20.101 / 58. 20.101
  libavformat    58. 17.100 / 58. 17.100
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 25.100 /  7. 25.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Guessed Channel Layout for Input Stream #0.8 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'TEST.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2018-07-17T22:35:56.000000Z
  Duration: 00:00:38.04, start: 0.000000, bitrate: 1069844 kb/s
    Stream #0:0(eng): Video: v210 (v210 / 0x30313276), yuv422p10le(bt709,
progressive), 1920x1080, 1060622 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98
tbr, 24k tbn, 24k tbc (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
      encoder         : 10 bit packed YUV 4:2:2 (v210)
      timecode        : 01:01:53:00
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      rotate          : 0
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Libquicktime Time Code Media Handler
      reel_name       : COMMIT
      timecode        : 01:01:53:00
    Stream #0:2(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:3(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:4(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:5(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:6(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:7(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, mono,
s32 (24 bit), 1152 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
    Stream #0:8(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (v210 (native) -> prores (native))
  Stream #0:8 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'TEST_ProResHQ.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    encoder         : Lavf58.17.100
    Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le,
1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 0.04 fps, 24k tbn, 23.98
tbc (default)
    Metadata:
      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler
      timecode        : 01:01:53:00
      encoder         : Lavc58.20.101 prores
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:      creation_time   : 2018-07-17T22:35:56.000000Z
      handler_name    : Linux Alias Data Handler      encoder         :
Lavc58.20.101 pcm_s24le
frame=   10 fps=0.0 q=-0.0 size=    2304kB time=00:00:00.50
bitrate=37711.7kbitsframe=   23 fps= 21 q=-0.0 size=    7680kB
time=00:00:01.00 bitrate=62852.0kbitsframe=   32 fps= 20 q=-0.0 size=
11264kB time=00:00:01.50 bitrate=61455.2kbitsframe=   42 fps= 20 q=-0.0
size=   15360kB time=00:00:02.00 bitrate=62851.9kbitsframe=   53 fps= 20
q=-0.0 size=   19968kB time=00:00:02.50 bitrate=65365.9kbitsframe=   64
fps= 20 q=-0.0 size=   24320kB time=00:00:03.00 bitrate=66343.6kbitsframe=
  75 fps= 20 q=-0.0 size=   28928kB time=00:00:03.50
bitrate=67640.5kbitsframe=   84 fps= 20 q=-0.0 size=   32512kB
time=00:00:03.95 bitrate=67401.9kbitsframe=   96 fps= 20 q=-0.0 size=
37632kB time=00:00:04.00 bitrate=76993.4kbitsframe=  107 fps= 20 q=-0.0
size=   41984kB time=00:00:04.50 bitrate=76353.3kbitsframe=  118 fps= 20
q=-0.0 size=   46592kB time=00:00:05.00 bitrate=76260.1kbitsframe=  129
fps= 20 q=-0.0 size=   49408kB time=00:00:05.50 bitrate=73517.5kbitsframe=
 142 fps= 21 q=-0.0 size=   49920kB time=00:00:06.00
bitrate=68089.4kbitsframe=  155 fps= 21 q=-0.0 size=   50432kB
time=00:00:06.50 bitrate=63496.4kbitsframe=  168 fps= 21 q=-0.0 size=
50688kB time=00:00:07.00 bitrate=59260.2kbitsframe=  180 fps= 21 q=-0.0
size=   60416kB time=00:00:07.50 bitrate=65924.5kbitsframe=  188 fps= 21
q=-0.0 size=   69888kB time=00:00:08.00 bitrate=71493.9kbitsframe=  197
fps= 21 q=-0.0 size=   80640kB time=00:00:08.50 bitrate=77640.4kbitsframe=
 207 fps= 21 q=-0.0 size=   92416kB time=00:00:09.00
bitrate=84035.1kbitsframe=  216 fps= 20 q=-0.0 size=  103168kB
time=00:00:09.00 bitrate=93812.0kbitsframe=  225 fps= 20 q=-0.0 size=
 113920kB time=00:00:09.50 bitrate=98136.9kbitsframe=  234 fps= 20 q=-0.0
size=  124672kB time=00:00:10.01 bitrate=102029.3kbitframe=  243 fps= 20
q=-0.0 size=  135424kB time=00:00:10.51 bitrate=105551.0kbitframe=  252
fps= 20 q=-0.0 size=  145920kB time=00:00:10.51 bitrate=113731.7kbitframe=
 261 fps= 20 q=-0.0 size=  156672kB time=00:00:11.01
bitrate=116561.4kbitframe=  270 fps= 20 q=-0.0 size=  167168kB
time=00:00:11.51 bitrate=118962.8kbitframe=  278 fps= 19 q=-0.0 size=
 176384kB time=00:00:12.01 bitrate=120291.2kbitframe=  287 fps= 19 q=-0.0
size=  186880kB time=00:00:12.01 bitrate=127449.3kbitframe=  295 fps= 19
q=-0.0 size=  196096kB time=00:00:12.51 bitrate=128385.1kbitframe=  305
fps= 19 q=-0.0 size=  207616kB time=00:00:13.01 bitrate=130699.3kbitframe=
 314 fps= 19 q=-0.0 size=  217856kB time=00:00:13.51
bitrate=132066.2kbitframe=  323 fps= 19 q=-0.0 size=  228352kB
time=00:00:13.51 bitrate=138429.0kbitframe=  332 fps= 19 q=-0.0 size=
 239360kB time=00:00:14.01 bitrate=139919.9kbitframe=  340 fps= 19 q=-0.0
size=  249344kB time=00:00:14.51 bitrate=140730.1kbitframe=  348 fps= 19
q=-0.0 size=  259328kB time=00:00:14.53 bitrate=146150.2kbitframe=  357
fps= 19 q=-0.0 size=  270592kB time=00:00:15.01 bitrate=147631.7kbitframe=
 367 fps= 19 q=-0.0 size=  283136kB time=00:00:15.51
bitrate=149492.5kbitframe=  376 fps= 19 q=-0.0 size=  294400kB
time=00:00:16.01 bitrate=150582.2kbitframe=  384 fps= 18 q=-0.0 size=
 304384kB time=00:00:16.03 bitrate=155481.8kbitframe=  393 fps= 18 q=-0.0
size=  315648kB time=00:00:16.51 bitrate=156557.9kbitframe=  402 fps= 18
q=-0.0 size=  326912kB time=00:00:17.01 bitrate=157375.8kbitframe=  408
fps= 18 q=-0.0 size=  334336kB time=00:00:17.05 bitrate=160547.1kbitframe=
 418 fps= 18 q=-0.0 size=  345856kB time=00:00:17.51
bitrate=161738.4kbitframe=  427 fps= 18 q=-0.0 size=  356352kB
time=00:00:18.01 bitrate=162017.8kbitframe=  436 fps= 18 q=-0.0 size=
 366848kB time=00:00:18.51 bitrate=162282.0kbitframe=  444 fps= 18 q=-0.0
size=  376064kB time=00:00:18.51 bitrate=166358.9kbitframe=  452 fps= 18
q=-0.0 size=  385536kB time=00:00:19.01 bitrate=166060.8kbitframe=  460
fps= 18 q=-0.0 size=  394752kB time=00:00:19.51 bitrate=165670.7kbitframe=
 464 fps= 18 q=-0.0 size=  399360kB time=00:00:19.51
bitrate=167604.6kbitframe=  474 fps= 18 q=-0.0 size=  411136kB
time=00:00:20.02 bitrate=168233.1kbitframe=  483 fps= 17 q=-0.0 size=
 421632kB time=00:00:20.52 bitrate=168320.0kbitframe=  491 fps= 17 q=-0.0
size=  431104kB time=00:00:20.52 bitrate=172101.3kbitframe=  499 fps= 17
q=-0.0 size=  440832kB time=00:00:21.02 bitrate=171794.7kbitframe=  508
fps= 17 q=-0.0 size=  451584kB time=00:00:21.52 bitrate=171892.1kbitframe=
 516 fps= 17 q=-0.0 size=  461568kB time=00:00:21.52
bitrate=175692.5kbitframe=  523 fps= 17 q=-0.0 size=  470016kB
time=00:00:22.02 bitrate=174842.0kbitframe=  531 fps= 17 q=-0.0 size=
 480000kB time=00:00:22.52 bitrate=174588.1kbitframe=  540 fps= 17 q=-0.0
size=  490752kB time=00:00:22.52 bitrate=178498.9kbitframe=  548 fps= 17
q=-0.0 size=  500224kB time=00:00:23.02 bitrate=177988.8kbitframe=  556
fps= 17 q=-0.0 size=  509440kB time=00:00:23.52 bitrate=177411.2kbitframe=
 564 fps= 17 q=-0.0 size=  518656kB time=00:00:23.54
bitrate=180457.0kbitframe=  573 fps= 17 q=-0.0 size=  529920kB
time=00:00:24.02 bitrate=180698.7kbitframe=  581 fps= 17 q=-0.0 size=
 539904kB time=00:00:24.52 bitrate=180345.9kbitframe=  587 fps= 16 q=-0.0
size=  547584kB time=00:00:24.52 bitrate=182911.3kbitframe=  592 fps= 16
q=-0.0 size=  553984kB time=00:00:25.02 bitrate=181348.1kbitframe=  596
fps= 16 q=-0.0 size=  558848kB time=00:00:25.02 bitrate=182940.4kbitframe=
 600 fps= 16 q=-0.0 size=  563968kB time=00:00:25.04
bitrate=184459.2kbitframe=  605 fps= 16 q=-0.0 size=  570368kB
time=00:00:25.52 bitrate=183050.5kbitframe=  610 fps= 16 q=-0.0 size=
 576768kB time=00:00:25.52 bitrate=185104.5kbitframe=  616 fps= 16 q=-0.0
size=  584448kB time=00:00:26.02 bitrate=183962.1kbitframe=  623 fps= 16
q=-0.0 size=  593152kB time=00:00:26.02 bitrate=186701.8kbitframe=  631
fps= 16 q=-0.0 size=  603136kB time=00:00:26.52 bitrate=186262.4kbitframe=
 639 fps= 16 q=-0.0 size=  613376kB time=00:00:27.02
bitrate=185916.9kbitframe=  648 fps= 16 q=-0.0 size=  624640kB
time=00:00:27.02 bitrate=189331.1kbitframe=  656 fps= 16 q=-0.0 size=
 634624kB time=00:00:27.52 bitrate=188859.9kbitframe=  664 fps= 16 q=-0.0
size=  644096kB time=00:00:28.02 bitrate=188255.8kbitframe=  672 fps= 16
q=-0.0 size=  653312kB time=00:00:28.02 bitrate=190949.5kbitframe=  679
fps= 16 q=-0.0 size=  661504kB time=00:00:28.52 bitrate=189951.8kbitframe=
 687 fps= 16 q=-0.0 size=  670720kB time=00:00:29.02
bitrate=189277.6kbitframe=  696 fps= 16 q=-0.0 size=  681216kB
time=00:00:29.02 bitrate=192239.5kbitframe=  703 fps= 16 q=-0.0 size=
 689152kB time=00:00:29.52 bitrate=191182.8kbitframe=  712 fps= 16 q=-0.0
size=  699648kB time=00:00:30.03 bitrate=190859.7kbitframe=  720 fps= 16
q=-0.0 size=  708864kB time=00:00:30.03 bitrate=193326.6kbitframe=  729
fps= 16 q=-0.0 size=  719360kB time=00:00:30.53 bitrate=193020.0kbitframe=
 737 fps= 16 q=-0.0 size=  728576kB time=00:00:31.03
bitrate=192339.8kbitframe=  744 fps= 16 q=-0.0 size=  736512kB
time=00:00:31.05 bitrate=194301.2kbitframe=  753 fps= 16 q=-0.0 size=
 747008kB time=00:00:31.53 bitrate=194075.4kbitframe=  760 fps= 16 q=-0.0
size=  755200kB time=00:00:32.03 bitrate=193138.1kbitframe=  768 fps= 16
q=-0.0 size=  764416kB time=00:00:32.05 bitrate=195364.9kbitframe=  777
fps= 16 q=-0.0 size=  774656kB time=00:00:32.53 bitrate=195065.9kbitframe=
 788 fps= 16 q=-0.0 size=  785408kB time=00:00:33.03
bitrate=194776.8kbitframe=  797 fps= 16 q=-0.0 size=  793600kB
time=00:00:33.53 bitrate=193871.0kbitframe=  804 fps= 16 q=-0.0 size=
 800000kB time=00:00:33.55 bitrate=195310.2kbitframe=  815 fps= 16 q=-0.0
size=  809984kB time=00:00:34.03 bitrate=194963.5kbitframe=  823 fps= 16
q=-0.0 size=  817152kB time=00:00:34.53 bitrate=193838.3kbitframe=  830
fps= 16 q=-0.0 size=  823552kB time=00:00:35.03 bitrate=192565.7kbitframe=
 838 fps= 16 q=-0.0 size=  830976kB time=00:00:35.03
bitrate=194301.6kbitframe=  846 fps= 16 q=-0.0 size=  838400kB
time=00:00:35.53 bitrate=193276.4kbitframe=  854 fps= 16 q=-0.0 size=
 845568kB time=00:00:36.03 bitrate=192221.5kbitframe=  863 fps= 16 q=-0.0
size=  853760kB time=00:00:36.03 bitrate=194083.8kbitframe=  871 fps= 16
q=-0.0 size=  860928kB time=00:00:36.53 bitrate=193032.2kbitframe=  878
fps= 16 q=-0.0 size=  867072kB time=00:00:37.00 bitrate=191974.4kbitframe=
 881 fps= 15 q=-0.0 size=  869888kB time=00:00:37.00
bitrate=192597.9kbitframe=  888 fps= 15 q=-0.0 size=  876032kB
time=00:00:37.00 bitrate=193958.2kbitframe=  888 fps= 15 q=-0.0 Lsize=
 879820kB time=00:00:37.00 bitrate=194796.9kbits/s speed=0.642x

video:869399kB audio:10406kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.001627%


More information about the ffmpeg-user mailing list