Hi steipal,
mainly its the audio part.
Your setup generates one audio stream with e.g. 8 channels in 16bit PCM. But our video server requieres 8 audio streams with one channel in 24bit PCM. Same if you only use 4 channels. Every channel has to be a single mono stream with 24bit encoding.
If the source file has only 2 channels, the other channels should be muted. So you have to map a mute audio source to those streams.
So if i want to transcode from a MP4 file (e.g. shot with a DSLR/GoPro, o a final movie, made for online content. or maybe a youtube video) the whole ffmpeg string looks like this:
ffmpeg -i input.mp4 -f lavfi -i aevalsrc=0 -vcodec dnxhd -vf scale=1920:1080 -b:v 120M -pix_fmt yuv422p -r 25 -flags +ildct+ilme -top 1 -dc 10 -qmax 20 -lmin "1*QP2LAMBDA" -rc_max_vbv_use 1 -rc_min_vbv_use 1 -maxrate 120M -bufsize 8000k -map_metadata 1 -acodec pcm_s24le -ar 48000 -ac 1 -map 0:v -map 0:1 -map_channel 0.1.0:0.1 -map 0:1 -map_channel 0.1.1:0.2 -map 1:0 -map 1:0 -map 1:0 -map 1:0 -map 1:0 -map 1:0 -shortest -color_range 1 -color_primaries 1 -color_trc 1 -f mov output.mov
This includes color conversion, interlacing and audio mapping. The ouput file is compatible with an EVS video server.
Here is a media info of a sample video in DNxHD with 8 Channels:
Code: Select all
General
Complete name : C:\Offline\FFmpeg\input\dnxtest.mxf
Format : MXF
Commercial name : DNxHD 120
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 934 MiB
Duration : 1mn 0s
Overall bit rate : 131 Mbps
Encoded date : 2015-05-27 12:40:37.112
Writing application : OpenCube MXFTk Advanced 2.7.0.0.1
Writing library : Microsoft Windows 7 Professional Service Pack 1 (Build 7601) 2.7.0.0.1
Video
ID : 2
Format : VC-3
Commercial name : DNxHD 120
Format version : Version 1
Format settings, wrapping mode : Frame
Codec ID : 0D01030102110100-0401020271080000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 121 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Bits/(Pixel*Frame) : 2.339
Stream size : 867 MiB (93%)
Title : Picture
Audio #1
ID : 3
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #2
ID : 4
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #3
ID : 5
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #4
ID : 6
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #5
ID : 7
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #6
ID : 8
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #7
ID : 9
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Audio #8
ID : 10
Format : PCM
Format settings, Endianness : Little
Format settings, wrapping mode : Frame (AES)
Codec ID : 0D01030102060300-040202017F000000
Duration : 1mn 0s
Bit rate mode : Constant
Bit rate : 1 152 Kbps
Channel(s) : 1 channel
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 8.24 MiB (1%)
Title : Sound
Other #1
ID : 1-Material
Type : Time code
Format : MXF TC
Time code of first frame : 10:00:00:00
Time code settings : Material Package
Time code, striped : Yes
Other #2
ID : 1-Source
Type : Time code
Format : MXF TC
Time code of first frame : 10:00:00:00
Time code settings : Source Package
Time code, striped : Yes
Other #3
Type : Time code
Format : SMPTE TC
Muxing mode : SDTI
Time code of first frame : 10:00:00:00
-bephop