How to convert a video with ffmpeg into the DNxHD / DNxHR format?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







8















I am following a tutorial on how to work with cinelerra-cv,
in the very beginning it was said, that the very first step
in working with cinelerra, is to convert whatever video clip
one has into the dnxhd format.
It was just said, not explained how to do it.



After some research, I came across ffmpeg, but I have no idea how to use it with regard to dnxhd, with the little knowledge I gathered about ffmpeg, my guess how to do it would be:



ffmpeg -i <video-clip> -vcodec dnxhd <video-clip-in-dnxhd>


however, this does not work, and the examples I have seen on converting into dnxhd with ffmpeg I do not understand, they seemed each time having some different tags without explaining why to use them.










share|improve this question




















  • 1





    deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

    – Rinzwind
    Apr 21 '17 at 13:44











  • thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

    – sharkant
    Apr 21 '17 at 13:50






  • 1





    -b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

    – Rinzwind
    Apr 21 '17 at 13:59













  • does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

    – sharkant
    Apr 21 '17 at 14:03











  • No. You need to specify the bitrate for this particular encoder.

    – llogan
    Apr 21 '17 at 19:22


















8















I am following a tutorial on how to work with cinelerra-cv,
in the very beginning it was said, that the very first step
in working with cinelerra, is to convert whatever video clip
one has into the dnxhd format.
It was just said, not explained how to do it.



After some research, I came across ffmpeg, but I have no idea how to use it with regard to dnxhd, with the little knowledge I gathered about ffmpeg, my guess how to do it would be:



ffmpeg -i <video-clip> -vcodec dnxhd <video-clip-in-dnxhd>


however, this does not work, and the examples I have seen on converting into dnxhd with ffmpeg I do not understand, they seemed each time having some different tags without explaining why to use them.










share|improve this question




















  • 1





    deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

    – Rinzwind
    Apr 21 '17 at 13:44











  • thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

    – sharkant
    Apr 21 '17 at 13:50






  • 1





    -b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

    – Rinzwind
    Apr 21 '17 at 13:59













  • does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

    – sharkant
    Apr 21 '17 at 14:03











  • No. You need to specify the bitrate for this particular encoder.

    – llogan
    Apr 21 '17 at 19:22














8












8








8


4






I am following a tutorial on how to work with cinelerra-cv,
in the very beginning it was said, that the very first step
in working with cinelerra, is to convert whatever video clip
one has into the dnxhd format.
It was just said, not explained how to do it.



After some research, I came across ffmpeg, but I have no idea how to use it with regard to dnxhd, with the little knowledge I gathered about ffmpeg, my guess how to do it would be:



ffmpeg -i <video-clip> -vcodec dnxhd <video-clip-in-dnxhd>


however, this does not work, and the examples I have seen on converting into dnxhd with ffmpeg I do not understand, they seemed each time having some different tags without explaining why to use them.










share|improve this question
















I am following a tutorial on how to work with cinelerra-cv,
in the very beginning it was said, that the very first step
in working with cinelerra, is to convert whatever video clip
one has into the dnxhd format.
It was just said, not explained how to do it.



After some research, I came across ffmpeg, but I have no idea how to use it with regard to dnxhd, with the little knowledge I gathered about ffmpeg, my guess how to do it would be:



ffmpeg -i <video-clip> -vcodec dnxhd <video-clip-in-dnxhd>


however, this does not work, and the examples I have seen on converting into dnxhd with ffmpeg I do not understand, they seemed each time having some different tags without explaining why to use them.







ffmpeg codecs convert cinelerra






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 16 '18 at 19:27









llogan

5,4251737




5,4251737










asked Apr 21 '17 at 13:29









sharkantsharkant

46121021




46121021








  • 1





    deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

    – Rinzwind
    Apr 21 '17 at 13:44











  • thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

    – sharkant
    Apr 21 '17 at 13:50






  • 1





    -b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

    – Rinzwind
    Apr 21 '17 at 13:59













  • does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

    – sharkant
    Apr 21 '17 at 14:03











  • No. You need to specify the bitrate for this particular encoder.

    – llogan
    Apr 21 '17 at 19:22














  • 1





    deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

    – Rinzwind
    Apr 21 '17 at 13:44











  • thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

    – sharkant
    Apr 21 '17 at 13:50






  • 1





    -b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

    – Rinzwind
    Apr 21 '17 at 13:59













  • does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

    – sharkant
    Apr 21 '17 at 14:03











  • No. You need to specify the bitrate for this particular encoder.

    – llogan
    Apr 21 '17 at 19:22








