combining concat filter with closed caption extraction

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

combining concat filter with closed caption extraction

FFmpeg-users mailing list
Currently, the only way I know to extract/insert closed captions as a
subtitle stream is in 2 passes. Something like

ffmpeg -i A.ts -i B.ts -filter_complex '[0:0][0:1][1:0][1:1]
concat=n=2:v=1:a=1' C.mkv

ffmpeg -i C.mkv -f lavfi 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv

(In practice, A.ts and B.ts are segments from the same file).

Question: Is there a way to reduce this to one pass?

I am using a recent version of ffmpeg compiled from the git repository.

---

It may seem odd to want to convert the closed captions to a subtitle
stream, but in my use case, the subtitles are easier to read than the
closed captions.

Leo

_______________________________________________
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: combining concat filter with closed caption extraction

Nicolas George
Leo Butler via ffmpeg-user (12020-06-10):
> ffmpeg -i C.mkv -f lavfi 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv

You are missing a -i in this command line.

> Question: Is there a way to reduce this to one pass?

With the -i, it becomes obvious: 'movie=C.mkv[out0+subcc]' is just
another input, like B.ts.

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: combining concat filter with closed caption extraction

Bernd Eller
Of course I have forget it in the post...(-i)
I will figure out if I can copy the encoder setting..


Von meinem iPhone gesendet

> Am 11.06.2020 um 10:11 schrieb Nicolas George <[hidden email]>:
>
> Leo Butler via ffmpeg-user (12020-06-10):
>> ffmpeg -i C.mkv -f lavfi 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv
>
> You are missing a -i in this command line.
>
>> Question: Is there a way to reduce this to one pass?
>
> With the -i, it becomes obvious: 'movie=C.mkv[out0+subcc]' is just
> another input, like B.ts.
>
> 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".
_______________________________________________
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: combining concat filter with closed caption extraction

FFmpeg-users mailing list
In reply to this post by Nicolas George
Nicolas George <[hidden email]> writes:

> Leo Butler via ffmpeg-user (12020-06-10):
>> ffmpeg -i C.mkv -f lavfi 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv
>
> You are missing a -i in this command line.
>
>> Question: Is there a way to reduce this to one pass?
>
> With the -i, it becomes obvious: 'movie=C.mkv[out0+subcc]' is just
> another input, like B.ts.
>
> Regards,

Sorry, yes there is a syntax error in my question, but no, that is
irrelevant to my question. Let me repeat the question (with the syntax
error corrected):

  Currently, the only way I know to extract/insert closed captions as a
  subtitle stream is in 2 passes. Something like
 
  ffmpeg -i A.ts -i B.ts -filter_complex '[0:0][0:1][1:0][1:1]
  concat=n=2:v=1:a=1' C.mkv
 
  ffmpeg -i C.mkv -f lavfi -i 'movie=C.mkv[out0+subcc]' -map 0 -map 1:s D.mkv
 
  (In practice, A.ts and B.ts are segments from the same file).
 
  Question: Is there a way to reduce this to one pass?
 
  I am using a recent version of ffmpeg compiled from the git repository.

To be more explicit:

Rather than creating the file C.mkv in the first pass, can the lavfi
filter use the video output stream of the concat filter directly?

Leo
_______________________________________________
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: combining concat filter with closed caption extraction

Nicolas George
Please do not Cc me and heed reply-to headers.

Leo Butler (12020-06-11):
> Sorry, yes there is a syntax error in my question, but no, that is
> irrelevant to my question.

It is technically irrelevant, but the syntax error prevents you from
seeing the obvious answer.

> Rather than creating the file C.mkv in the first pass, can the lavfi
> filter use the video output stream of the concat filter directly?

My answer is the same: 'movie=C.mkv[out0+subcc]' is just another input,
like B.ts. You can see that because they both have -i in from of them:
they are the same.

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: combining concat filter with closed caption extraction

FFmpeg-users mailing list
Nicolas George <[hidden email]> writes:

>> Rather than creating the file C.mkv in the first pass, can the lavfi
>> filter use the video output stream of the concat filter directly?
>
> My answer is the same: 'movie=C.mkv[out0+subcc]' is just another input,
> like B.ts. You can see that because they both have -i in from of them:
> they are the same.

So the `obvious' answer is no: ffmpeg cannot/does not use an output
stream from a filter as an input in this fashion? If the answer is so
obvious, why not just write one word instead of many?

----

I am still not clear about the documentation for the movie source
(https://ffmpeg.org/ffmpeg-all.html#toc-movie-1). The description of

filename

    The name of the resource to read (not necessarily a file; it can
    also be a device or a stream accessed through some protocol).
   
leaves it open in my mind if `a stream' might be an output stream
produced by a filter.

Leo
_______________________________________________
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: combining concat filter with closed caption extraction

Nicolas George
Leo Butler via ffmpeg-user (12020-06-12):

> Nicolas George <[hidden email]> writes:
>
> >> Rather than creating the file C.mkv in the first pass, can the lavfi
> >> filter use the video output stream of the concat filter directly?
> >
> > My answer is the same: 'movie=C.mkv[out0+subcc]' is just another input,
> > like B.ts. You can see that because they both have -i in from of them:
> > they are the same.
>
> So the `obvious' answer is no: ffmpeg cannot/does not use an output
> stream from a filter as an input in this fashion? If the answer is so
> obvious, why not just write one word instead of many?
I just told you it does not need to “use it like” an input because it
***IS*** an input.

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: combining concat filter with closed caption extraction

FFmpeg-users mailing list
Nicolas George <[hidden email]> writes:

> I just told you it does not need to “use it like” an input because it
> ***IS*** an input.

Thank you for your heat, if not light.

Leo
_______________________________________________
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".