Author Topic: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound  (Read 599 times)

mm0359

  • Full Member
  • ***
  • Posts: 168
Windows XP

Still good:
avidemux_2.6.19_win32.exe

Regressed:
avidemux_2.6.19_r170410_win32.exe

(0. Fwiw, .ts.idx2 are identicals.)
1. (Select a range, then) Save (Copy/Copy/TS).
1r. Video is fine, but "no" sound.

Good log:
a few lines like
Quote
[adm_lavLogCallback] 14:24:14-892 [lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 30720 >= 14081
[saveLoop] 14:24:14-892 [FF]Error writing audio packet
where "A > b".

Bad log:
lots of lines like
Quote
[adm_lavLogCallback] 14:28:21-516 [lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 73841 >= 73841
[saveLoop] 14:28:21-516 [FF]Error writing audio packet
where "a = b".

NB:
I'm not sure I saved the exact same range(s). Then the quoted logs may not be an appropriate hint. (But the issue is real.)
« Last Edit: April 11, 2017, 08:31:31 PM by mm0359 »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10910
Re: v2.6.19 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #1 on: April 10, 2017, 03:20:13 PM »
A sample would help

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #2 on: April 10, 2017, 06:45:21 PM »
10 MiB (start of file) sample: http://dl.free.fr/bewdxoyeI
Password: 2042

NB:
I assume the issue is not specific to this file.
« Last Edit: April 10, 2017, 06:47:36 PM by mm0359 »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5374
Re: v2.6.19 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #3 on: April 11, 2017, 03:54:14 AM »
[initFaad] 03:47:00-614  [FAAD] using 2 bytes of extradata
13 10
 [initFaad] 03:47:00-614  [FAAD] Found :48000 rate 2 channels
 [initFaad] 03:47:00-614  [FAAD] Frequency mismatch!!! 24000 to 48000 (SBR ?)
 [initFaad] 03:47:00-614  Sbr detected
 [setupAudio] 03:47:00-614  Setting up 1 audio track(s)
 [setupAudio] 03:47:00-614  [audioTrack 0] Creating audio encoding stream, starttime 00:00:01,960(copy)
 [audioCreateCopyStream] 03:47:00-614  Creating audio stream copy with compensation : startTime=00:00:01,960
 [audioCreateCopyStream] 03:47:00-614  and shift =00:00:00,000
 [ADM_audioStreamCopy] 03:47:00-614  Creating copy stream, startTime=00:00:01,960, shift=0
 [goToTime] 03:47:00-614   go to time 1,96 secs
 [goToTime] 03:47:00-614  => seg 0, rel time 1,96 secs
 [resetAfterSeek] 03:47:00-614  Resetting faad
 [initFaad] 03:47:00-614  [FAAD] using 2 bytes of extradata
13 10
 [initFaad] 03:47:00-614  [FAAD] Found :48000 rate 2 channels
 [initFaad] 03:47:00-614  [FAAD] Frequency mismatch!!! 24000 to 48000 (SBR ?)
 [initFaad] 03:47:00-614  Sbr detected
[FF] Muxer opened
[FF] Using 0 bytes for video extradata
[FF] Video initialized
 [rescaleFps] 03:47:00-614   TimeBase for video 1000/25000
[FF] Bitrate 128
 [initAudio] 03:47:00-614  Language for track 0 is unknown
[FF] Audio initialized
with build 827b282 and above sample:

[FF] Saving
 [saveLoop] 03:47:00-615  avg fps=25000
 [initUI] 03:47:00-615  Muxer, creating UI, video duration is 00:00:02,560
 [adm_lavLogCallback] 03:47:00-640  [lavc] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
 [adm_lavLogCallback] 03:47:00-640  [lavc] Encoder did not produce proper pts, making some up.
 [adm_lavLogCallback] 03:47:00-661  [lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 12641 >= 12641
 [saveLoop] 03:47:00-661  [FF]Error writing audio packet


result:  intermittent audio dropouts

Video
Frame rate                               : 25.000 fps

Audio
ID                                       : 318 (0x13E)
Menu ID                                  : 1882 (0x75A)
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format version                           : Version 2
Format profile                           : HE-AAC / LC
Muxing mode                              : ADTS
Codec ID                                 : 15
Duration                                 : 42s 240ms
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Frame rate                               : 23.438 fps (1024 spf)
Compression mode                         : Lossy
Delay relative to video                  : -196ms

« Last Edit: April 11, 2017, 04:13:30 AM by Jan Gruuthuse »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10910
Re: v2.6.19 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #4 on: April 11, 2017, 06:30:37 AM »
2 problems
- holes in timestamp : libavformat rejects it now
- AAC/HE not managed correcly

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #5 on: April 11, 2017, 04:14:28 PM »
avidemux_2.6.99_r170411_win32.exe

Much better after
[muxer/ffmpeg] Try to fill in the missing timestamps, AAC/HE will not work well

But still not good:
long sound, brief blank, long sound, brief blank, ...
« Last Edit: April 11, 2017, 08:30:55 PM by mm0359 »

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #6 on: April 13, 2017, 12:20:33 AM »
avidemux_2.7.0_r170412_win32.exe

(Fully) Fixed after
[core/AudioSTream] avoid diverging pts when dealing with AAC

:)



Ftr, I now get (only)
Quote
...
Paint event
[audioClock] Drift detected :0 vs 820466, delta=820466
[audioClock] Drift detected :1033799 vs 1076477, delta=42678
[audioClock] Drift detected :36703144 vs 36660488, delta=-42656
[audioClock] Drift detected :36873821 vs 36916488, delta=42667
Percent:93
...

Is this the best that can be expected, or would there be some additional tweak(s) to further improve?
« Last Edit: April 13, 2017, 12:55:03 AM by mm0359 »

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #7 on: April 14, 2017, 03:49:59 AM »
avidemux_2.6.19_r170413_win32.exe

Includes
(support) [muxer/ffmpeg] Try to fill in the missing timestamps, AAC/HE will not work well

But still misses the second part(s) of the fix.
« Last Edit: May 11, 2017, 08:41:20 PM by mm0359 »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5374
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #8 on: April 14, 2017, 04:43:07 AM »
development is only happening on 2.7.0. 2.6.19 is halted, as far as I understand.
https://github.com/mean00/avidemux2/branches
« Last Edit: April 14, 2017, 07:42:27 AM by Jan Gruuthuse »

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #9 on: April 14, 2017, 07:24:39 AM »
2.6.19 is halted, as far as I understand.

Hum, the opposite is written in
What is the new "support" branch? (2017.04.13)

Confused...

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10910
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #10 on: April 14, 2017, 07:50:01 AM »
Updating ffmpeg takes a long time to stabilize
2.7 = new ffmpeg
2.6 = old ffmpeg

mm0359

  • Full Member
  • ***
  • Posts: 168
Re: v2.6.19-v2.6.99 (win32) nightlies: Copy/Copy/TS fails to save sound
« Reply #11 on: May 11, 2017, 08:39:22 PM »
avidemux_2.6.19_r170420_win32.exe

(Fully) Fixed after
(support) [core/AudioSTream] avoid diverging pts when dealing with AAC

 :)