Opened 9 years ago

Last modified 9 years ago

#4617 new defect

Incorrect timestamps if probing reads 1024 bytes or less of a stream

Reported by: ezran Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When an input stream has a low enough bitrate in the initial packets (such as audio with initial silence), the max_ts_probe setting (default of 50) can limit the amount of data read by avformat_find_stream_info such that less than 1024 bytes are read. (For example, 50 packets of silent adts audio at 17 bytes per packet is only 850 bytes.)

When this happens, the compute_pkt_fields and/or update_initial_timestamps don't happen until after the probe data is pulled from the packet buffer and processed. The packets making up the first 1024 bytes don't get durations/timestamps computed during decoding, so then when the next 1024 bytes are decoded (and those packets do get timestamps), the timestamps start back at zero.

At that point, ffmpeg notices and adjusts the timestamps to try to compensate: "Non-monotonous DTS in output stream 0:1; previous: 121203, current: 0; changing to 121204. This may result in incorrect timestamps in the output file." However, it assigns sequential PTS values to the packets while compensating, not taking the packet durations into account. This can lead to timestamps going backward in the output.

This issue has existed since max_ts_probe was added (in 2.4, I think?)

How to reproduce:

# Generate a silent audio file in adts format - first packet will be 30 bytes, next 255 packets are 13 bytes.
% ffmpeg -f lavfi -i 'aevalsrc=0|0' -c:a aac -t 10 -strict experimental silent.aac

# Try to run that file through a basic conversion
% ffmpeg -i silent.aac -y out.ts
... "Non-monotonous DTS in output stream 0:0; previous: 158882, current: 324; changing to 158883. This may result in incorrect timestamps in the output file."

# Run again, probing 78 packets so we read more than 1024 bytes during probe.  (30+13*77 = 1031)
% ffmpeg -max_ts_probe 78 -i silent.aac -y out.ts
... No errors or warnings.

# Run again, probing 77 packets so we read less than 1024 bytes during probe.  (30+13*76 = 1018)
% ffmpeg -max_ts_probe 77 -i silent.aac -y out.ts
... "Non-monotonous DTS in output stream 0:0; previous: 158882, current: 324; changing to 158883. This may result in incorrect timestamps in the output file."

Showing incorrect output timestamps:

# Basic conversion
% ffmpeg -i silent.aac -y out.ts

% ffprobe -show_frames out.ts | grep pkt_pts_time
... CUT ...
pkt_pts_time=2.967278
pkt_pts_time=2.993400
pkt_pts_time=3.019533
pkt_pts_time=3.045656
pkt_pts_time=3.071778
pkt_pts_time=3.097900
pkt_pts_time=3.124022
pkt_pts_time=3.150144
pkt_pts_time=3.176267
pkt_pts_time=3.202389
pkt_pts_time=3.176289 <--- Backward
pkt_pts_time=3.202411
pkt_pts_time=3.176311 <--- Repeating
pkt_pts_time=3.202433
pkt_pts_time=3.176333
... CUT ...


# Codec copy conversion
% ffmpeg -i silent.aac -c:a copy -y out.ts
... CUT ...
pkt_pts_time=5.254456
pkt_pts_time=5.277678
pkt_pts_time=5.300889
pkt_pts_time=5.324111
pkt_pts_time=3.559456 <--- Backward Jump
pkt_pts_time=3.582678
pkt_pts_time=3.605889
pkt_pts_time=3.629111
... CUT ...

Full logs of basic conversion:

$ ffmpeg -v 9 -loglevel 99 -i silent.aac -y out.ts
ffmpeg version N-72842-gfb92f3e Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: --prefix=/usr --shlibdir=/usr/lib64 --libdir=/usr/lib64 --incdir=/usr/include --bindir=/usr/bin --datadir=/usr/share/ffmpeg --mandir=/usr/share/man
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'silent.aac'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'out.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file silent.aac.
Successfully parsed a group of options.
Opening an input file: silent.aac.
Probing aac score:51 size:2048
Probing mpegts score:-1094995529 size:2048
Probing msnwctcp score:-1 size:2048
[aac @ 0x1d4f180] Format aac probed with size=2048 and score=51
[aac @ 0x1d4f180] Before avformat_find_stream_info() pos: 0 bytes read:5650 seeks:0
[aac @ 0x1d4f180] All info found
[aac @ 0x1d4f180] Estimating duration from bitrate, this may be inaccurate
[aac @ 0x1d4f180] 0: start_time: -9223372036854.775 duration: 284.887
[aac @ 0x1d4f180] stream: start_time: -9223372036854.775 duration: 10.094 bitrate=4 kb/s
[aac @ 0x1d4f180] After avformat_find_stream_info() pos: 1024 bytes read:5650 seeks:0 frames:50
Input #0, aac, from 'silent.aac':
  Duration: 00:00:10.09, bitrate: 4 kb/s
    Stream #0:0, 50, 1/28224000: Audio: aac (LC), 44100 Hz, stereo, fltp, 4 kb/s
