[FFmpeg-user] R: R: Generete one second of black video and relative silence audio with the same duration

Gian Maria Allibrante chanof at hotmail.com
Sun Jan 26 03:18:50 EET 2020


Due to
"Related streams do not always have exactly the same duration, for various reasons including codec frame size or sloppy authoring. For that reason, related synchronized streams (e.g. a video and its audio track) should be concatenated at once. The concat filter will use the duration of the longest stream in each segment (except the last one), and if necessary pad shorter audio streams with silence."
FFmpeg documentation

Concat filter process result in different format container duration with tha same input videos depending on the order of concatenation.

So my guess is to insert a final segment with rounded duration for format cantainer and stream to produce a result as i need for my purpose.

Generating a FLAC black/silent video is precise/rounded without  "side_data_type=Skip Samples" segment, i ask if it's possible get the same result with AAC or MP3

Am i totally out of the road?
If yes sorry.
Gian

________________________________
Da: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> per conto di Richard Mikesell <richard.mikesell at gmail.com>
Inviato: sabato 25 gennaio 2020 23:53
A: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
Oggetto: Re: [FFmpeg-user] R: Generete one second of black video and relative silence audio with the same duration

unsubscribe


Richard Mikesell


On Sat, Jan 25, 2020 at 4:20 PM Gian Maria Allibrante <chanof at hotmail.com>
wrote:

> Thanks Moritz, sorry for the confusion, may ask:
>
>   *   How to remove this audio packet? (i need this trick to concatenate
> videos with total duration multiple of the GOP destined to infinite mpeg
> dash pseudo live loop, mp4box will fail after some cycles with this
> duration dicrepance, it's unable to skip it)
>   *   How you see this information: side_data_type=Skip Samples etc.
>
> Gian
>
> ________________________________
> Da: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> per conto di Moritz
> Barsnick <barsnick at gmx.net>
> Inviato: sabato 25 gennaio 2020 22:53
> A: FFmpeg user discussions <ffmpeg-user at ffmpeg.org>
> Oggetto: Re: [FFmpeg-user] Generete one second of black video and relative
> silence audio with the same duration
>
> On Sat, Jan 25, 2020 at 22:26:31 +0000, Gian Maria Allibrante wrote:
> > Hi Moritz, thanks for reply, this one, im always unable to get round
> match duration:
> >
> > echo VIDEO FORMAT CONTAINER DURATION:
> > ffprobe -v error -show_entries format=duration \
> >   -of default=noprint_wrappers=1:nokey=1 output.mp4
> > echo VIDEO STREAM DURATION:
> > ffprobe -v error -select_streams v:0 -show_entries stream=duration \
> >   -of default=noprint_wrappers=1:nokey=1 output.mp4
>
> Ah, I think I understand now. You are trying to get the same duration
> from the container as from the video stream.
>
> Honestly, I was looking for a totally different problem:
>
> > > VIDEO FORMAT CONTAINER DURATION: 3.026000
> > > VIDEO STREAM DURATION: 3.000000
>
> You showed us *three* seconds results, not one second. This totally
> distracted from your actual issue! ;-)
>
> Regarding the approx 0.026 extra seconds:
> For some reason, ffmpeg creates an additional initial audio packet,
> marked with
> side_data_type=Skip Samples
> skip_samples=1105
>
> If those initial samples are skipped, the total length is exactly okay.
> I'm not sure whether ffmpeg does this due to restrictions regaring the
> audio packet size.
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-user&data=02%7C01%7C%7C53797f48200642db939908d7a1f2f889%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637155937243041785&sdata=fyx8HMPOzOSBnK59h6Q0EAXmscqqd6EwQYPGJUBqkZU%3D&reserved=0
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-user&data=02%7C01%7C%7C53797f48200642db939908d7a1f2f889%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637155937243051794&sdata=Lo4vH55iWNXVrUzhQpSvXENd8UCYHwIwGe774tJy8lg%3D&reserved=0
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmpeg.org%2Fmailman%2Flistinfo%2Fffmpeg-user&data=02%7C01%7C%7C53797f48200642db939908d7a1f2f889%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637155937243051794&sdata=Lo4vH55iWNXVrUzhQpSvXENd8UCYHwIwGe774tJy8lg%3D&reserved=0

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list