Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-07-18 Thread Mark Burton
The latest nightly of Handbrake includes an option to add the sample group atom as well as the edit list. This is much more successful than the current ffmpeg mux when playing in QT X. Its still ignored in older QT decoders, but certainly this would be an improvement if ffmpeg could follow the H

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-07-02 Thread Mark Burton
On 1 Jul 2017, at 20:24, Sasi Inguva wrote: >> On Sat, Jul 1, 2017 at 6:56 AM, Mark Burton [via FFmpeg-users] >> How about this for a partial solution - ffmpeg supports the audiotoolbox >> aac encoder on macOS. For the sake of being able to create .mov which are >> compatible with the Quicktime f

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-07-01 Thread Sasi Inguva
There is already a flag called -use_editlist in ffmpeg MOV muxer http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/movenc.c;h=ca389e3a97f92e05b1abfda29aa7bde25e1089a0;hb=HEAD#l88 . I think you can use that along with the audiotoolbox encoder to achieve what you want. On Sat, Jul 1, 2017 a

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-07-01 Thread Mark Burton
How about this for a partial solution - ffmpeg supports the audiotoolbox aac encoder on macOS. For the sake of being able to create .mov which are compatible with the Quicktime format, there is a single change which I think could work well, albeit the ‘fix' would be limited to macOS system encod

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-29 Thread Sasi Inguva
I am not knowledgeable enough about audio codec implementations, but I don't think we can control an audio codec implementation to follow a certain delay. For AAC codec for example, I believe libfhg-aac sets 1600 samples of dealy, while libfdk-aac would set 1024 etc. Some one with more knowledge c

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-29 Thread Mark Burton
> On 28 Jun 2017, at 01:12, Sasi Inguva wrote: > I have been helping Mark test Marton's patch. I looked at the test file Mark > was using to test the sync. There are multiple reasons for audio being > off-sync. > > i) That file doesn't contain a non-zero edit list or 'sgpd' atom, as > https://d

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-27 Thread Sasi Inguva
I have been helping Mark test Marton's patch. I looked at the test file Mark was using to test the sync. There are multiple reasons for audio being off-sync. i) That file doesn't contain a non-zero edit list or 'sgpd' atom, as https://developer.apple.com/library/content/documentation/QuickTime/QT

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-25 Thread Mark Burton
On 19 Jun 2017, at 22:38, Marton Balint wrote: > Can you measure how many samples are the delay before and after my patch? I'd > rather do some additional testing now, instead committing something that is > only half-correct. I’ve reached out to the developer who was helping me. I believe he al

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-19 Thread Marton Balint
On Mon, 19 Jun 2017, Mark Burton wrote: On 15 Apr 2017, at 13:25, Christian Ebert wrote: * Marton Balint on Saturday, April 15, 2017 at 12:25:58 +0200 On Sat, 15 Apr 2017, Christian Ebert wrote: * Marton Balint on Saturday, April 15, 2017 at 07:55:22 +0200 Last time I checked (a year ago o

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-19 Thread Mark Burton
On 16 Jun 2017, at 10:17, ffm...@me.com wrote: > I agree with Mark here. > Followed the issue now for a while and opened a similar (not went into this > deep technical level) issue some time ago. > > I guess it should be marked as a bug and - if possible - should be fixed. > Thanks, Andreas Th

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-19 Thread Mark Burton
> On 15 Apr 2017, at 13:25, Christian Ebert wrote: > * Marton Balint on Saturday, April 15, 2017 at 12:25:58 +0200 >> On Sat, 15 Apr 2017, Christian Ebert wrote: >>> * Marton Balint on Saturday, April 15, 2017 at 07:55:22 +0200 Last time I checked (a year ago or so), ffmpeg created a correct

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-16 Thread ffmpeg
I agree with Mark here. Followed the issue now for a while and opened a similar (not went into this deep technical level) issue some time ago. I guess it should be marked as a bug and - if possible - should be fixed. Thanks, Andreas > Am 9. Jun 2017 um 10:44 schrieb Mark Burton : > > I appr

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-09 Thread Mark Burton
I appreciate I don't fully grasp the complexities or know the full story here, but do you not think its fair to say this should be considered a major ffmpeg bug or issue? It seems clear to me, and others, that the current .mov muxer produces a file which is incompatible with Quicktime itself. AA

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-06-04 Thread Mark Burton
On 26 May 2017, at 12:53, Christian Ebert mailto:blacktr...@gmx.net>> wrote: > Yeah, filtering does not add an edit list (apparently the > 'modern' solution): > https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP4939-CH204-25592 >

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-26 Thread Mark Burton
On 26 May 2017, at 12:53, Christian Ebert wrote: > Yeah, filtering does not add an edit list (apparently the > 'modern' solution): > https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP4939-CH204-25592 > and therefore QuickTime fa

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-26 Thread Christian Ebert
* Mark Burton on Wednesday, May 24, 2017 at 13:20:34 +0100 > On 23 May 2017, at 11:20, Christian Ebert wrote: >>> So I looked back at your above -af and realised that the 1024 should >>> actually be 2112 which is Apple’s chosen fixed encoding delay. >>> https://developer.apple.com/library/content

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-24 Thread Mark Burton
On 23 May 2017, at 11:20, Christian Ebert wrote: >> So I looked back at your above -af and realised that the 1024 should >> actually be 2112 which is Apple’s chosen fixed encoding delay. >> https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html >> >>

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-23 Thread Christian Ebert
* Mark Burton on Monday, May 22, 2017 at 15:22:34 +0100 > On 15 Apr 2017, at 09:22, Christian Ebert wrote: >> Somewhat counterintuitive, but you never know: >> >> -filter:a aresample=async=1:first_pts=0,asetpts=PTS-STARTPTS+1024 >> >> combined with the -t incantation. > > It seems this issue is

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-22 Thread Mark Burton
On 15 Apr 2017, at 09:22, Christian Ebert wrote: > Somewhat counterintuitive, but you never know: > > -filter:a aresample=async=1:first_pts=0,asetpts=PTS-STARTPTS+1024 > > combined with the -t incantation. Hi Christian, It seems this issue is not going to garner much attention which is a littl

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-16 Thread Mark Burton
On 9 May 2017, 15:42 +0100, Mark Burton , wrote: > > > Do you not see the same behaviour? > > No, unfortunately not. > Can I ask - are you playing back your encoded file on macOS in either > Quicktime Player 7.x or Quicktime Player 10.x? > I don’t believe you will see this unless you are using a

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-09 Thread Mark Burton
On 9 May 2017, at 15:21, Carl Eugen Hoyos wrote: >> Do you not see the same behaviour? > No, unfortunately not. Can I ask - are you playing back your encoded file on macOS in either Quicktime Player 7.x or Quicktime Player 10.x? I don’t believe you will see this unless you are using a Quicktime

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-09 Thread Mark Burton
> On 9 May 2017, at 15:16, Carl Eugen Hoyos wrote: >> Is this patch likely to be applied in the near future? Thanks. > > The only comment I see above is that the patch does not fix > any issue, so while I haven't looked at it, I consider this more > of an argument against applying it. Understo

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-09 Thread Carl Eugen Hoyos
2017-04-18 14:21 GMT+02:00 Mark Burton : > Do you not see the same behaviour? No, unfortunately not. I have dealt with (reproduced) several hundred issues related to A/V sync over the last decade. Some of them were about mostly missing audio, some about increasing desync, many (most) are related

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-09 Thread Carl Eugen Hoyos
2017-05-09 15:58 GMT+02:00 Mark Burton : > On 15 Apr 2017, 11:26 +0100, Marton Balint , wrote: > >> Hmm, a recent fix changed one of the hunk contexts... Could >> you try this new attached patch? > > Is this patch likely to be applied in the near future? Thanks. The only comment I see above is tha

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-05-09 Thread Mark Burton
On 15 Apr 2017, 11:26 +0100, Marton Balint , wrote: > Hmm, a recent fix changed one of the hunk contexts... Could you try this > new attached patch? Is this patch likely to be applied in the near future? Thanks. ___ ffmpeg-user mailing list ffmpeg-user@

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-18 Thread Mark Burton
On 15 Apr 2017, 09:18 +0100, Mark Burton , wrote: > On 14 Apr 2017, 23:45 +0100, Carl Eugen Hoyos , wrote: > > 2017-04-14 23:44 GMT+02:00 Mark Burton : > > > I find it hard having to accept an encode will always play out of > > > sync on certain players. > > > > Could you elaborate a little? > > S

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-16 Thread Mark Burton
On 15 Apr 2017, 09:22 +0100, Christian Ebert , wrote: > * Mark Burton on Friday, April 14, 2017 at 22:44:52 +0100 > > > On 14 Apr 2017, at 22:22, Christian Ebert wrote: > > > > > Also, when you run with -v verbose, you'll see a delay (depends > > > > > on audio codec), for you case it's probably

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Christian Ebert
* Marton Balint on Saturday, April 15, 2017 at 12:25:58 +0200 > On Sat, 15 Apr 2017, Christian Ebert wrote: >> * Marton Balint on Saturday, April 15, 2017 at 07:55:22 +0200 >>> Last time I checked (a year ago or so), ffmpeg created a correct .mov >>> edit list to signal the audio priming. >>> >>>

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Marton Balint
On Sat, 15 Apr 2017, Christian Ebert wrote: * Marton Balint on Saturday, April 15, 2017 at 07:55:22 +0200 Last time I checked (a year ago or so), ffmpeg created a correct .mov edit list to signal the audio priming. https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFAppen

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Christian Ebert
* Marton Balint on Saturday, April 15, 2017 at 07:55:22 +0200 > Last time I checked (a year ago or so), ffmpeg created a correct .mov > edit list to signal the audio priming. > > https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html > > Here is patch whic

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Christian Ebert
* Carl Eugen Hoyos on Saturday, April 15, 2017 at 00:44:43 +0200 > 2017-04-14 23:44 GMT+02:00 Mark Burton : >> I find it hard having to accept an encode will always play out of >> sync on certain players. > > Could you elaborate a little? > So far, for every ticket, it either turned out that out-o

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Christian Ebert
* Mark Burton on Friday, April 14, 2017 at 22:44:52 +0100 >> On 14 Apr 2017, at 22:22, Christian Ebert wrote: Also, when you run with -v verbose, you'll see a delay (depends on audio codec), for you case it's probably 1024. Maybe try: -filter:a aresample=first_pts=0,asetpts=PT

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Mark Burton
On 14 Apr 2017, 23:45 +0100, Carl Eugen Hoyos , wrote: > 2017-04-14 23:44 GMT+02:00 Mark Burton : > > I find it hard having to accept an encode will always play out of > > sync on certain players. > > Could you elaborate a little? > So far, for every ticket, it either turned out that out-of-sync w

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-15 Thread Mark Burton
On 15 Apr 2017, 06:55 +0100, Marton Balint , wrote: > On Sat, 15 Apr 2017, Carl Eugen Hoyos wrote: > > > 2017-04-14 23:44 GMT+02:00 Mark Burton : > > > I find it hard having to accept an encode will always play out of > > > sync on certain players. > > > > Could you elaborate a little? > > So far,

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Marton Balint
On Sat, 15 Apr 2017, Carl Eugen Hoyos wrote: 2017-04-14 23:44 GMT+02:00 Mark Burton : I find it hard having to accept an encode will always play out of sync on certain players. Could you elaborate a little? So far, for every ticket, it either turned out that out-of-sync was not reproducible

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Carl Eugen Hoyos
2017-04-14 23:44 GMT+02:00 Mark Burton : > I find it hard having to accept an encode will always play out of > sync on certain players. Could you elaborate a little? So far, for every ticket, it either turned out that out-of-sync was not reproducible with MPlayer / vlc (and FFmpeg) or it was off-

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Mark Burton
> On 14 Apr 2017, at 22:22, Christian Ebert wrote: >>> Also, when you run with -v verbose, you'll see a delay (depends >>> on audio codec), for you case it's probably 1024. Maybe try: >>> >>> -filter:a aresample=first_pts=0,asetpts=PTS-STARTPTS+1024 >>> >>> Especially the latter could be exactl

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Christian Ebert
* Mark Burton on Friday, April 14, 2017 at 21:45:07 +0100 >> * Mark Burton on Friday, April 14, 2017 at 16:57:06 +0100 >>> Here is the basic command to reproduce. I have attached the uncut loglevel >>> 99 console output for this command: >>> ffmpeg -i SyncTest24p.mov -c:v libx264 -pix_fmt yuv420p

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Mark Burton
On 14 Apr 2017, 17:47 +0100, Christian Ebert , wrote: > * Mark Burton on Friday, April 14, 2017 at 16:57:06 +0100 > > I appreciate this is a tricky area and there appear to be different ways > > that some encoders create AAC streams with regards to the padding and > > remaining samples etc. I wo

Re: [FFmpeg-user] Create an AAC stream matching the Core Media Audio packet format / priming etc?

2017-04-14 Thread Christian Ebert
* Mark Burton on Friday, April 14, 2017 at 16:57:06 +0100 > I appreciate this is a tricky area and there appear to be different ways that > some encoders create AAC streams with regards to the padding and remaining > samples etc. I won’t pretend to fully understand all the factors, but I would >