Stream specifier ':a' in filtergraph Error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Stream specifier ':a' in filtergraph Error

FFmpeg-users mailing list
Hello,

When running the following command:

```
ffmpeg \
-loop 1 -framerate 30 -t 1.4 -i /assets/img/filler640480.jpg -i 0d.mp4 -
y \
-loop 1 -framerate 30 -t 891.113 -i /assets/img/filler640480.jpg -i
9f.mp4 -y \
-f lavfi -t 0.1 -i anullsrc=channel_layout=mono:sample_rate=48000 \
-filter_complex "
[0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1"
-vsync 2 -vcodec libx264 -pix_fmt yuv420p 0245-grid.mp4

```

I am getting the following error:

```
Stream specifier ':a' in filtergraph description 
[0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1
matches no streams.
```

This only happens on some video processing not all, cannot seem to
figure out why.

Thank You,

Randy
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Stream specifier ':a' in filtergraph Error

Michael Koch
Am 10.11.2020 um 22:27 schrieb Randy Johnson via ffmpeg-user:

> Hello,
>
> When running the following command:
>
> ```
> ffmpeg \
> -loop 1 -framerate 30 -t 1.4 -i /assets/img/filler640480.jpg -i 0d.mp4 -
> y \
> -loop 1 -framerate 30 -t 891.113 -i /assets/img/filler640480.jpg -i
> 9f.mp4 -y \
> -f lavfi -t 0.1 -i anullsrc=channel_layout=mono:sample_rate=48000 \
> -filter_complex "
> [0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1"
> -vsync 2 -vcodec libx264 -pix_fmt yuv420p 0245-grid.mp4
>
> ```
>
> I am getting the following error:
>
> ```
> Stream specifier ':a' in filtergraph description
> [0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1
> matches no streams.
> ```
>
> This only happens on some video processing not all, cannot seem to
> figure out why.

You could check those videos with FFprobe. May be they have no audio
stream, or something else is different.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Stream specifier ':a' in filtergraph Error

andrei ka
>
> You could check those videos with FFprobe. May be they have no audio
> stream, or something else is different.
>

ffmpeg would be enuf, ffmpeg would list all the tracks in input files
before starting transco, on failure dude should just check his first
20lines of log to see if mp4 have snd tracks...
&re

&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Stream specifier ':a' in filtergraph Error

Nicolas George
andrei ka (12020-11-11):
> ffmpeg would be enuf, ffmpeg would list all the tracks in input files
> before starting transco, on failure dude should just check his first
> 20lines of log to see if mp4 have snd tracks...

Bad advice. The log output of ffmpeg is not meant to be parsed by an
application. The fact that it goes to stderr should be a hint. In
particular, there are no promises that the syntax of the list of streams
will be kept constant.

ffprobe is the right tool for this, because the output is guaranteed to
be stable.

Regards,

--
  Nicolas George

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Stream specifier ':a' in filtergraph Error

Jim DeLaHunt-2
In reply to this post by FFmpeg-users mailing list

On 2020-11-10 13:27, Randy Johnson via ffmpeg-user wrote:

> When running the following command:
>
> ```
> ffmpeg \
> -loop 1 -framerate 30 -t 1.4 -i /assets/img/filler640480.jpg -i 0d.mp4 -
> y \
> -loop 1 -framerate 30 -t 891.113 -i /assets/img/filler640480.jpg -i
> 9f.mp4 -y \
> -f lavfi -t 0.1 -i anullsrc=channel_layout=mono:sample_rate=48000 \
> -filter_complex "
> [0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1"
> -vsync 2 -vcodec libx264 -pix_fmt yuv420p 0245-grid.mp4
>
> ```
>
> I am getting the following error:
>
> ```
> Stream specifier ':a' in filtergraph description
> [0:v]setsar=1[v0];[2:v]setsar=1[v1];[v0][4:a][1:v][1:a][v1][4:a][3:v][3:a]concat=n=4:v=1:a=1
> matches no streams.
> ```
>
> This only happens on some video processing not all, cannot seem to
> figure out why.


I agree with Michael Koch's earlier answer, but let me try to explain
what FFmpeg is trying to tell you.

Within a video file, each sequence of video images, and each audio
channel, is a stream. Some files might have a single video stream and a
two audio streams (stereo sound). Some might have a video stream and one
audio stream (monophonic sound). Some might have a video stream and no
audio stream at all (silent video).

Your complex filter operates on multiple streams, in parallel. Those
notations "1:v", "4:a" are _stream specifiers_. The documentation of
stream specifiers is at
<http://ffmpeg.org/ffmpeg-all.html#Stream-specifiers-1>.

FFmpeg gives you an error message, "Stream specifier ':a' in filtergraph
description … matches no streams."  ":a" is a stream specifier for an
audio stream (see the documentation, under "stream_type"). Look in the
"[0:v]setsar"…"concat=n=4:v=1:a=1" code — that is your filtergraph
description — for stream specifiers ending in ":a". Those are what
FFmpeg cannot match to a stream in the input files.

As Andrei Ka points out, you can look in the FFmpeg output for a
description of what streams FFmpeg finds in the input files. I suspect
that in the cases where your invocation succeeds, FFmpeg will tell you
that each of the input files has an audio stream. In the cases where
your invocation fails, FFmpeg will tell you that at least one of the
input files has no audio stream.

If it is the case that some of your files have no audio streams, then
you have two basic choices:

1. Generate an FFmpeg invocation tailored to the details of your input
files. Don't generate instructions to concatenate audio streams for
files which have none, but do generate for files which do have audio.

2. Generate a more elaborate FFmpeg invocation which will generate
silent audio streams for input files which have none. The details of
this should be in a separate thread with a separate Subject: line.

I hope this is helpful,
        —Jim DeLaHunt, software engineer, Vancouver Canada


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Add a silent audio stream if no audio stream exists

Michael Koch
Am 11.11.2020 um 21:59 schrieb Jim DeLaHunt:
>
> 2. Generate a more elaborate FFmpeg invocation which will generate
> silent audio streams for input files which have none. The details of
> this should be in a separate thread with a separate Subject: line.
>

That's an interesting question. Can this be done in one command line?
If the input video has an audio stream, then leave it as it is. If no
audio stream exists, then add silent audio.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".