VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Hello, I have this issue where I'm downloading a HLS stream using streamlink, and I download them to .ts format for best stability as after many trial and error trying to download directly to mkv resulted in delayed audio also. Now I'm trying to convert these files to mkv format to edit them, but both using ffmpeg or mkvtoolnix, audio issues happen (delayed audio, straight up no audio and random screeches of loud noise)

    Here are the logs trying to convert using ffmpeg and having an output with no sound at the beginning, but halfway through it has no sound :
    ffmpeg -i .\prof1.ts -c copy "prof1.mkv"

    [aist#0:1/aac @ 00000202e79dee40] timestamp discontinuity (stream id=221): -20011999, new offset= 20011999
    [vist#0:0/h264 @ 00000202e6fc9d00] timestamp discontinuity (stream id=211): 20012000, new offset= -1
    [vist#0:0/h264 @ 00000202e6fc9d00] timestamp discontinuity (stream id=211): -20012000, new offset= 20011999
    [aist#0:1/aac @ 00000202e79dee40] timestamp discontinuity (stream id=221): -4010666, new offset= 24022665
    [vist#0:0/h264 @ 00000202e6fc9d00] timestamp discontinuity (stream id=211): -4000000, new offset= 28022665
    [aist#0:1/aac @ 00000202e79dee40] timestamp discontinuity (stream id=221): -21485999, new offset= 49508664
    [aist#0:1/aac @ 00000202e79dee40] timestamp discontinuity (stream id=221): -22030432, new offset= 71539096
    [mpegts @ 00000202e6f51a80] DTS 1998004806 < 1999982196 out of order
    [out#0/matroska @ 00000202e6f5d740] video:2618569KiB audio:117852KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.078680%

    What I'm confused about is that I had this type of message in other attempts of conversion, but the output file was perfectly fine.
    This lack of consistency is what is getting me so confused.

    Example of messages in fine output file :
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): 51625148, new offset= -51625148
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): -51625144, new offset= -4
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): 51623258, new offset= -51623262
    [h264 @ 0000025bd67341c0] illegal memory management control operation 32
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 32
    [h264 @ 0000025bd67341c0] reference count 1 overflow
    Last message repeated 2 times
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 31
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 32
    [h264 @ 0000025bd67341c0] reference count 1 overflow
    [h264 @ 0000025bd67341c0] reference overflow 1118 > 15 or 0 > 15
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 32
    Last message repeated 1 times
    [h264 @ 0000025bd67341c0] illegal memory management control operation 32
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 32
    [h264 @ 0000025bd67341c0] reference count 1 overflow
    Last message repeated 1 times
    [h264 @ 0000025bd67341c0] illegal reordering_of_pic_nums_idc 32
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): -9985886, new offset= -41637376
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): -9960000, new offset= -31677376
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): -27149953, new offset= -4527423
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): 27149956, new offset= -31677379
    [mpegts @ 0000025bd6691a80] DTS 6149782746 < 6152222646 out of order
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): -27110000, new offset= -4567379
    [aost#0:1/copy @ 0000025bd6d0e400] Non-monotonic DTS; previous: 134862, current: 134845; changing to 134862. This may result in incorrect timestamps in the output file.
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): 31750000, new offset= -36317379
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): -10007730, new offset= -26309649
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): 10007734, new offset= -36317383
    [mpegts @ 0000025bd6691a80] DTS 7020312786 < 7021209186 out of order
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): -9960000, new offset= -26357383
    [aost#0:1/copy @ 0000025bd6d0e400] Non-monotonic DTS; previous: 9785629, current: 9785604; changing to 9785629. This may result in incorrect timestamps in the output file.
    [aist#0:1/aac @ 0000025bd6716640] timestamp discontinuity (stream id=221): -20987974, new offset= -5369409
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): 20987967, new offset= -26357376
    [mpegts @ 0000025bd6691a80] DTS 7020223866 < 7022109186 out of order
    [vist#0:0/h264 @ 0000025bd772f040] timestamp discontinuity (stream id=211): -20948000, new offset= -5409376
    [aost#0:1/copy @ 0000025bd6d0e400] Non-monotonic DTS; previous: 9805573, current: 9805556; changing to 9805573. This may result in incorrect timestamps in the output file.
    [out#0/matroska @ 0000025bd67158c0] video:3232659KiB audio:164495KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.071552%
    size= 3399585KiB time=02:55:45.47 bitrate=2640.9kbits/s speed= 223x


    Any help is appreciated, thank you.
    Last edited by wah; 22nd May 2024 at 06:15.
    Quote Quote  
  2. Download to mp4 the next time.
    Quote Quote  
  3. Originally Posted by ProWo View Post
    Download to mp4 the next time.
    Unfortuntely as I specified, I tried a bunch of different formats, and only .ts produces a file with no issues.
    Quote Quote  
  4. The problem doesn't concern av container type but the streaming or connection quality. Fixing such errors like you list always leads to skipping of some frames and thus to a/v jumps
    Quote Quote  
  5. Originally Posted by noemi7 View Post
    The problem doesn't concern av container type but the streaming or connection quality. Fixing such errors like you list always leads to skipping of some frames and thus to a/v jumps
    update : I just tried this command
    ffmpeg -i .\prof1.ts -c:v copy -c:a aac output.mkv
    and finally the produced file has normal audio, does this mean I have to re-encode the audio each time I want to convert it or is there a way to fix this directly ?
    Quote Quote  
  6. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Try opening the ts files in TS Doctor. It usually finds errors and creates a new file without errors. Give it a try. 30 days fully functional trial available.
    I have been using it for many years after recording files from my satellite dish.
    Quote Quote  
  7. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Yes definitely try TSDoctor to iron out transmission errors
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!