ffmpeg matches no streams











up vote
0
down vote

favorite












I'm trying to make complex filters with fluent ffmpeg work, but getting the error:




Stream specifier 'pts' in filtergraph description
[0:v]setpts=0.3333333333333333*PTS[pts];[pts]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];[pts]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];[left][right]hstack=inputs=2[orientated];[1:v]scale=3456:1728[hs1];[hs1]colorkey=0x00ff00:0.8:0.1[hs1x];[orientated][hs1x]overlay[out]
matches no streams.




This is how I'm trying to build the filter



     const filter = 

let init = '[0:v]'

if(node.video.playBackRate){

filter.push({filter: 'setpts',options: 1/node.video.playBackRate+'*PTS', inputs: init, outputs: '[pts]'})
init = '[pts]'
}

if(node.scene && node.scene.cameraDefault){
const theta = JSON.parse(node.scene.cameraDefault).rotationY
const per = height * (theta/180)
const left = height + per
const right = height - per

filter.push({filter: 'crop',options: {out_w: left, out_h: height, x: 0, y: 0}, inputs: init, outputs: '[left]'})
filter.push({filter: 'crop',options: {out_w: right, out_h: height, x: left, y: 0}, inputs: init, outputs: '[right]'})

filter.push({filter: 'hstack',options: {inputs : 2}, inputs: ['[left]','[right]'], outputs: '[orientated]'})
init = '[orientated]'
}

if(node.hotspots){

const overlays = [init]

node.hotspots.forEach((hotspot, index) => {
if(hotspot.render){

const options = {}

if(hotspot.startTime)
options['-ss'] = hotspot.startTime

if(hotspot.endTime)
options['-t'] = hotspot.endTime - (hotspot.startTime || 0)

node.ffmpeg.addInput(dir + '/' + hotspot.render)//.withInputOptions(options)

filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index + 1}:v]`, outputs: `[hs${index+1}]`})
filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}]`, outputs: `[hs${index+1}x]`})
overlays.push(`[hs${index+1}x]`)
}
})

filter.push({filter: 'overlay', inputs: overlays, outputs: '[out]'})
}

node.ffmpeg.complexFilter(filter, '[out]')


Where am I going wrong?



