converting a .ts file video file to an mpg4 video file

stuart-pettigrew wrote on 3/14/2020, 6:41 PM

I have a lot of trouble making an mp4 video file from a customer's .ts video file. Actually haven't succeeded at all. Any input toward how to accomplish this conversion would be appreciated. I'm using Vegas Pro 17 on a Windows 10 PC. Thanks!

lenard-p wrote on 3/14/2020, 7:00 PM

something like Avidemux , you choose copy for video and audio if they are codecs vegas can read, save as mp4, If audio is something unusual but video is AVC etc, choose to re-encode the audio instead of copy. If you know both the video and audio codecs can't be read by vegas you may as well use handbrake as you can bump up the bitrate and use hardware encoding for a fast intermediate

fifonik wrote on 3/14/2020, 7:07 PM

You can try to re-wrap it in the same way as in FAQ for mov:

\path\to\ffmpeg.exe -i input.ts -vcodec copy -acodec copy output.mp4

Last changed by fifonik on 3/14/2020, 7:07 PM, changed a total of 1 times.

Camcorder: Panasonic X920

Desktop: MB: MSI B450M MORTAR TITANIUM, CPU: AMD Ryzen 3700X (not OC), RAM: G'Skill 16 GB DDR4@3200 (not OC), Graphics card: MSI RX580 8GB (factory OC), SSD: Samsung 970 Evo+ NVMe 500MB (OS), HDDs: Seagate & Toshiba 2TB, OS: Windows 10 Pro 1909

NLE: Vegas Pro  11, 12, 13, 15, 17

JJKizak wrote on 3/14/2020, 7:18 PM

I may be mistaken but I think the very early versions of Vegas handled those files.

JJK

JN- wrote on 3/14/2020, 7:56 PM

@stuart-pettigrew I transfer .ts movies I record from Sat to mp4 using ffmpeg, but on some I had problems with the good idea suggested by @fifonik (because of file corruption) so I settled on re-encoding both the video and audio streams.

The .ts files I deal with have multiple audio streams and the video stream can be sometimes located at index other than 0, so vp cannot always handle it, and or the multiple audio streams.

Even when vp can load the files it may or may not complete the render, this is because of some slight corruption in the original .ts file. So I always transcode the complete file first using ffmpeg.

Maybe use mediainfo to see the video and audio streams in the file, and post here.

On balance, @lenard-p's suggestion is probably the simplest way to go.

Last changed by JN- on 3/14/2020, 8:16 PM, changed a total of 3 times.

---------------------------------------------

Codec Render Quality tables

---------------------------------------------

PC ... Corsair case, own build ...

CPU .. i9 9900K, iGpu UHD 630

Memory .. 32GB DDR4

Graphics card .. MSI RTX 2080 ti

Graphics driver .. latest studio

PSU .. Corsair 850i

Mboard .. Asus Z390 Code

Laptop ... (Acer Predator G9-793-77AC)

CPU .. i7-6700HQ Skylake-H

Memory ..32 GB DDR4, was previously 16 GB

Graphics card .. Nvidia GTX 1070

Graphics driver .. latest studio

john_dennis wrote on 3/14/2020, 7:58 PM

We need to see what's in that .ts wrapper. Follow this link and post Mediainfo for the files.

@JJKizak

👍 Vegas Pro 17-421 handles OTA ATSC .ts with MPEG-2 video and AC3 audio better than ever.

👎 I rarely want to watch any of it the first time.

Musicvid wrote on 3/14/2020, 8:00 PM

.TS, or Transport Stream, being first a hardware acquisition format, is allowed and expected to contain errors. These errors can range from mild (camcorder footage) to many (OTA Broadcast), and even in moderate amounts, can choke any nonlinear editor (not just Vegas).

Since they usually play fine in software players (WMP, VLC), which are designed to fudge their way through multiple corrupt frames, the editing software (Vegas in this case), usually gets blamed. Not so, it is the errored stream.

Since the decoders used in editing software don't have the luxury of realtime P and B predictive decoding, it can't knit a reasonable fudge frame without sufficient data. Just one corrupt I-frame, and you can be done for the project. Some external decoders are better at passing bad frames than others.

Muxers like AVIDemux or TSMuxer are unlikely to help, since they just rewrap the dirty TS as a pretty Program Stream, without actually fixing anything.

Also, it should be mentioned that encoding a Program Stream (.mpg, .mp4, .mov) from your broadcast source does not correct stream errors or structures. It just puts a pretty face on your content, like mascara on a pig.

A very powerful remuxer is VideoRedo. It fixes all the stream and capture errors (within reason) and even resyncs the audio when it is forced to drop a frame. GOP integrity is restored to Program Stream standards, and a pretty amazing list of codecs is available for production uses.

This is not a commercial; it's a valuable accessory for my Vegas workflow, along with HOS and Handbrake. A utility called MP4Joiner has also been mentioned, but I haven't tested it with bad footage.

This message may repeat without warning, perhaps in about 6 months.

stuart-pettigrew wrote on 3/15/2020, 12:20 PM

Thank you all for the input. I realize now that my question was vague in that I was asking if I could use one of those many 'render as' codecs that are supplied with Vegas. From what I have learned from your responses, that's not an option. But I'm not finished studying all that you all have written, and trying the suggestions. I'll write more later as I learn from what you've suggested.