VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. For your interest, here is the MediaInfo information from one of the .mxf files we broadcast on our U.S. TV station.

    Code:
    General
    Complete name                            : Title.mxf
    Format                                   : MXF
    Commercial name                          : XDCAM HD 35
    Format version                           : 1.3
    Format profile                           : OP-1a
    Format settings                          : Closed / Complete
    File size                                : 180 MiB
    Duration                                 : 39 s 706 ms
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 38.0 Mb/s
    Encoded date                             : 2019-02-25 16:30:45.208
    Writing application                      : Grass Valley K.K. EDIUS 8.2.0.312
    
    Video
    ID                                       : 2
    Format                                   : MPEG Video
    Commercial name                          : XDCAM HD 35
    Format version                           : Version 2
    Format profile                           : Main@High
    Format settings                          : CustomMatrix / BVOP
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=15
    Format settings, wrapping mode           : Frame
    Codec ID                                 : 0D01030102046001-0401020201030300
    Duration                                 : 39 s 706 ms
    Bit rate mode                            : Variable
    Bit rate                                 : 35.0 Mb/s
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate                               : 59.940 (60000/1001) FPS
    Standard                                 : Component
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.634
    Time code of first frame                 : 00:00:00;00
    Time code source                         : Group of pictures header
    GOP, Open/Closed                         : Open
    GOP, Open/Closed of first frame          : Closed
    Stream size                              : 166 MiB (92%)
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    
    Audio #1
    ID                                       : 3
    Format                                   : PCM
    Format settings                          : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 39 s 706 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 59.940 FPS (800.8 SPF)
    Bit depth                                : 16 bits
    Stream size                              : 3.64 MiB (2%)
    Locked                                   : Yes
    
    Audio #2
    ID                                       : 4
    Format                                   : PCM
    Format settings                          : Little
    Format settings, wrapping mode           : Frame (AES)
    Codec ID                                 : 0D01030102060300
    Duration                                 : 39 s 706 ms
    Bit rate mode                            : Constant
    Bit rate                                 : 768 kb/s
    Channel(s)                               : 1 channel
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 59.940 FPS (800.8 SPF)
    Bit depth                                : 16 bits
    Stream size                              : 3.64 MiB (2%)
    Locked                                   : Yes
    
    Other #1
    ID                                       : 1-Material
    Type                                     : Time code
    Format                                   : MXF TC
    Time code of first frame                 : 00: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                 : 00: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                 : 00:00:00;00
    Quote Quote  
  2. Here is an ffmpeg command I came up with to convert an mp4 file. The high bit rate is needed to keep the levels within spec. The scale filter is to keep the colors accurate.

    Code:
    ffmpeg -y  -i  output.mp4  -vcodec mpeg2video  -pix_fmt yuv420p  -s 1280x720  -r 59.94  -b:v 35M  -vf  scale=out_color_matrix=bt709,lutyuv=y='clip(val,16,235)'  -acodec pcm_s16le  -ar 48000  -ac 2  output.mxf
    Quote Quote  
  3. Is ffmpeg handling the audio correctly with your command or just expanding the first channel to stereo while completely discarding the second one?

    https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2monostereo
    Quote Quote  
  4. Originally Posted by sneaker View Post
    Is ffmpeg handling the audio correctly with your command or just expanding the first channel to stereo while completely discarding the second one?

    https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2monostereo
    I don't know; I haven't tested that.

    Would you do it differently?
    Quote Quote  
  5. I would merge the two mono tracks using the "amerge" filter into a single stereo track like described in my link. I think you are doing "mono -> stereo" but should be doing "2x mono -> stereo".
    Quote Quote  
  6. I looked at your link.

    Why wouldn't ffmpeg simply pass the one stereo pair without changing anything?

    Viz.:

    L -> L
    R -> R

    To do what you're suggesting would require two input files:

    Code:
    ffmpeg -i left.mp3 -i right.mp3 -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" output.mp3
    Quote Quote  
  7. Originally Posted by chris319 View Post
    Why wouldn't ffmpeg simply pass the one stereo pair without changing anything?
    Because like MediaInfo it doesn't see a single stereo track, it sees 2 mono tracks. By default ffmpeg only maps one audio track.
    https://trac.ffmpeg.org/wiki/Map#Default
    Originally Posted by chris319 View Post
    Audio #1
    ID : 3
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 39 s 706 ms
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 59.940 FPS (800.8 SPF)
    Bit depth : 16 bits
    Stream size : 3.64 MiB (2%)
    Locked : Yes

    Audio #2
    ID : 4
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 39 s 706 ms
    Bit rate mode : Constant
    Bit rate : 768 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 59.940 FPS (800.8 SPF)
    Bit depth : 16 bits
    Stream size : 3.64 MiB (2%)
    Locked : Yes
    Originally Posted by chris319 View Post
    To do what you're suggesting would require two input files:
    No.

    Code:
    ffmpeg -i "whatever.mxf" -map v -filter_complex "[0:a:0][0:a:1]amerge=inputs=2[a]" -map "[a]" "output.mp4"
    Quote Quote  
  8. I think he's starting with a MP4 with stereo audio , not a MXF with two mono audio streams
    Quote Quote  
  9. Oooh. My bad. I indeed thought he wanted to convert mxf to mp4.
    Quote Quote  
  10. Originally Posted by poisondeathray View Post
    I think he's starting with a MP4 with stereo audio , not a MXF with two mono audio streams
    Right.
    Quote Quote  
  11. I thought the same as sneaker. Next time describe it with a few words what you want to do exactly, otherwise I won‘t give help anymore here. Especially from a guy who works for a tv station I can expect that.

    Just look at the title - it says nothing except one format.
    Quote Quote  
  12. Just look at post #2 in this thread:

    Here is an ffmpeg command I came up with to convert an mp4 file.
    The input file is mp4; the output file is mxf. Surely you can figure it out from that.
    Quote Quote  
  13. What concerns me is that the Y levels change if the video bit rate is reduced.
    Quote Quote  
  14. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If the bitrate is reduced, the quantizer changes. When the quantizer changes, it makes rougher guesses based on more constrained info - some of which includes individual Y, U, or V values. You should expect this when bitrate is reduced...they're called artifacts.

    Scott
    Quote Quote  
  15. Originally Posted by Cornucopia View Post
    If the bitrate is reduced, the quantizer changes. When the quantizer changes, it makes rougher guesses based on more constrained info - some of which includes individual Y, U, or V values. You should expect this when bitrate is reduced...they're called artifacts.

    Scott
    Think it would help to shoot at a lower bit rate? Right now I'm shooting at 50 Mbps.
    Quote Quote  
  16. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You said, in post #2, "high bitrate is needed to keep levels within spec". What spec are you referring to? That spec should determine what you should be doing. Considering your source is 35Mbps, and IS in spec for XDCam, doesn't make sense to me to be doing ANY converting unless necessitated by a different spec.

    Scott
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!