I assume it's the right hand crop filter.. I need to somehow run those filters with the same input..










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm trying to make complex filters with fluent ffmpeg work, but getting the error:




    Stream specifier 'pts' in filtergraph description
    [0:v]setpts=0.3333333333333333*PTS[pts];[pts]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];[pts]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];[left][right]hstack=inputs=2[orientated];[1:v]scale=3456:1728[hs1];[hs1]colorkey=0x00ff00:0.8:0.1[hs1x];[orientated][hs1x]overlay[out]
    matches no streams.




    This is how I'm trying to build the filter



         const filter = 

    let init = '[0:v]'

    if(node.video.playBackRate){

    filter.push({filter: 'setpts',options: 1/node.video.playBackRate+'*PTS', inputs: init, outputs: '[pts]'})
    init = '[pts]'
    }

    if(node.scene && node.scene.cameraDefault){
    const theta = JSON.parse(node.scene.cameraDefault).rotationY
    const per = height * (theta/180)
    const left = height + per
    const right = height - per

    filter.push({filter: 'crop',options: {out_w: left, out_h: height, x: 0, y: 0}, inputs: init, outputs: '[left]'})
    filter.push({filter: 'crop',options: {out_w: right, out_h: height, x: left, y: 0}, inputs: init, outputs: '[right]'})

    filter.push({filter: 'hstack',options: {inputs : 2}, inputs: ['[left]','[right]'], outputs: '[orientated]'})
    init = '[orientated]'
    }

    if(node.hotspots){

    const overlays = [init]

    node.hotspots.forEach((hotspot, index) => {
    if(hotspot.render){

    const options = {}

    if(hotspot.startTime)
    options['-ss'] = hotspot.startTime

    if(hotspot.endTime)
    options['-t'] = hotspot.endTime - (hotspot.startTime || 0)

    node.ffmpeg.addInput(dir + '/' + hotspot.render)//.withInputOptions(options)

    filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index + 1}:v]`, outputs: `[hs${index+1}]`})
    filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}]`, outputs: `[hs${index+1}x]`})
    overlays.push(`[hs${index+1}x]`)
    }
    })

    filter.push({filter: 'overlay', inputs: overlays, outputs: '[out]'})
    }

    node.ffmpeg.complexFilter(filter, '[out]')


    Where am I going wrong?



    I assume it's the right hand crop filter.. I need to somehow run those filters with the same input..










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to make complex filters with fluent ffmpeg work, but getting the error:




      Stream specifier 'pts' in filtergraph description
      [0:v]setpts=0.3333333333333333*PTS[pts];[pts]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];[pts]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];[left][right]hstack=inputs=2[orientated];[1:v]scale=3456:1728[hs1];[hs1]colorkey=0x00ff00:0.8:0.1[hs1x];[orientated][hs1x]overlay[out]
      matches no streams.




      This is how I'm trying to build the filter



           const filter = 

      let init = '[0:v]'

      if(node.video.playBackRate){

      filter.push({filter: 'setpts',options: 1/node.video.playBackRate+'*PTS', inputs: init, outputs: '[pts]'})
      init = '[pts]'
      }

      if(node.scene && node.scene.cameraDefault){
      const theta = JSON.parse(node.scene.cameraDefault).rotationY
      const per = height * (theta/180)
      const left = height + per
      const right = height - per

      filter.push({filter: 'crop',options: {out_w: left, out_h: height, x: 0, y: 0}, inputs: init, outputs: '[left]'})
      filter.push({filter: 'crop',options: {out_w: right, out_h: height, x: left, y: 0}, inputs: init, outputs: '[right]'})

      filter.push({filter: 'hstack',options: {inputs : 2}, inputs: ['[left]','[right]'], outputs: '[orientated]'})
      init = '[orientated]'
      }

      if(node.hotspots){

      const overlays = [init]

      node.hotspots.forEach((hotspot, index) => {
      if(hotspot.render){

      const options = {}

      if(hotspot.startTime)
      options['-ss'] = hotspot.startTime

      if(hotspot.endTime)
      options['-t'] = hotspot.endTime - (hotspot.startTime || 0)

      node.ffmpeg.addInput(dir + '/' + hotspot.render)//.withInputOptions(options)

      filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index + 1}:v]`, outputs: `[hs${index+1}]`})
      filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}]`, outputs: `[hs${index+1}x]`})
      overlays.push(`[hs${index+1}x]`)
      }
      })

      filter.push({filter: 'overlay', inputs: overlays, outputs: '[out]'})
      }

      node.ffmpeg.complexFilter(filter, '[out]')


      Where am I going wrong?



      I assume it's the right hand crop filter.. I need to somehow run those filters with the same input..










      share|improve this question













      I'm trying to make complex filters with fluent ffmpeg work, but getting the error:




      Stream specifier 'pts' in filtergraph description
      [0:v]setpts=0.3333333333333333*PTS[pts];[pts]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];[pts]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];[left][right]hstack=inputs=2[orientated];[1:v]scale=3456:1728[hs1];[hs1]colorkey=0x00ff00:0.8:0.1[hs1x];[orientated][hs1x]overlay[out]
      matches no streams.




      This is how I'm trying to build the filter



           const filter = 

      let init = '[0:v]'

      if(node.video.playBackRate){

      filter.push({filter: 'setpts',options: 1/node.video.playBackRate+'*PTS', inputs: init, outputs: '[pts]'})
      init = '[pts]'
      }

      if(node.scene && node.scene.cameraDefault){
      const theta = JSON.parse(node.scene.cameraDefault).rotationY
      const per = height * (theta/180)
      const left = height + per
      const right = height - per

      filter.push({filter: 'crop',options: {out_w: left, out_h: height, x: 0, y: 0}, inputs: init, outputs: '[left]'})
      filter.push({filter: 'crop',options: {out_w: right, out_h: height, x: left, y: 0}, inputs: init, outputs: '[right]'})

      filter.push({filter: 'hstack',options: {inputs : 2}, inputs: ['[left]','[right]'], outputs: '[orientated]'})
      init = '[orientated]'
      }

      if(node.hotspots){

      const overlays = [init]

      node.hotspots.forEach((hotspot, index) => {
      if(hotspot.render){

      const options = {}

      if(hotspot.startTime)
      options['-ss'] = hotspot.startTime

      if(hotspot.endTime)
      options['-t'] = hotspot.endTime - (hotspot.startTime || 0)

      node.ffmpeg.addInput(dir + '/' + hotspot.render)//.withInputOptions(options)

      filter.push({filter: 'scale', options: `${width}:${height}`, inputs: `[${index + 1}:v]`, outputs: `[hs${index+1}]`})
      filter.push({filter: 'colorkey', options: '0x00ff00:0.8:0.1', inputs: `[hs${index+1}]`, outputs: `[hs${index+1}x]`})
      overlays.push(`[hs${index+1}x]`)
      }
      })

      filter.push({filter: 'overlay', inputs: overlays, outputs: '[out]'})
      }

      node.ffmpeg.complexFilter(filter, '[out]')


      Where am I going wrong?



      I assume it's the right hand crop filter.. I need to somehow run those filters with the same input..







      video ffmpeg






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 16 at 3:21









      beek

      132116




      132116






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Don't know the syntax of fluent-ffmpeg, but I can identify the issue, You can't reuse filter outputs generated within the filtergraph. The method needed is to split the output, so the initial part of the filtergraph would look like this,



          [0:v]setpts=0.3333333333333333*PTS,split=2[pts1][pts2];
          [pts1]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];
          [pts2]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];





          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',
            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%2f1375877%2fffmpeg-matches-no-streams%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








            up vote
            0
            down vote



            accepted










            Don't know the syntax of fluent-ffmpeg, but I can identify the issue, You can't reuse filter outputs generated within the filtergraph. The method needed is to split the output, so the initial part of the filtergraph would look like this,



            [0:v]setpts=0.3333333333333333*PTS,split=2[pts1][pts2];
            [pts1]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];
            [pts2]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];





            share|improve this answer

























              up vote
              0
              down vote



              accepted










              Don't know the syntax of fluent-ffmpeg, but I can identify the issue, You can't reuse filter outputs generated within the filtergraph. The method needed is to split the output, so the initial part of the filtergraph would look like this,



              [0:v]setpts=0.3333333333333333*PTS,split=2[pts1][pts2];
              [pts1]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];
              [pts2]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];





              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Don't know the syntax of fluent-ffmpeg, but I can identify the issue, You can't reuse filter outputs generated within the filtergraph. The method needed is to split the output, so the initial part of the filtergraph would look like this,



                [0:v]setpts=0.3333333333333333*PTS,split=2[pts1][pts2];
                [pts1]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];
                [pts2]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];





                share|improve this answer












                Don't know the syntax of fluent-ffmpeg, but I can identify the issue, You can't reuse filter outputs generated within the filtergraph. The method needed is to split the output, so the initial part of the filtergraph would look like this,



                [0:v]setpts=0.3333333333333333*PTS,split=2[pts1][pts2];
                [pts1]crop=out_w=3381.4186868767238:out_h=1728:x=0:y=0[left];
                [pts2]crop=out_w=74.58131312327646:out_h=1728:x=3381.4186868767238:y=0[right];






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 at 5:27









                Gyan

                13.8k21641




                13.8k21641






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375877%2fffmpeg-matches-no-streams%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

                    Brian Clough

                    Cáceres