Help with Concatenating Please

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

Help with Concatenating Please

Mark Scott
Hello,
I'm very new to ffmpeg and I don't have much experience using command lines
to encode video.

I need to take an Apple ProRes 4444 file, 1920x1080, 23.98 fps, 16 bit
integer stereo audio,
and encode it to be Apple ProRes 422 HQ 1920X1080, 23.98fps 24bit integer
stereo audio.
The trick is, I need to add 2 seconds of black silent video to the head of
the encoded file. Would this be accomplished by concatenating the original
video file, with a separate video file that has the 2 seconds of black?

I have been using ffmpeg for very basic encoding. I believe this would be a
very complicated command line. I would appreciate any advice.
_______________________________________________
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: Help with Concatenating Please

Jim DeLaHunt-2
Hello, Mark:

Welcome to the ffmpeg-user mailing list. I hope you are able to find out
what you need, and get good use out of *ffmpeg*.

On 2019-04-03 14:01, Mark Scott wrote:
> …I need to add 2 seconds of black silent video to the head of
> the encoded file. Would this be accomplished by concatenating the original
> video file, with a separate video file that has the 2 seconds of black?

That is one way to do it.  A better way is to use the video source
"color" <http://ffmpeg.org/ffmpeg-all.html#color> to generate
solid-colour video of the form you need, at run time. Use the audio
source "aevalsrc" <http://ffmpeg.org/ffmpeg-all.html#aevalsrc> to
generate silence. Then use the video filter "concat"
<http://ffmpeg.org/ffmpeg-all.html#concat-3> to concatenate the video
streams together.

Here is the skeleton of "color" and "concat" in use. (I have not tested
this, and I have discarded audio sources, and this should all be one line):

    ffmpeg -i in.mov -an -filter_complex 'color=black:duration=2.0 [black]; [black] [0:0] concat=n=2:v=1:a=0 [v]'
      -map '[v]' out.mov

On 2019-04-03 14:01, Mark Scott wrote:
> …I need to take an Apple ProRes 4444 file, 1920x1080, 23.98 fps, 16 bit
> integer stereo audio,
> and encode it to be Apple ProRes 422 HQ 1920X1080, 23.98fps 24bit integer
> stereo audio….

Obviously, my skeleton above doesn't do all this.  Have you worked out
how to make *ffmpeg* do the conversion you need from ProRes 4444 to
ProRes 422 HQ?  If so, maybe a good next step is to post the complete,
uncut command line and output which does this conversion to this list.
Maybe someone will be able to help you fold in the "color" and
"aevalsrc" and "concat" filters to that.

On 2019-04-03 14:01, Mark Scott wrote:
> I'm very new to ffmpeg and I don't have much experience using command lines
> to encode video….

Ah. You are in for an adventure, then. *ffmpeg* can do many things, but
"gently introduce people to use of command lines" is not usually one of
them. :-)

I hope this helps!

--
     --Jim DeLaHunt, [hidden email]     http://blog.jdlh.com/ (http://jdlh.com/)
       multilingual websites consultant

       355-1027 Davie St, Vancouver BC V6E 4L2, Canada
          Canada mobile +1-604-376-8953

_______________________________________________
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: Help with Concatenating Please

Carl Zwanzig
On 4/3/2019 4:59 PM, Jim DeLaHunt wrote:
> Ah. You are in for an adventure, then. *ffmpeg* can do many things, but
> "gently introduce people to use of command lines" is not usually one of
> them. :-)

So true...

Mark, you'd do well to closely read the docs about how ffmpeg parses command
lines; there's a lot in there but it can be logically broken down. Don't get
wrapped up in the minutiae of each option, look at how they relate. _Then_
get into the minutiae :D.