Successfully opened the file.
Parsing a group of options: output file out.ts.
Successfully parsed a group of options.
Opening an output file: out.ts.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x1d74840] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0x1d74840] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0x1d74840] Setting 'sample_fmt' to value 'fltp'
[graph 0 input from stream 0:0 @ 0x1d74840] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x1d74840] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0x1d4fae0] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:0 @ 0x1d4fae0] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000'
[audio format for output stream 0:0 @ 0x1d4fae0] Setting 'channel_layouts' to value '0x4|0x3'
[audio format for output stream 0:0 @ 0x1d4fae0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
[AVFilterGraph @ 0x1d6bae0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x1d5f960] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[mpegts @ 0x1d71ee0] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'out.ts':
  Metadata:
    encoder         : Lavf56.36.100
    Stream #0:0, 0, 1/90000: Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s
    Metadata:
      encoder         : Lavc56.41.100 mp2
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158882, current: 324; changing to 158883. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158883, current: 2676; changing to 158884. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158884, current: 5027; changing to 158885. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158885, current: 7378; changing to 158886. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158886, current: 9729; changing to 158887. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158887, current: 12080; changing to 158888. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158888, current: 14431; changing to 158889. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158889, current: 16782; changing to 158890. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158890, current: 19133; changing to 158891. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158891, current: 21484; changing to 158892. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158892, current: 23835; changing to 158893. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158893, current: 26186; changing to 158894. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158894, current: 28537; changing to 158895. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158895, current: 30888; changing to 158896. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158896, current: 33239; changing to 158897. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158897, current: 35590; changing to 158898. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158898, current: 37941; changing to 158899. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158899, current: 40292; changing to 158900. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158900, current: 42643; changing to 158901. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158901, current: 44994; changing to 158902. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158902, current: 47345; changing to 158903. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158903, current: 49696; changing to 158904. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158904, current: 52047; changing to 158905. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158905, current: 54398; changing to 158906. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158906, current: 56749; changing to 158907. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158907, current: 59100; changing to 158908. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158908, current: 61451; changing to 158909. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158909, current: 63802; changing to 158910. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158910, current: 66153; changing to 158911. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158911, current: 68504; changing to 158912. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158912, current: 70855; changing to 158913. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158913, current: 73206; changing to 158914. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158914, current: 75557; changing to 158915. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158915, current: 77908; changing to 158916. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158916, current: 80259; changing to 158917. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158917, current: 82610; changing to 158918. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158918, current: 84961; changing to 158919. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158919, current: 87312; changing to 158920. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158920, current: 89663; changing to 158921. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158921, current: 92014; changing to 158922. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158922, current: 94365; changing to 158923. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158923, current: 96716; changing to 158924. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158924, current: 99067; changing to 158925. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158925, current: 101418; changing to 158926. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158926, current: 103769; changing to 158927. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158927, current: 106120; changing to 158928. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158928, current: 108471; changing to 158929. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158929, current: 110822; changing to 158930. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158930, current: 113173; changing to 158931. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158931, current: 115524; changing to 158932. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158932, current: 117876; changing to 158933. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158933, current: 120227; changing to 158934. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158934, current: 122578; changing to 158935. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158935, current: 124929; changing to 158936. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158936, current: 127280; changing to 158937. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158937, current: 129631; changing to 158938. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158938, current: 131982; changing to 158939. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158939, current: 134333; changing to 158940. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158940, current: 136684; changing to 158941. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158941, current: 139035; changing to 158942. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158942, current: 141386; changing to 158943. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158943, current: 143737; changing to 158944. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158944, current: 146088; changing to 158945. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158945, current: 148439; changing to 158946. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158946, current: 150790; changing to 158947. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158947, current: 153141; changing to 158948. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158948, current: 155492; changing to 158949. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d71ee0] Non-monotonous DTS in output stream 0:0; previous: 158949, current: 157843; changing to 158950. This may result in incorrect timestamps in the output file.
[output stream 0:0 @ 0x1d74560] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
size=     521kB time=00:00:08.23 bitrate= 518.5kbits/s    
video:0kB audio:470kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.811484%
Input file #0 (silent.aac):
  Input stream #0:0 (audio): 432 packets read (5650 bytes); 432 frames decoded (442368 samples); 
  Total: 432 packets (5650 bytes) demuxed
