Concat Resulting in Delayed Audio

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

Concat Resulting in Delayed Audio

VP Lists
Hi folks.  I’m performing a multiple-“.mov” concat which is resulting in delayed audio in the final output .mp4.  

I’m rendering temp MPEG-2 .ts files, then concatenating all of those into a final MP4 file.  

The final video has a lagging video, which eventually catches up by the end of the video.  

Is there a way I can fully encapsulate the intermediate files so that there is spot-on audio into the intermediate files, and then into the final MP4?  Is MP4 the file type I should be sending to?  I can re-translate it post-concat, if need be.  

My STDOUT is here:  https://gist.github.com/daBee/d4052da2a5be7a8ee121ae70eafebefe 

I appreciate any insight.  Cheers
_____________
Rich in Toronto @ VP






_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Concat Resulting in Delayed Audio

VP Lists
Furthermore…

ffmpeg -y -i #{ item } -c copy -bsf:v h264_mp4toannexb -f mpegts int#{ counter }.ts

…and…

ffmpeg -y -i \"concat:#{ couple }\" -bsf:a aac_adtstoasc #{ d }/final.mp4

d: original source directory path
item: original .mov source file
counter: auto-increment integer
couple: string of intermediate files piped together:  

concat:int1.ts|int2.ts|int3.ts|int4.ts|int5.ts|int6.ts|int7.ts|int8.ts|int9.ts|int10.ts|int11.ts|int12.ts|int13.ts|int14.ts|int15.ts|int16.ts|int17.ts|int18.ts|int19.ts|int20.ts|int21.ts|int22.ts|int23.ts|int24.ts|int25.ts|int26.ts|int27.ts|int28.ts|int29.ts|int30.ts|int31.ts|int32.ts|int33.ts|int34.ts|int35.ts|int36.ts|int37.ts|int38.ts|int39.ts|int40.ts|int41.ts|int42.ts|int43.ts|int44.ts|int45.ts|int46.ts|int47.ts|int48.ts|int49.ts|int50.ts|int51.ts|int52.ts|int53.ts|int54.ts|int55.ts|int56.ts|int57.ts|int58.ts|int59.ts|int60.ts|int61.ts|int62.ts|int63.ts|int64.ts|int65.ts|int66.ts|int67.ts|int68.ts|int69.ts|int70.ts



> On Oct 5, 2018, at 10:23 PM, VP Lists <[hidden email]> wrote:
>
> Hi folks.  I’m performing a multiple-“.mov” concat which is resulting in delayed audio in the final output .mp4.  
>
> I’m rendering temp MPEG-2 .ts files, then concatenating all of those into a final MP4 file.  
>
> The final video has a lagging video, which eventually catches up by the end of the video.  
>
> Is there a way I can fully encapsulate the intermediate files so that there is spot-on audio into the intermediate files, and then into the final MP4? Is MP4 the file type I should be sending to?  I can re-translate it post-concat, if need be.  
>
> My STDOUT is here:  https://gist.github.com/daBee/d4052da2a5be7a8ee121ae70eafebefe 
>
> I appreciate any insight.  Cheers


_____________
Rich in Toronto @ VP






_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Concat Resulting in Delayed Audio

Carl Eugen Hoyos-2
In reply to this post by VP Lists
2018-10-06 4:23 GMT+02:00, VP Lists <[hidden email]>:

> Hi folks.  I’m performing a multiple-“.mov” concat which is resulting in
> delayed audio in the final output .mp4.
>
> I’m rendering temp MPEG-2 .ts files, then concatenating all of those into a
> final MP4 file.
>
> The final video has a lagging video, which eventually catches up by the end
> of the video.
>
> Is there a way I can fully encapsulate the intermediate files so that there
> is spot-on audio into the intermediate files, and then into the final MP4?
> Is MP4 the file type I should be sending to?  I can re-translate it
> post-concat, if need be.

> My STDOUT is here:
> https://gist.github.com/daBee/d4052da2a5be7a8ee121ae70eafebefe

