So, I record various TV programs using my DVB-T2 receiver in .ts format. I remove unnecessary stuff using lossless editing programs such as Videoredo and Avidemux, keeping only the stuff I want and remux into .mp4 (a format supported by everything while also allowing importing to Premiere for further editing, if necessary. I know H.264 is bad for editing but that's not the point/problem here).
Once I open pretty much any of these .mp4 videos with Premiere though (also tried Shotcut), they play faster or slower at times, frames are being repeated 2 and 3 times and I get audio/video sync problems. Checking the sequence settings (set by the videos) or the video properties seem to reveal what could be the issue but not what causes it: the reported framerates are random numbers like 30.05 or 17.5 fps (local broadcoasts are always 25.00 FPS) and “variable framerate detected”. The thing is, the original .ts recordings play fine in Premiere and they don't appear to have VFR. Neither MediaInfo nor Premiere say so, and again, even if they do have VFR, that doesn't cause the problems I've described. Also, please notice that if I trim snippets with the programs I've mentioned, but output as a new .ts files, those videos play fine in Premiere too. Videoredo dev insists their program is impossible to output VFR when I asked in their forums btw.
Then I've been recommended to try Shutter Encoder. Remuxing the original recording to ProRes has no issues but remuxing to .mp4, once again, results in the same problems when imported to Premiere.
I understand these programs use FFmpeg a lot so I've decided to try it on its own, with some pretty basic remux .ts to .mp4 commands such as:
and sure enough, the output .mp4 files have the same issues when imported to Premiere. So, what’s going on here?Code:ffmpeg -i input.ts -c copy output.mp4 ffmpeg -y -i full-ts.ts -c:v copy full.mp4
Why does remuxing a .ts recording which plays perfectly fine on Premiere and seemingly have CFR (at least that's what Premiere and MediaInfo say, and again, even if it isn't CFR, it doesn't come with the problems present when Premiere says "VFR detected") to .mp4 leads to Premiere (and Shotcut) complaining about VFR and creates the issues I've mentioned?
Is that a Premiere quirk misinterpreting CFR for VFR? A FFMpeg bug? An issue with my original recordings? (which play fine on Premiere though).
Anyone knows what's going and how could I get a simple .ts ---> .mp4 remux/repackage (no re-encoding of course) without the issues I've mentioned?
For what is worth, here are two MediaInfo sheets, first of an original .ts recording (which has no issues) then a trimmed snippet of the same recording remuxed in mp4 with Videoredo (which has issues).
[Attachment 57489 - Click to enlarge]
+ Reply to Thread
Results 1 to 7 of 7
-
-
I do not see the info for the ts
It should say: "Scan type, store method : Interleaved fields" for typical "interlace" or mbaff , but yours' says "separated fields."
That suggests double the framerate, as the field rate... when you separate fields for 25fps interlaced you get 50fps indvidual fields -
Hi, thanks for your reply. I am not really following since I am not familiar with the terms "interleaved/separated fields" and "mbaff" (in any case the original .ts says the same and it plays fine on Premiere), so if you could elaborate and/or more importantly let me know how this could help me solve the issue I'd really appreciate it.
-
oh I see you put them side by side in the 1st post
I found some sample files with similar specs and they work ok in PP or shotcut for me when rewrapping with mp4box
But it might be some other incompatibility in your specific recordings, or the way you cut them, but try mp4box first (or some gui for it) . First on an uncut file, then on a cut file. -
So, I've downloaded mp4box and tried it on two separate uncut .ts recordings. I've put each file (separate attempts of course) in "C:\Program Files\GPAC", renamed it as "input" and ran:
HTML Code:mp4box -add input.ts output.mp4
AIT sections on pid 2615
AIT sections on pid 2615
[M2TSDmx] Stream type 340 not supported - ignoring pid
[M2TSDmx] Stream type 5 not supported - ignoring pid
Track Importing MP3
[MPEG-2 TS] PES 2611: Packet discontinuity (12 expected - got 3) - trashing PES packet
[MPEG-2 TS] PES 2610: Duplicated Packet found (CC 9) - skipping
[MPEG-2 TS] PES 2611: Packet discontinuity (12 expected - got 7) - may have lost end of previous PES
[MPEG-2 TS] PID 2611 PES payload size 538 but received 354 bytes
[MPEG-2 TS] PES 2610: Packet discontinuity (5 expected - got 0) - trashing PES packet
[MPEG-2 TS] PES 2611: Packet discontinuity (6 expected - got 10) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (14 expected - got 7) - trashing PES packet
[MPEG-2 TS] PES 2611: Packet discontinuity (3 expected - got 12) - trashing PES packet
[MP4Mux] PID has no input packet and configuration not known after 10 retries, aborting initial timing sync
AVC|H264 Import results: 0 samples (0 NALUs) - Slices: 0 I 0 P 0 B - 0 SEI - 0 IDR
AVC|H264 Max NALU size is 0 - stream could be optimized by setting nal_length=1
0.500 secs Interleaving
and
C:\Program Files\GPAC>mp4box -add input.ts output.mp4
AIT sections on pid 2615
AIT sections on pid 2615
[M2TSDmx] Stream type 340 not supported - ignoring pid
[M2TSDmx] Stream type 5 not supported - ignoring pid
Track Importing MP3
[MPEG-2 TS] PES 2610: Packet discontinuity (12 expected - got 1) - trashing PES packet
[MPEG-2 TS] PES 2611: Packet discontinuity (11 expected - got 0) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (4 expected - got 10) - trashing PES packet
[MPEG-2 TS] PES 2611: Duplicated Packet found (CC 10) - skipping
[MPEG-2 TS] PES 2610: Packet discontinuity (10 expected - got 13) - trashing PES packet
[MPEG-2 TS] PES 2611: Duplicated Packet found (CC 13) - skipping
[MPEG-2 TS] PES 2610: Packet discontinuity (7 expected - got 13) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (4 expected - got 15) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (0 expected - got 4) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (10 expected - got 15) - trashing PES packet
[MPEG-2 TS] TS Packet 7510121 has error (PID could be 2610)
[MPEG-2 TS] TS Packet 7510122 has error (PID could be 2610)
[MPEG-2 TS] PES 2610: Packet discontinuity (5 expected - got 9) - trashing PES packet
[MPEG-2 TS] PES 2610: Packet discontinuity (8 expected - got 6) - trashing PES packet
[MPEG-2 TS] PES 2611: Packet discontinuity (4 expected - got 8) - trashing PES packet
[MPEG-2 TS] PID 2611 PES payload size 538 but received 170 bytes
[MP4Mux] PID has no input packet and configuration not known after 10 retries, aborting initial timing sync
AVC|H264 Import results: 0 samples (0 NALUs) - Slices: 0 I 0 P 0 B - 0 SEI - 0 IDR
AVC|H264 Max NALU size is 0 - stream could be optimized by setting nal_length=1
0.500 secs Interleaving
Then tried on a trimmed .ts recording (which as I've said, it plays fine on Premiere). This time I got an .mp4 file as output but it has the same issues when reporting in Premiere. Here's the log:
C:\Program Files\GPAC>mp4box -add input.ts output.mp4
[M2TSDmx] Stream type 340 not supported - ignoring pid
Track Importing MP3
Track Importing MPEG-4 AVC - Width 1920 Height 1080 FPS 90000/0 SAR 1/1
OpenGOP detected - adjusting file brand
AVC|H264 Import results: 15287 samples (46665 NALUs) - Slices: 496 I 3520 P 11271 B - 15099 SEI - 37 IDR
0.500 secs Interleaving
What gives? Also, what's with that Osmo4/mp4client that comes with mp4box, hope it's not adware or something? -
Maybe you have packet errors in the recording, that's what the log suggests
TS has error correction and other mechanisms to sync timing, but the filesize is typically 6-8% larger , but maybe that's your only option for those recordings
Similar Threads
-
decomb filter for avisynth: can double framerate?
By marcorocchini in forum Newbie / General discussionsReplies: 16Last Post: 28th Jun 2020, 18:12 -
Wrong framerate during FFMPEG concatenation
By qo4on in forum Newbie / General discussionsReplies: 21Last Post: 28th Apr 2020, 06:57 -
Program that will remux MKV, FLV, and AVI to MP4
By 90sTV in forum MacReplies: 5Last Post: 18th Apr 2019, 17:33 -
remux mp4 question: PLEASE HELP
By maverickluke in forum Video ConversionReplies: 62Last Post: 23rd Jun 2017, 09:36 -
Remux mp4 adding subtitle - PLEASE HELP
By maverickluke in forum SubtitleReplies: 17Last Post: 18th May 2017, 13:10