Output file #0 (out.ts):
  Output stream #0:0 (audio): 384 frames encoded (442368 samples); 384 packets muxed (481488 bytes); 
  Total: 384 packets (481488 bytes) muxed
432 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1d44c20] Statistics: 0 seeks, 192 writeouts
[AVIOContext @ 0x1d44b20] Statistics: 5650 bytes read, 0 seeks

Full log of setting max_ts_probe to 78:

$ ffmpeg -v 9 -loglevel 99 -max_ts_probe 78 -i silent.aac -y out.ts
ffmpeg version N-72842-gfb92f3e Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: --prefix=/usr --shlibdir=/usr/lib64 --libdir=/usr/lib64 --incdir=/usr/include --bindir=/usr/bin --datadir=/usr/share/ffmpeg --mandir=/usr/share/man
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-max_ts_probe' ... matched as AVOption 'max_ts_probe' with argument '78'.
Reading option '-i' ... matched as input file with argument 'silent.aac'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'out.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file silent.aac.
Successfully parsed a group of options.
Opening an input file: silent.aac.
Probing aac score:51 size:2048
Probing mpegts score:-1094995529 size:2048
Probing msnwctcp score:-1 size:2048
[aac @ 0x312f300] Format aac probed with size=2048 and score=51
[aac @ 0x312f300] Before avformat_find_stream_info() pos: 0 bytes read:5650 seeks:0
[aac @ 0x312f300] All info found
[aac @ 0x312f300] Estimating duration from bitrate, this may be inaccurate
[aac @ 0x312f300] 0: start_time: -9223372036854.775 duration: 284.887
[aac @ 0x312f300] stream: start_time: -9223372036854.775 duration: 10.094 bitrate=4 kb/s
[aac @ 0x312f300] After avformat_find_stream_info() pos: 2048 bytes read:5650 seeks:0 frames:78
Input #0, aac, from 'silent.aac':
  Duration: 00:00:10.09, bitrate: 4 kb/s
    Stream #0:0, 78, 1/28224000: Audio: aac (LC), 44100 Hz, stereo, fltp, 4 kb/s
Successfully opened the file.
Parsing a group of options: output file out.ts.
Successfully parsed a group of options.
Opening an output file: out.ts.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x311a400] Setting 'time_base' to value '1/44100'
[graph 0 input from stream 0:0 @ 0x311a400] Setting 'sample_rate' to value '44100'
[graph 0 input from stream 0:0 @ 0x311a400] Setting 'sample_fmt' to value 'fltp'
[graph 0 input from stream 0:0 @ 0x311a400] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x311a400] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[audio format for output stream 0:0 @ 0x311a840] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:0 @ 0x311a840] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000'
[audio format for output stream 0:0 @ 0x311a840] Setting 'channel_layouts' to value '0x4|0x3'
[audio format for output stream 0:0 @ 0x311a840] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'
[AVFilterGraph @ 0x311aa40] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x3140b60] ch:2 chl:stereo fmt:fltp r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[mpegts @ 0x3152140] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'out.ts':
  Metadata:
    encoder         : Lavf56.36.100
    Stream #0:0, 0, 1/90000: Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s
    Metadata:
      encoder         : Lavc56.41.100 mp2
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
[output stream 0:0 @ 0x311af40] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
size=     521kB time=00:00:10.02 bitrate= 426.0kbits/s    
video:0kB audio:470kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.811484%
Input file #0 (silent.aac):
  Input stream #0:0 (audio): 432 packets read (5650 bytes); 432 frames decoded (442368 samples); 
  Total: 432 packets (5650 bytes) demuxed
Output file #0 (out.ts):
  Output stream #0:0 (audio): 384 frames encoded (442368 samples); 384 packets muxed (481488 bytes); 
  Total: 384 packets (481488 bytes) muxed
432 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x31372e0] Statistics: 0 seeks, 192 writeouts
[AVIOContext @ 0x312ebe0] Statistics: 5650 bytes read, 0 seeks

Change History (1)

comment:1 by ezran, 9 years ago

Summary: Incorrect timestamps if probing reads 1024 byes or less of a streamIncorrect timestamps if probing reads 1024 bytes or less of a stream
Note: See TracTickets for help on using tickets.