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:
Note the errors at the beginning, also if anyone can tell me what stream 0:1 is I'd be elated.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
How I want to handle these files is this:
- NOT transcode them
- Concatenate all the stream chunks into one file
- Demux them so I can get rid of the extraneous audio channels and whatever stream 0:1 is
- Remux them into an MP4 container
- HOPEFULLY be able to split them accurately by keyframe so I can split them into separate files per tape scene
- 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:
As the error suggests, this produces an output file with an extremely choppy framerate. So that didn't work.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.
Interestingly, if I convert the videos using ffmpeg to x264 using the following command:
I get a perfect output file with no issues. Like I said though, I'm trying to avoid transcoding.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"
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:
This is the file YOU demuxed, TS Doctor! Sheesh!
Okay, so maybe I can remux it using ffmpeg...nope, long list of errors:
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?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 ... ...
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.
+ Reply to Thread
Results 1 to 5 of 5
-
-
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.
-
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.
Similar Threads
-
Having trouble merging video files together
By gutterboy333 in forum EditingReplies: 4Last Post: 23rd Apr 2023, 13:47 -
Demuxing MP4 and M2TS Files
By AvantGardeSavant in forum Video ConversionReplies: 4Last Post: 10th Feb 2022, 12:17 -
MPEG-2 Demuxing/Remuxing Revisited
By darkflux in forum DVD RippingReplies: 8Last Post: 4th Dec 2021, 08:12 -
Demuxing with MKVMerge then Remuxing with MKVToolnix - Audio is out of sync
By VideoFanatic in forum Video ConversionReplies: 6Last Post: 6th Nov 2020, 01:26 -
Advice Needed: I'm Having Trouble Burning Some PAL files from AVC to DVD
By Baudelaire in forum Video ConversionReplies: 7Last Post: 19th Sep 2020, 19:51