1




1





deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

– Rinzwind
Apr 21 '17 at 13:44





deb-indus.org/tuto/ffmpeg-howto.htm#Encoding_VC-3 would suggest ffmpeg -i <input_file> -vcodec dnxhd -b <bitrate> -an output.mov

– Rinzwind
Apr 21 '17 at 13:44













thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

– sharkant
Apr 21 '17 at 13:50





thanks, I ve seen this one before and I was like: Do I have to specify a bitrate and does it have to have no sound (-an)? ....i mean can one only work in cinelerra with dnxhd videoclips which have no sound?

– sharkant
Apr 21 '17 at 13:50




1




1





-b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

– Rinzwind
Apr 21 '17 at 13:59







-b <int> : Set video bitrate in bit/s ( default = 200k ). so I would assume you must add a bitrate since 200k is not a valid option. But the -an I would drop :)

– Rinzwind
Apr 21 '17 at 13:59















does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

– sharkant
Apr 21 '17 at 14:03





does the bitrate depend on the source file or the file into which one wants to convert? ....i mean if i just try using 200 could it work?

– sharkant
Apr 21 '17 at 14:03













No. You need to specify the bitrate for this particular encoder.

– llogan
Apr 21 '17 at 19:22





No. You need to specify the bitrate for this particular encoder.

– llogan
Apr 21 '17 at 19:22










1 Answer
1






active

oldest

votes


















10














This is a picky encoder so you have to choose proper parameters including:




  • frame rate

  • pixel format / color space

  • width x height / resolution / frame size

  • bitrate


See the Valid DNxHD parameters below for accepted values.





DNxHD example



This example will scale to 1280x720, choose a frame rate of 30000/1001 (aka "29.97"), and a pixel format of YUV 4:2:2 planar.



ffmpeg -i input -c:v dnxhd -vf "scale=1280:720,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le output.mov



  • If your input file already conforms to some of the accepted parameters then you don't have to manually declare them.


  • Output format container for DNxHD is typically MXF or MOV.





DNxHR example



DNxHR is for resolutions bigger than 1080p such as 2K, 4K, and 8K.



If you want DNxHR then add the -profile output option, such as -profile dnxhr_hq.



Accepted values are: dnxhd, dnxhr_444, dnxhr_hqx, dnxhr_hq, dnxhr_sq, dnxhr_lb.




  • DNxHR LB: dnxhr_lb - Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.

  • DNxHR SQ: dnxhr_sq - Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.

  • DNxHR HQ: dnxhr_hq - High Quality. 8-bit 4:2:2 (yuv422p).

  • DNxHR HQX: dnxhr_hqx - High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.

  • DNxHR 444: dnxhr_444 - Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.


The above list was adapted from DNxHR codec.





Valid DNxHD parameters



ffmpeg will fail if you provide incorrect values, but it can provide a list of what is accepted.



You can show the list with the following "dummy" command:



ffmpeg -f lavfi -i testsrc2 -c:v dnxhd -f null -


Important Notes about Frame Rate




  • Frame rate is missing from the list that is generated from this command. ffmpeg will blindly accept any frame rate for this encoder, and Avid software will reportedly accept it (unconfirmed), but the DNxHD bitrate is supposed to be matched to specific frame rates only. For maximum compatibility I recommended only using the proper bitrate/frame rate combination. So use the command above to get the proper bitrates and pixel formats accepted by ffmpeg, and cross reference with the List of Avid DNxHD resolutions or the DNxHD White Paper (page 9) for the proper frame rates.



  • The frame rates listed in the links above are using inaccurate rounded approximations. The proper values are listed below; the abbreviated name is to the left and the proper value is to the right.




    • 29.97 = 30000/1001 (or use the alias ntsc)

    • 59.94 = 60000/1001

    • 23.967 = 24000/1001 (or use the alias ntsc-film)






More options



For additional encoder specific options, and a list of supported pixel formats, refer to:



ffmpeg -h encoder=dnxhd




Errors



ff_frame_thread_encoder_init failed
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!