Play around with various options and parameter. Once you've done that, ask
questions (include the full command output, use a current build of ffmpeg,
and *please* don't top-post on this list).

z!
_______________________________________________
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: Help with Concatenating Please

Mark Scott
In reply to this post by Jim DeLaHunt-2
Thank you for the Info, Jim. Here's the command line that I use to batch
encode ProRes HQ. My master files are already the correct size and frame
rate, so that info is not included.

mkdir outputs
for f in *.mov; do ffmpeg -i "$f" -c:v prores -profile:v 3 -movflags
+write_colr -c:a pcm_s24le "outputs/${f%.*}.mov"; done

On Wed, Apr 3, 2019 at 6:59 PM Jim DeLaHunt <[hidden email]>
wrote:

> Hello, Mark:
>
> Welcome to the ffmpeg-user mailing list. I hope you are able to find out
> what you need, and get good use out of *ffmpeg*.
>
> On 2019-04-03 14:01, Mark Scott wrote:
> > …I need to add 2 seconds of black silent video to the head of
> > the encoded file. Would this be accomplished by concatenating the
> original
> > video file, with a separate video file that has the 2 seconds of black?
>
> That is one way to do it.  A better way is to use the video source
> "color" <http://ffmpeg.org/ffmpeg-all.html#color> to generate
> solid-colour video of the form you need, at run time. Use the audio
> source "aevalsrc" <http://ffmpeg.org/ffmpeg-all.html#aevalsrc> to
> generate silence. Then use the video filter "concat"
> <http://ffmpeg.org/ffmpeg-all.html#concat-3> to concatenate the video
> streams together.
>
> Here is the skeleton of "color" and "concat" in use. (I have not tested
> this, and I have discarded audio sources, and this should all be one line):
>
>     ffmpeg -i in.mov -an -filter_complex 'color=black:duration=2.0
> [black]; [black] [0:0] concat=n=2:v=1:a=0 [v]'
>       -map '[v]' out.mov
>
> On 2019-04-03 14:01, Mark Scott wrote:
> > …I need to take an Apple ProRes 4444 file, 1920x1080, 23.98 fps, 16 bit
> > integer stereo audio,
> > and encode it to be Apple ProRes 422 HQ 1920X1080, 23.98fps 24bit integer
> > stereo audio….
>
> Obviously, my skeleton above doesn't do all this.  Have you worked out
> how to make *ffmpeg* do the conversion you need from ProRes 4444 to
> ProRes 422 HQ?  If so, maybe a good next step is to post the complete,
> uncut command line and output which does this conversion to this list.
> Maybe someone will be able to help you fold in the "color" and
> "aevalsrc" and "concat" filters to that.
>
> On 2019-04-03 14:01, Mark Scott wrote:
> > I'm very new to ffmpeg and I don't have much experience using command
> lines
> > to encode video….
>
> Ah. You are in for an adventure, then. *ffmpeg* can do many things, but
> "gently introduce people to use of command lines" is not usually one of
> them. :-)
>
> I hope this helps!
>
> --
>      --Jim DeLaHunt, [hidden email]     http://blog.jdlh.com/ (
> http://jdlh.com/)
>        multilingual websites consultant
>
>        355-1027 Davie St, Vancouver BC V6E 4L2, Canada
>           Canada mobile +1-604-376-8953
>
> _______________________________________________
> 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".



--
mark scott | video distribution

1722 routh street
suite 204
dallas, tx 75201
214-922-9222 t
972-740-4734 c
charlieuniformtango.com
_______________________________________________
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: Help with Concatenating Please

Jim DeLaHunt-2
On 2019-04-04 07:58, Mark Scott wrote:

> Thank you for the Info, Jim. Here's the command line that I use to batch
> encode ProRes HQ. My master files are already the correct size and frame
> rate, so that info is not included.
>
> mkdir outputs
> for f in *.mov; do ffmpeg -i "$f" -c:v prores -profile:v 3 -movflags
> +write_colr -c:a pcm_s24le "outputs/${f%.*}.mov"; done
>
> On Wed, Apr 3, 2019 at 6:59 PM Jim DeLaHunt <[hidden email]>
> wrote:
>
>> Hello, Mark:
>>
>> Welcome to the ffmpeg-user mailing list. I hope you are able to find out
>> what you need, and get good use out of *ffmpeg*.

...[snip]...

Let me start with a few social norms on this list. They trip up a lot of
new arrivals, including me when I first posted here. But many of the
main contributors to this list are adamant about them, and they do make
it easier to provide help to *ffmpeg* users efficiently.

First, don't top-post. This is what you did when you replied to the
list, putting your reply first, then the preceding message below it.
This list does not want top-posting.  Instead, bottom-post. This what I
did. Put in the preceding messages first, edited to include just the
relevant parts, then put in your reply.

For more on not top-posting, see
<https://ffmpeg.org/mailing-list-faq.html#What-is-top_002dposting_003f-1>.

Yes, many mail clients format replies as top-posts by default. Mine is
one of them. Yes, it is more work to make a bottom-post reply on such
mail clients. Yes, it will take you more time. But: it will save time
for everyone who reads your message, and many readers saved time
outweighs one author inconvenienced. It results in a more readable
thread in each message: instead of 3, 2, 1, the message reads 1, 2, 3.

Second, strip your command line down to just the *ffmpeg* part. You
posted a *for ... done* loop as well. Don't ask us to support that. Just
make a simple *ffmpeg* invocation, with static filenames for input and
output.

Third, in case you haven't done so, read the FFmpeg Mailing List FAQ
<https://ffmpeg.org/mailing-list-faq.html>.

With that out of the way, now we can move on to helping you with leading
black video.

Maybe it would help for you to attempt to combine what you learned about
"concat" and "color" from the links I posted with your existing command
line, then have your next message be a (bottom-posted) reply with your
best attempt at using "concat" and "color" in your command line?

Best regards,
        —Jim DeLaHunt, Vancouver, Canada

--
     --Jim DeLaHunt, [hidden email]     http://blog.jdlh.com/ (http://jdlh.com/)
       multilingual websites consultant

       355-1027 Davie St, Vancouver BC V6E 4L2, Canada
          Canada mobile +1-604-376-8953

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