This is missing command lines, making an analysis even more
difficult, but I don't think this approach can work in the general
case, only for some limited use-case.

Feel free to test with "-async 1" or provide files for testing, other
approaches likely exist.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Concat Resulting in Delayed Audio

VP Lists
The command lines are there.

“Other approaches likely exist”.  I’d likely know what the approaches are, which is what I’m asking about.  These two are the only ones I know, so that’s where I sit.



> On Oct 17, 2018, at 12:40 PM, Carl Eugen Hoyos <[hidden email]> wrote:
>
> This is missing command lines, making an analysis even more
> difficult, but I don't think this approach can work in the general
> case, only for some limited use-case.
>
> Feel free to test with "-async 1" or provide files for testing, other
> approaches likely exist.


_____________
Rich in Toronto @ VP






_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Concat Resulting in Delayed Audio

Carl Eugen Hoyos-2
2018-10-17 21:51 GMT+02:00, VP Lists <[hidden email]>:
> The command lines are there.

Just being curious: Where?

> “Other approaches likely exist”.  I’d likely know what the approaches are,
> which is what I’m asking about.  These two are the only ones I know, so
> that’s where I sit.

Sorry if this wasn't clear:
I am not smart enough to guess the issue, if you can provide sample
files, I may be able to find out the issue.

Please do not top-post here, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Concat Resulting in Delayed Audio

VP Lists

> On Oct 17, 2018, at 5:44 PM, Carl Eugen Hoyos <[hidden email]> wrote:
>
> 2018-10-17 21:51 GMT+02:00, VP Lists <[hidden email]>:
>> The command lines are there.
>
> Just being curious: Where?
>
>> “Other approaches likely exist”.  I’d likely know what the approaches are,
>> which is what I’m asking about.  These two are the only ones I know, so
>> that’s where I sit.
>
> Sorry if this wasn't clear:
> I am not smart enough to guess the issue, if you can provide sample
> files, I may be able to find out the issue.
>
> Please do not top-post here, Carl Eugen

OK, this is my fourth posting of the same information.

It is down below, like you asked.  No I’m not spending 40 minutes interspersing any of this.  

Here are the links in case you want to call me out on any of this:

http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041563.html
http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041569.html
http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041570.html
http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041656.html
http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041661.html
http://ffmpeg.org/pipermail/ffmpeg-user/2018-October/041668.html




Hi folks.  I’ve created a list of small clips in random order, each with a unique filename.  This file is used for a concat input file.  

In the verbose processing, I get lots of these after a few of the first files are processed:

Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c062800] Invalid NAL unit 1, skipping.
[h264 @ 0x7fe65c062800] no frame!
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c078c00] No start code is found.
[h264 @ 0x7fe65c078c00] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c08f000] No start code is found.
[h264 @ 0x7fe65c08f000] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c0a5400] No start code is found.
[h264 @ 0x7fe65c0a5400] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c0bb800] No start code is found.
[h264 @ 0x7fe65c0bb800] Error splitting the input into NAL units.
[aac @ 0x7fe65c00d200] channel element 1.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.4 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.4 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x7fe65c00d200] channel element 1.4 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c013a00] No start code is found.
[h264 @ 0x7fe65c013a00] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c01d200] No start code is found.
[h264 @ 0x7fe65c01d200] Error splitting the input into NAL units.
[aac @ 0x7fe65c00d200] channel element 1.0 is not allocated
Error while decoding stream #0:1: Invalid data found when processing input
Error while decoding stream #0:0: Invalid data found when processing input
[h264 @ 0x7fe65c01d800] No start code is found.

full report here:  
https://gist.github.com/daBee/e5faa3f8f522c2c4e5927ed82887f882


I just ran a test where the 10th clip went silent and froze, yet the QuickTime Player kept progressing.  The next clip came in with no sound, and the rest of the video progressed fine with no sound until much later.  Individual clips work just fine.  

I’m not sure what’s happening.  I was assuming it was a simple glue, but apparently it’s not happy with stuff.  This section above was a grab from the middle.  