This means that your frame rate, width, height, pixel format, and/or bitrate are incorrect. Refer to Valid DNxHD parameters above for accepted values.



pixel format is incompatible with DNxHD profile



Choose a proper pixel format using the format filter. See the DNxHD example above.






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f907398%2fhow-to-convert-a-video-with-ffmpeg-into-the-dnxhd-dnxhr-format%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    10














    This is a picky encoder so you have to choose proper parameters including:




    • frame rate

    • pixel format / color space

    • width x height / resolution / frame size

    • bitrate


    See the Valid DNxHD parameters below for accepted values.





    DNxHD example



    This example will scale to 1280x720, choose a frame rate of 30000/1001 (aka "29.97"), and a pixel format of YUV 4:2:2 planar.



    ffmpeg -i input -c:v dnxhd -vf "scale=1280:720,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le output.mov



    • If your input file already conforms to some of the accepted parameters then you don't have to manually declare them.


    • Output format container for DNxHD is typically MXF or MOV.





    DNxHR example



    DNxHR is for resolutions bigger than 1080p such as 2K, 4K, and 8K.



    If you want DNxHR then add the -profile output option, such as -profile dnxhr_hq.



    Accepted values are: dnxhd, dnxhr_444, dnxhr_hqx, dnxhr_hq, dnxhr_sq, dnxhr_lb.




    • DNxHR LB: dnxhr_lb - Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.

    • DNxHR SQ: dnxhr_sq - Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.

    • DNxHR HQ: dnxhr_hq - High Quality. 8-bit 4:2:2 (yuv422p).

    • DNxHR HQX: dnxhr_hqx - High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.

    • DNxHR 444: dnxhr_444 - Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.


    The above list was adapted from DNxHR codec.





    Valid DNxHD parameters



    ffmpeg will fail if you provide incorrect values, but it can provide a list of what is accepted.



    You can show the list with the following "dummy" command:



    ffmpeg -f lavfi -i testsrc2 -c:v dnxhd -f null -


    Important Notes about Frame Rate




    • Frame rate is missing from the list that is generated from this command. ffmpeg will blindly accept any frame rate for this encoder, and Avid software will reportedly accept it (unconfirmed), but the DNxHD bitrate is supposed to be matched to specific frame rates only. For maximum compatibility I recommended only using the proper bitrate/frame rate combination. So use the command above to get the proper bitrates and pixel formats accepted by ffmpeg, and cross reference with the List of Avid DNxHD resolutions or the DNxHD White Paper (page 9) for the proper frame rates.



    • The frame rates listed in the links above are using inaccurate rounded approximations. The proper values are listed below; the abbreviated name is to the left and the proper value is to the right.




      • 29.97 = 30000/1001 (or use the alias ntsc)

      • 59.94 = 60000/1001

      • 23.967 = 24000/1001 (or use the alias ntsc-film)






    More options



    For additional encoder specific options, and a list of supported pixel formats, refer to:



    ffmpeg -h encoder=dnxhd




    Errors



    ff_frame_thread_encoder_init failed
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Conversion failed!


    This means that your frame rate, width, height, pixel format, and/or bitrate are incorrect. Refer to Valid DNxHD parameters above for accepted values.



    pixel format is incompatible with DNxHD profile



    Choose a proper pixel format using the format filter. See the DNxHD example above.






    share|improve this answer






























      10














      This is a picky encoder so you have to choose proper parameters including:




      • frame rate

      • pixel format / color space

      • width x height / resolution / frame size

      • bitrate


      See the Valid DNxHD parameters below for accepted values.





      DNxHD example



      This example will scale to 1280x720, choose a frame rate of 30000/1001 (aka "29.97"), and a pixel format of YUV 4:2:2 planar.



      ffmpeg -i input -c:v dnxhd -vf "scale=1280:720,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le output.mov



      • If your input file already conforms to some of the accepted parameters then you don't have to manually declare them.


      • Output format container for DNxHD is typically MXF or MOV.





      DNxHR example



      DNxHR is for resolutions bigger than 1080p such as 2K, 4K, and 8K.



      If you want DNxHR then add the -profile output option, such as -profile dnxhr_hq.



      Accepted values are: dnxhd, dnxhr_444, dnxhr_hqx, dnxhr_hq, dnxhr_sq, dnxhr_lb.




      • DNxHR LB: dnxhr_lb - Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.

      • DNxHR SQ: dnxhr_sq - Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.

      • DNxHR HQ: dnxhr_hq - High Quality. 8-bit 4:2:2 (yuv422p).

      • DNxHR HQX: dnxhr_hqx - High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.

      • DNxHR 444: dnxhr_444 - Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.


      The above list was adapted from DNxHR codec.





      Valid DNxHD parameters



      ffmpeg will fail if you provide incorrect values, but it can provide a list of what is accepted.



      You can show the list with the following "dummy" command:



      ffmpeg -f lavfi -i testsrc2 -c:v dnxhd -f null -


      Important Notes about Frame Rate




      • Frame rate is missing from the list that is generated from this command. ffmpeg will blindly accept any frame rate for this encoder, and Avid software will reportedly accept it (unconfirmed), but the DNxHD bitrate is supposed to be matched to specific frame rates only. For maximum compatibility I recommended only using the proper bitrate/frame rate combination. So use the command above to get the proper bitrates and pixel formats accepted by ffmpeg, and cross reference with the List of Avid DNxHD resolutions or the DNxHD White Paper (page 9) for the proper frame rates.



      • The frame rates listed in the links above are using inaccurate rounded approximations. The proper values are listed below; the abbreviated name is to the left and the proper value is to the right.




        • 29.97 = 30000/1001 (or use the alias ntsc)

        • 59.94 = 60000/1001

        • 23.967 = 24000/1001 (or use the alias ntsc-film)






      More options



      For additional encoder specific options, and a list of supported pixel formats, refer to:



      ffmpeg -h encoder=dnxhd




      Errors



      ff_frame_thread_encoder_init failed
      Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
      Conversion failed!


      This means that your frame rate, width, height, pixel format, and/or bitrate are incorrect. Refer to Valid DNxHD parameters above for accepted values.



      pixel format is incompatible with DNxHD profile



      Choose a proper pixel format using the format filter. See the DNxHD example above.






      share|improve this answer




























        10












        10








        10







        This is a picky encoder so you have to choose proper parameters including:




        • frame rate

        • pixel format / color space

        • width x height / resolution / frame size

        • bitrate


        See the Valid DNxHD parameters below for accepted values.





        DNxHD example



        This example will scale to 1280x720, choose a frame rate of 30000/1001 (aka "29.97"), and a pixel format of YUV 4:2:2 planar.



        ffmpeg -i input -c:v dnxhd -vf "scale=1280:720,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le output.mov



        • If your input file already conforms to some of the accepted parameters then you don't have to manually declare them.


        • Output format container for DNxHD is typically MXF or MOV.





        DNxHR example



        DNxHR is for resolutions bigger than 1080p such as 2K, 4K, and 8K.



        If you want DNxHR then add the -profile output option, such as -profile dnxhr_hq.



        Accepted values are: dnxhd, dnxhr_444, dnxhr_hqx, dnxhr_hq, dnxhr_sq, dnxhr_lb.




        • DNxHR LB: dnxhr_lb - Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.

        • DNxHR SQ: dnxhr_sq - Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.

        • DNxHR HQ: dnxhr_hq - High Quality. 8-bit 4:2:2 (yuv422p).

        • DNxHR HQX: dnxhr_hqx - High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.

        • DNxHR 444: dnxhr_444 - Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.


        The above list was adapted from DNxHR codec.





        Valid DNxHD parameters



        ffmpeg will fail if you provide incorrect values, but it can provide a list of what is accepted.



        You can show the list with the following "dummy" command:



        ffmpeg -f lavfi -i testsrc2 -c:v dnxhd -f null -


        Important Notes about Frame Rate




        • Frame rate is missing from the list that is generated from this command. ffmpeg will blindly accept any frame rate for this encoder, and Avid software will reportedly accept it (unconfirmed), but the DNxHD bitrate is supposed to be matched to specific frame rates only. For maximum compatibility I recommended only using the proper bitrate/frame rate combination. So use the command above to get the proper bitrates and pixel formats accepted by ffmpeg, and cross reference with the List of Avid DNxHD resolutions or the DNxHD White Paper (page 9) for the proper frame rates.



        • The frame rates listed in the links above are using inaccurate rounded approximations. The proper values are listed below; the abbreviated name is to the left and the proper value is to the right.




          • 29.97 = 30000/1001 (or use the alias ntsc)

          • 59.94 = 60000/1001

          • 23.967 = 24000/1001 (or use the alias ntsc-film)






        More options



        For additional encoder specific options, and a list of supported pixel formats, refer to:



        ffmpeg -h encoder=dnxhd




        Errors



        ff_frame_thread_encoder_init failed
        Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
        Conversion failed!


        This means that your frame rate, width, height, pixel format, and/or bitrate are incorrect. Refer to Valid DNxHD parameters above for accepted values.



        pixel format is incompatible with DNxHD profile



        Choose a proper pixel format using the format filter. See the DNxHD example above.






        share|improve this answer















        This is a picky encoder so you have to choose proper parameters including:




        • frame rate

        • pixel format / color space

        • width x height / resolution / frame size

        • bitrate


        See the Valid DNxHD parameters below for accepted values.





        DNxHD example



        This example will scale to 1280x720, choose a frame rate of 30000/1001 (aka "29.97"), and a pixel format of YUV 4:2:2 planar.



        ffmpeg -i input -c:v dnxhd -vf "scale=1280:720,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le output.mov



        • If your input file already conforms to some of the accepted parameters then you don't have to manually declare them.


        • Output format container for DNxHD is typically MXF or MOV.





        DNxHR example



        DNxHR is for resolutions bigger than 1080p such as 2K, 4K, and 8K.



        If you want DNxHR then add the -profile output option, such as -profile dnxhr_hq.



        Accepted values are: dnxhd, dnxhr_444, dnxhr_hqx, dnxhr_hq, dnxhr_sq, dnxhr_lb.




        • DNxHR LB: dnxhr_lb - Low Bandwidth. 8-bit 4:2:2 (yuv422p). Offline Quality.

        • DNxHR SQ: dnxhr_sq - Standard Quality. 8-bit 4:2:2 (yuv422p). Suitable for delivery format.

        • DNxHR HQ: dnxhr_hq - High Quality. 8-bit 4:2:2 (yuv422p).

        • DNxHR HQX: dnxhr_hqx - High Quality. 10-bit 4:2:2 (yuv422p10le). UHD/4K Broadcast-quality delivery.

        • DNxHR 444: dnxhr_444 - Finishing Quality. 10-bit 4:4:4 (yuv444p10le). Cinema-quality delivery.


        The above list was adapted from DNxHR codec.





        Valid DNxHD parameters



        ffmpeg will fail if you provide incorrect values, but it can provide a list of what is accepted.



        You can show the list with the following "dummy" command:



        ffmpeg -f lavfi -i testsrc2 -c:v dnxhd -f null -


        Important Notes about Frame Rate




        • Frame rate is missing from the list that is generated from this command. ffmpeg will blindly accept any frame rate for this encoder, and Avid software will reportedly accept it (unconfirmed), but the DNxHD bitrate is supposed to be matched to specific frame rates only. For maximum compatibility I recommended only using the proper bitrate/frame rate combination. So use the command above to get the proper bitrates and pixel formats accepted by ffmpeg, and cross reference with the List of Avid DNxHD resolutions or the DNxHD White Paper (page 9) for the proper frame rates.



        • The frame rates listed in the links above are using inaccurate rounded approximations. The proper values are listed below; the abbreviated name is to the left and the proper value is to the right.




          • 29.97 = 30000/1001 (or use the alias ntsc)

          • 59.94 = 60000/1001

          • 23.967 = 24000/1001 (or use the alias ntsc-film)






        More options



        For additional encoder specific options, and a list of supported pixel formats, refer to:



        ffmpeg -h encoder=dnxhd




        Errors



        ff_frame_thread_encoder_init failed
        Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
        Conversion failed!


        This means that your frame rate, width, height, pixel format, and/or bitrate are incorrect. Refer to Valid DNxHD parameters above for accepted values.



        pixel format is incompatible with DNxHD profile



        Choose a proper pixel format using the format filter. See the DNxHD example above.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 12 at 19:18

























        answered Apr 21 '17 at 19:21









        lloganllogan

        5,4251737




        5,4251737






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f907398%2fhow-to-convert-a-video-with-ffmpeg-into-the-dnxhd-dnxhr-format%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            File:DeusFollowingSea.jpg