How to split and concat video using FFmpeg












0















I am having issues running this command. I am trying to split, concat and create an .mp4 output but keep getting this error:



Stream specifier ':a:0' in filtergraph description [0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1] matches no streams.



The command itself is:



ffmpeg -y -f mxf -i 158907_019_1790823_1.mxf -filter_complex "[0:v]yadif,split=2[out1][out2]" -filter_complex "[0:v]yadif,split=2[out1][out2]" -map "[out1]" -filter_complex "[0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; 
[0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1]" -map "[out_1]" -r 29.97 output_1.mp4 -map "[out2]" -filter_complex "[0:v]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v0.1];
[0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.1];
[0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1]
[a0.2]concat=n=1:v=1:a=2[out_2]" -map "[out_2]" -c:v prores_ks -profile:v 3 output_2.mp4









share|improve this question





























    0















    I am having issues running this command. I am trying to split, concat and create an .mp4 output but keep getting this error:



    Stream specifier ':a:0' in filtergraph description [0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1] matches no streams.



    The command itself is:



    ffmpeg -y -f mxf -i 158907_019_1790823_1.mxf -filter_complex "[0:v]yadif,split=2[out1][out2]" -filter_complex "[0:v]yadif,split=2[out1][out2]" -map "[out1]" -filter_complex "[0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; 
    [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1]" -map "[out_1]" -r 29.97 output_1.mp4 -map "[out2]" -filter_complex "[0:v]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v0.1];
    [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.1];
    [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1]
    [a0.2]concat=n=1:v=1:a=2[out_2]" -map "[out_2]" -c:v prores_ks -profile:v 3 output_2.mp4









    share|improve this question



























      0












      0








      0


      0






      I am having issues running this command. I am trying to split, concat and create an .mp4 output but keep getting this error:



      Stream specifier ':a:0' in filtergraph description [0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1] matches no streams.



      The command itself is:



      ffmpeg -y -f mxf -i 158907_019_1790823_1.mxf -filter_complex "[0:v]yadif,split=2[out1][out2]" -filter_complex "[0:v]yadif,split=2[out1][out2]" -map "[out1]" -filter_complex "[0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; 
      [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1]" -map "[out_1]" -r 29.97 output_1.mp4 -map "[out2]" -filter_complex "[0:v]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v0.1];
      [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.1];
      [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1]
      [a0.2]concat=n=1:v=1:a=2[out_2]" -map "[out_2]" -c:v prores_ks -profile:v 3 output_2.mp4









      share|improve this question
















      I am having issues running this command. I am trying to split, concat and create an .mp4 output but keep getting this error:



      Stream specifier ':a:0' in filtergraph description [0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1] matches no streams.



      The command itself is:



      ffmpeg -y -f mxf -i 158907_019_1790823_1.mxf -filter_complex "[0:v]yadif,split=2[out1][out2]" -filter_complex "[0:v]yadif,split=2[out1][out2]" -map "[out1]" -filter_complex "[0:v]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v0.1]; [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.1]; 
      [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1] [a0.2]concat=n=1:v=1:a=2[out_1]" -map "[out_1]" -r 29.97 output_1.mp4 -map "[out2]" -filter_complex "[0:v]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v0.1];
      [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.1];
      [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[a0.2]; [v0.1][a0.1]
      [a0.2]concat=n=1:v=1:a=2[out_2]" -map "[out_2]" -c:v prores_ks -profile:v 3 output_2.mp4






      ffmpeg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 31 at 0:13









      JakeGould

      32.4k1098142




      32.4k1098142










      asked Jan 31 at 0:03









      JimJim

      1




      1






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Your input may not contain two audio streams



          Without the complete log from your command I can only speculate, but I assume this is the reason for "Stream specifier ':a:0' in filtergraph description...matches no streams".



          Do all filtering in one filtergraph



          Otherwise the input/output labeling gets messy, mistakes or errors are more likely, and whole filtergraphs may get ignored.



          MP4 does not support ProRes



          Output to .mov instead of .mp4.





          Example



          ffmpeg -y -i 158907_019_1790823_1.mxf -filter_complex 
          "[0:v]yadif,fps=ntsc,split=2[y1][y2];
          [y1]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v1];
          [y2]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v2];
          [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a1];
          [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a2];
          [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b1];
          [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b2];
          [v1][a1][a2]concat=n=1:v=1:a=2[out_v1][out_a1][out_a2];
          [v2][b1][b2]concat=n=1:v=1:a=2[out_v2][out_b1][out_b2]"
          -map "[out_v1]" -map "[out_a1]" -map "[out_a2]" output_1.mp4
          -map "[out_v2]" -map "[out_b1]" -map "[out_b2]" -c:v prores_ks -profile:v 3 output_2.mov





          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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%2fsuperuser.com%2fquestions%2f1400331%2fhow-to-split-and-concat-video-using-ffmpeg%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









            0














            Your input may not contain two audio streams



            Without the complete log from your command I can only speculate, but I assume this is the reason for "Stream specifier ':a:0' in filtergraph description...matches no streams".



            Do all filtering in one filtergraph



            Otherwise the input/output labeling gets messy, mistakes or errors are more likely, and whole filtergraphs may get ignored.



            MP4 does not support ProRes



            Output to .mov instead of .mp4.





            Example



            ffmpeg -y -i 158907_019_1790823_1.mxf -filter_complex 
            "[0:v]yadif,fps=ntsc,split=2[y1][y2];
            [y1]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v1];
            [y2]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v2];
            [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a1];
            [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a2];
            [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b1];
            [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b2];
            [v1][a1][a2]concat=n=1:v=1:a=2[out_v1][out_a1][out_a2];
            [v2][b1][b2]concat=n=1:v=1:a=2[out_v2][out_b1][out_b2]"
            -map "[out_v1]" -map "[out_a1]" -map "[out_a2]" output_1.mp4
            -map "[out_v2]" -map "[out_b1]" -map "[out_b2]" -c:v prores_ks -profile:v 3 output_2.mov





            share|improve this answer




























              0














              Your input may not contain two audio streams



              Without the complete log from your command I can only speculate, but I assume this is the reason for "Stream specifier ':a:0' in filtergraph description...matches no streams".



              Do all filtering in one filtergraph



              Otherwise the input/output labeling gets messy, mistakes or errors are more likely, and whole filtergraphs may get ignored.



              MP4 does not support ProRes



              Output to .mov instead of .mp4.





              Example



              ffmpeg -y -i 158907_019_1790823_1.mxf -filter_complex 
              "[0:v]yadif,fps=ntsc,split=2[y1][y2];
              [y1]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v1];
              [y2]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v2];
              [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a1];
              [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a2];
              [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b1];
              [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b2];
              [v1][a1][a2]concat=n=1:v=1:a=2[out_v1][out_a1][out_a2];
              [v2][b1][b2]concat=n=1:v=1:a=2[out_v2][out_b1][out_b2]"
              -map "[out_v1]" -map "[out_a1]" -map "[out_a2]" output_1.mp4
              -map "[out_v2]" -map "[out_b1]" -map "[out_b2]" -c:v prores_ks -profile:v 3 output_2.mov





              share|improve this answer


























                0












                0








                0







                Your input may not contain two audio streams



                Without the complete log from your command I can only speculate, but I assume this is the reason for "Stream specifier ':a:0' in filtergraph description...matches no streams".



                Do all filtering in one filtergraph



                Otherwise the input/output labeling gets messy, mistakes or errors are more likely, and whole filtergraphs may get ignored.



                MP4 does not support ProRes



                Output to .mov instead of .mp4.





                Example



                ffmpeg -y -i 158907_019_1790823_1.mxf -filter_complex 
                "[0:v]yadif,fps=ntsc,split=2[y1][y2];
                [y1]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v1];
                [y2]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v2];
                [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a1];
                [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a2];
                [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b1];
                [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b2];
                [v1][a1][a2]concat=n=1:v=1:a=2[out_v1][out_a1][out_a2];
                [v2][b1][b2]concat=n=1:v=1:a=2[out_v2][out_b1][out_b2]"
                -map "[out_v1]" -map "[out_a1]" -map "[out_a2]" output_1.mp4
                -map "[out_v2]" -map "[out_b1]" -map "[out_b2]" -c:v prores_ks -profile:v 3 output_2.mov





                share|improve this answer













                Your input may not contain two audio streams



                Without the complete log from your command I can only speculate, but I assume this is the reason for "Stream specifier ':a:0' in filtergraph description...matches no streams".



                Do all filtering in one filtergraph



                Otherwise the input/output labeling gets messy, mistakes or errors are more likely, and whole filtergraphs may get ignored.



                MP4 does not support ProRes



                Output to .mov instead of .mp4.





                Example



                ffmpeg -y -i 158907_019_1790823_1.mxf -filter_complex 
                "[0:v]yadif,fps=ntsc,split=2[y1][y2];
                [y1]trim=1:130.5421184320267,setpts=PTS-STARTPTS[v1];
                [y2]trim=1:190.5421184320267,setpts=PTS-STARTPTS[v2];
                [0:a:0]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a1];
                [0:a:1]atrim=1:130.5421184320267,asetpts=PTS-STARTPTS[a2];
                [0:a:0]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b1];
                [0:a:1]atrim=130:190.5421184320267,asetpts=PTS-STARTPTS[b2];
                [v1][a1][a2]concat=n=1:v=1:a=2[out_v1][out_a1][out_a2];
                [v2][b1][b2]concat=n=1:v=1:a=2[out_v2][out_b1][out_b2]"
                -map "[out_v1]" -map "[out_a1]" -map "[out_a2]" output_1.mp4
                -map "[out_v2]" -map "[out_b1]" -map "[out_b2]" -c:v prores_ks -profile:v 3 output_2.mov






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 31 at 3:02









                lloganllogan

                26.4k54883




                26.4k54883






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1400331%2fhow-to-split-and-concat-video-using-ffmpeg%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

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...