Any advice appreciated how I can fix this.  Cheers

#####

Hi folks.  I’m performing a multiple-“.mov” concat which is resulting in delayed audio in the final output .mp4.  

I’m rendering temp MPEG-2 .ts files, then concatenating all of those into a final MP4 file.  

The final video has a lagging video, which eventually catches up by the end of the video.  

Is there a way I can fully encapsulate the intermediate files so that there is spot-on audio into the intermediate files, and then into the final MP4?  Is MP4 the file type I should be sending to?  I can re-translate it post-concat, if need be.  

My STDOUT is here:  
https://gist.github.com/daBee/d4052da2a5be7a8ee121ae70eafebefe
 
I appreciate any insight.  Cheers

#####

Furthermore…

ffmpeg -y -i #{ item } -c copy -bsf:v h264_mp4toannexb -f mpegts int#{ counter }.ts

…and…

ffmpeg -y -i \"concat:#{ couple }\" -bsf:a aac_adtstoasc #{ d }/final.mp4

d: original source directory path
item: original .mov source file
counter: auto-increment integer
couple: string of intermediate files piped together:  

concat:int1.ts|int2.ts|int3.ts|int4.ts|int5.ts|int6.ts|int7.ts|int8.ts|int9.ts|int10.ts|int11.ts|int12.ts|int13.ts|int14.ts|int15.ts|int16.ts|int17.ts|int18.ts|int19.ts|int20.ts|int21.ts|int22.ts|int23.ts|int24.ts|int25.ts|int26.ts|int27.ts|int28.ts|int29.ts|int30.ts|int31.ts|int32.ts|int33.ts|int34.ts|int35.ts|int36.ts|int37.ts|int38.ts|int39.ts|int40.ts|int41.ts|int42.ts|int43.ts|int44.ts|int45.ts|int46.ts|int47.ts|int48.ts|int49.ts|int50.ts|int51.ts|int52.ts|int53.ts|int54.ts|int55.ts|int56.ts|int57.ts|int58.ts|int59.ts|int60.ts|int61.ts|int62.ts|int63.ts|int64.ts|int65.ts|int66.ts|int67.ts|int68.ts|int69.ts|int70.ts


#####

Hi there.  

I’ve tried two approaches to bring some short clips I’ve created in QuickTime Player 7, all together in a concat.  Both approaches demonstrated a shift in audio vs video timelines.  They were:

- Direct concat
- Intermediate xxx.ts files brought together via concat after

The syntax isn’t important as I have asked before in this list and I got no answers.  I will repeat, that I’ve been over this and absolutely no insight.  So I have chosen not to include any syntax.  

So I’m asking if there is an accepted optimal approach to performing such a task.  The latter was the closest I got, but it was still unacceptable.  

Is this a failure on the master clips?  If I manually copy/append into a new file in QuickTime Player 7, there are some frozen frames around the hard transitions, so that’s got me thinking the original clips aren’t the best for this type of stuff and that I need to move to Final Cut Pro.  

Thanks for any insight.  Truly appreciated.  I’d love to get FFMPEG working on something like this.  

Cheers

#####

Nothing heard.  

In any case, even if I have a recent buggy version for an outdated FFMPEG for an older machine, all I’m asking is the approach for performing a best-outcome concat.  

#####


Yes, I had to, I think.  I defaulted to that, then moved to intermediate .ts files just to make it even more foolproof…so I am thinking.

ffmpeg -y -i \"concat:#{ couple }\" -bsf:a aac_adtstoasc #{ d }/final.mp4

Those are file lists and path.  

#####

I clearly explained what commands were used, and how I’ve tested two approaches.  Now, looking at individual clips in QuickTime Player 10.4 and QuickTime Player 7, they are fine.  When stitched together, about half way through a list of 85 clips, the audio track and video track do not align.  It can fix itself by the end of the concat final file.

I don’t know how to share video files with you.  

In any case, I’m just looking for an approach, not to review what I have done.  

_____________
Rich in Toronto @ VP






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

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