VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Chicken McNewblet
    Join Date
    Sep 2009
    Location
    United States
    Search Comp PM
    Hey guys, back at it again with these gosh darn .ts files I keep having so much trouble with.

    So I've been capturing some old Video8 footage using an Elgato Capture HD unit. The Elgato splits the tape capture into multiple chunks and stores AVC video and AAC audio in a .ts container, this is the results of ffprobe for one of the chunks:

    Code:
    [mpegts @ 0000022e684579c0] DTS 160346 < 164852 out of order
    [mpegts @ 0000022e684579c0] Stream #1: not enough frames to estimate rate; consider increasing probesize
    [mpegts @ 0000022e684579c0] start time for stream 1 is not set in estimate_timings_from_pts
    [mpegts @ 0000022e684579c0] stream 1 : no TS found at start of file, duration not set
    [mpegts @ 0000022e684579c0] Could not find codec parameters for stream 1 (Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    Input #0, mpegts, from '.\Recording_1969-12-31_19-00-00_0001.ts':
      Duration: 00:02:36.12, start: 1.736956, bitrate: 14906 kb/s
      Program 2
      Stream #0:0[0x64]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709, top first), 720x480 [SAR 10:11 DAR 15:11], 29.97 fps, 59.94 tbr, 90k tbn
      Stream #0:1[0x66]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv), 90k tbr, 90k tbn
      Stream #0:2[0x67](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:3[0x69](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:4[0x3ec](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:5[0x3f0](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:6[0x3f7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:7[0x65](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:8[0x3f3](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:9[0x3eb](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:10[0x3f5](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:11[0x3ed](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:12[0x3f1](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
      Stream #0:13[0x4e7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 224 kb/s
    Note the errors at the beginning, also if anyone can tell me what stream 0:1 is I'd be elated.

    How I want to handle these files is this:
    1. NOT transcode them
    2. Concatenate all the stream chunks into one file
    3. Demux them so I can get rid of the extraneous audio channels and whatever stream 0:1 is
    4. Remux them into an MP4 container
    5. HOPEFULLY be able to split them accurately by keyframe so I can split them into separate files per tape scene
    6. HOPEFULLY be able to play them back on a device/medium that handles deinterlacing/resizing properly (which apparently is not VLC lol)

    So I tried to concatenate them using ffmpeg, resulting in a long, long string of the following errors:

    Code:
    [mpegts @ 00000255d8e55200] Invalid DTS: 669185 PTS: 666183 in output stream 0:0, replacing by guess
    [mpegts @ 00000255d8e55200] Non-monotonic DTS in output stream 0:0; previous: 669186, current: 669185; changing to 669187. This may result in incorrect timestamps in the output file.
    As the error suggests, this produces an output file with an extremely choppy framerate. So that didn't work.

    Interestingly, if I convert the videos using ffmpeg to x264 using the following command:

    Code:
    ffmpeg -i "input.ts" -c:v libx264 -crf 20 -preset fast -vf yadif=1,scale=640:480 -c:a libmp3lame -q:a 0 "output.mp4"
    I get a perfect output file with no issues. Like I said though, I'm trying to avoid transcoding.

    So in the past I've had some decent results with TS Doctor. I load that program up, it pulls all the recording chunks together and does some repairs on the file, enabling me to export them all to one .ts file. This is good! I am also able to successfully demux the resulting video into a .264 file and a .aac file using the streams I want, which is also good. However, when I attempt to remux them back into one file, I get this error:

    Name:  m3iUrDP.png
Views: 309
Size:  14.9 KB

    This is the file YOU demuxed, TS Doctor! Sheesh!

    Okay, so maybe I can remux it using ffmpeg...nope, long list of errors:

    Code:
    [mp4 @ 0000024f14c1a000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    [mp4 @ 0000024f14c1a000] pts has no value
        Last message repeated 608 times
    [mp4 @ 0000024f14c1a000] pts has no valueB time=00:00:10.08 bitrate=11439.0kbits/s speed=20.2x
        Last message repeated 601 times
    [mp4 @ 0000024f14c1a000] pts has no valuekB time=00:00:20.10 bitrate=11471.4kbits/s speed=20.1x
        Last message repeated 611 times
    [mp4 @ 0000024f14c1a000] pts has no valuekB time=00:00:30.31 bitrate=11481.8kbits/s speed=20.2x
        Last message repeated 621 times
    [mp4 @ 0000024f14c1a000] pts has no valuekB time=00:00:40.68 bitrate=11495.4kbits/s speed=20.3x
        Last message repeated 552 times
    [mp4 @ 0000024f14c1a000] pts has no valuekB time=00:00:49.90 bitrate=11472.1kbits/s speed=19.9x
        Last message repeated 608 times
    
    ...
    
    ...
    Am I supposed to have some kind of timecode file that needs to be included in this process or something? What am I doing wrong, or is this even a feasible strategy?

    Relatedly, I've also had zero luck with trying to slice the TS Doctor-generated .ts file using VirtualDub and VirtualDub2, which tells me that direct stream copy can't be used on that file.
    Quote Quote  
  2. Try to remux the ts files first with tsmuxer.
    Quote Quote  
  3. Chicken McNewblet
    Join Date
    Sep 2009
    Location
    United States
    Search Comp PM
    Originally Posted by ProWo View Post
    Try to remux the ts files first with tsmuxer.
    So I think that worked, but now I'm curious. When I initially concatenated all the chunks using TS Doctor, the resulting file was >8GB in size. The remuxed file using tsmuxer is now roughly >6GB in size. What data is missing? Is it just blank metadata from all the extraneous streams?

    EDIT: Or is it video metadata from the active stream that is discarded?
    Last edited by CursedLemon; 7th Oct 2023 at 12:54.
    Quote Quote  
  4. Chicken McNewblet
    Join Date
    Sep 2009
    Location
    United States
    Search Comp PM
    So it looks like nothing is playing these captured files correctly, it seems something about the metadata is getting the interlacing wrong, like maybe the video is marked with TFF rather than BFF. It seems like I'll just have to reencode these files, which is fine as they're indistinguishable, I just hoped I could get away with not doing it.
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    After you remux with TSMuxer, use mkvtoolnix to remux to mkv
    Quote Quote  



Similar Threads

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