-
m2ts rendered in Vegas Pro 10e won’t play properly on Media Player
Posted by John Allen on September 5, 2011 at 2:05 amHi. I’m a newbie
I have recorded a piece of HD television in m2ts file format (1080-50 interlaced 25 fps). Its about 4 gigs. The original m2ts file plays perfectly on my AC Ryan PlayOn HD2 media player.
I edited the piece down to about 1 gig using Vegas Pro 9 and 10e (separately) then rendered it to the same spec and file format. It plays perfectly on my laptop. However, on my media player, it loses audio/video sync within about 30 seconds and the playback becomes jerkey, totally unwatchable.
Am I doing something wrong here? The commonality is rendering with Vegas Pro.
Any ideas, please.
Nathan Smith replied 14 years, 8 months ago 3 Members · 7 Replies -
7 Replies
-
Dave Haynie
September 5, 2011 at 3:08 pmIf you lose A/V sync, that’s usually a player problem. The likely cause is that your player can’t keep up with the video format, and should be dropping frames to maintain audio sync. But the fool who wrote that media player doesn’t know how to write media player software (appropriate responses are [a] quietly drop frames to maintain sync, or [b] warn the user that the hardware cannot support this format).
You’ll find this on pretty much any Android video player, for example (at least up to Android 2.2).
And in playing around with Android, I have found that Sony AVC is more difficult for the dedicated AVC/H.264 decoders to decode (specifically, on a Tegra2 based tablet) than Main Concept AVC, even at the same bitrate and profile type. I did experiments in Base, Main, and High profile at 6Mb/s, 720/24p. The Main Concept encoding (AAC audio, MP4 file wrapper) encoded just dandy, while the Sony file, same exact specs, didn’t play right… the audio walked away from the video.
Again, the player should either warn you or correct for this… losing audio sync is the result of lazy media player coding. But in your specific case, you might at least try rendering using Main Concept rather than Sony for your AVC. I still have no idea why Sony would be more difficult to decode than Main Concept, but it’s pretty easy to demonstrate.
At 720/24p and 4Mb/s, both decoders played back correctly — also kind of odd, since I’d expect the bottleneck to be in the AVC decoder proper, not really related to the bitrate. And I saw no difference going from Base to Main to High profile (Main Concept, as I recall, doesn’t do High profile… you don’t want that anyway if you’re having decoding problems).
MPEG-2 Transport Stream and AC-3 should be slightly easier to decode than AAC audio and MP4 file wrappers, but you might play around with container formats. Some media players have bad code for one file wrapper versus another — I’ve read of folks fixing their playback problems just by remuxing (eg, change from MPEG-2 TS to MP4 or MKV or something else, see what happens).
-Dave
-
John Allen
September 5, 2011 at 8:03 pmDave, thank you for your reply. Most appreciated.
Can I just make a few comments –
(1) I experimented with rendering to mkv and mp4 as you suggested. Both of these formats worked. I cld change the size of the mkv file over progressive renders. The quality was nowhere near as good as the original m2ts as you wld expect. I’m trying to maintain quality. The mp4 on the other had was scarcely distinguishable from the original m2ts file. So I guess that’s a happy ending. So again, thank you.
(2) I have had access to WD TV Live, Seagate Theatre+, and AC Ryan PlayOn HD2 media players. All three of them exhibit this playback behaviour. I find that a bit strange, a bit coincidental. As you say, pretty easy to demonstrate.
(3) This is the bit that I don’t understand. The original m2ts file recorded on a Panasonic DMR-BW850 HD recorder plays perfectly on all three media players. However, the edited (on Vegas Pro), and then rendered, verson to an m2ts file, slightly smaller (about a gig) than the original, doesn’t play on the media players. That suggests to me that the rendering spec in Vegas may not be the same as that of the Panasonic HD recorder??
However, mp4 cetainly works.
Many thanks.
-
Dave Haynie
September 7, 2011 at 4:32 pm[John Allen] “1) I experimented with rendering to mkv and mp4 as you suggested. Both of these formats worked. I cld change the size of the mkv file over progressive renders. The quality was nowhere near as good as the original m2ts as you wld expect. I’m trying to maintain quality. The mp4 on the other had was scarcely distinguishable from the original m2ts file. So I guess that’s a happy ending. So again, thank you.”
Did you just re-multiplex these, or render them? What I suggested was taking the Vegas output, then trying a different file wrapper… using something like YAMB to re-mux the Vegas transport stream to .MP4, or … hmm… not sure about .mkv tools, I haven’t done much with that (they should get more popular, Google’s WebM wrapper is derived from the Matroska open container format). If you’re re-multiplexing, it’s exactly the same video, so unless there’s something wrong with your player, the output quality should be the same.
I did notice something weird with Sony’s transport stream format, some months ago… it had some issues as a proper streaming format (even those that’s what MPEG-2 Transport Stream is for.. sure, it’s used on Blu-ray, but it was primarily developed for serial transmissions, such as DVB and ATSC television standards). I used the freeware tsmuxer software to re-mux my Sony-created output. After that, it streamed just dandy (this was for a digital radio demo… I was demonstrating that my radio could handle multiple bitstreams. But it had to play well over the simple streaming stuff in VLC, which is always a bit of a challenge).
[John Allen] “(2) I have had access to WD TV Live, Seagate Theatre+, and AC Ryan PlayOn HD2 media players. All three of them exhibit this playback behaviour. I find that a bit strange, a bit coincidental. As you say, pretty easy to demonstrate.”
I don’t really know if it was Vegas/Sony or the player at fault here. But it’s very likely that, for most of these media players, they’re based on the same open source decoders as found in VLC and other common freeware… if you look at the origins of VLC, even, you find most of these things all share code back to some single source. Warts and all. And in fact, most of these media players are running Linux, so it’s quite possible they’re running exactly the same MPEG-2 Transport Stream decoder software.
One easy test if it’s just the multiplexing, as mentioned: remux. Make the MPEG-4/AVC output as an MPEG-2 Transport Stream, using the Sony CODEC. See that it has that problem. Next, try remuxing back to .m2ts or .ts using tsmuxer, try that one. Once again, start with the Sony video, try remuxing to .mp4 using something like YAMB. In all cases, the video is identical.
Of course, you can have the Sony CODEC produce .MP4 output directly, rather than .m2ts. If you want identical quality, take the Sony template you were happy with, then just change the file wrapper type, on the “System” page (double-check that doesn’t mess with any of the other settings).
[John Allen] “(3) This is the bit that I don’t understand. The original m2ts file recorded on a Panasonic DMR-BW850 HD recorder plays perfectly on all three media players. However, the edited (on Vegas Pro), and then rendered, verson to an m2ts file, slightly smaller (about a gig) than the original, doesn’t play on the media players. That suggests to me that the rendering spec in Vegas may not be the same as that of the Panasonic HD recorder??”
The gigabyte difference is what tells me you’re not rendering out at the same format you’re using as input. It’s likely you’re not rendering out at the same bitrate as you’re accepting. That doesn’t mean it’s worse, depending on the specifics of the encoder.
But the playback, that’s very likely the effect of some disagreement, some problem in the way the transport stream is constructed. As described, the way to prove this is to re-mux the existing bad-playing file to another format, see if that plays. A possible way to just avoid the problem is to rendering out directly to .MP4 rather than .M2TS. Your recorded videos play because, presumably, they do not have whatever aspect of the Sony transport stream is tripping up the media players.
-Dave
-
John Allen
September 8, 2011 at 2:20 amGreat response, Dave. Thank you.
(1) Did I re-multiplex or render. I re-multiplexed. Took the non-performing mt2s file and put it thro AVS Video Converter to mkv.
(2) I think one of your key observations was “the gigabyte difference … tells me you’re not rendering out at the same format you’re using as input. It’s likely you’re not rendering out at the same bitrate as you’re accepting”.
Vegas tells me the original file is 1920x1080x12 25 fps interlaced AVC. Incidentally, its about 35 mins long, and I am editing out about 4 mins, ie editing in trimmer, dragging to the bottom of the time line, then rendering.
So I rendered the following combinations and permutations –
(1) MainConcept (MPEG-2), HDV 1080-50i, .m2t file. Played back absolutely perfectly.
(2) Sony AVC, Internet 1920×1080-25p, .mp4 file. Played back ok
(3) Sony AVC, AVCHD 1920×1080-50i .m2ts file. Falls apart after about 30 secs. Absolutely brilliant up to that point.
(4) MainConcept (MPEG-2), BluRay 1920×1080-50i 25 mbps video stream. .m2v file. Very fast rendering, played immaculatly on my laptop but my AC Ryan PlayOn HD2 media player did not recognise the file type, so it didn’t play.
I wld be inclined to go with (1) here-on-out.
Again, thank you for all your help.
Regards
John
-
Dave Haynie
September 9, 2011 at 8:05 am[John Allen] “Vegas tells me the original file is 1920x1080x12 25 fps interlaced AVC. Incidentally, its about 35 mins long, and I am editing out about 4 mins, ie editing in trimmer, dragging to the bottom of the time line, then rendering.”
I missed that part… whoops!
If you’re shooting in AVC on a typical camcorder, you’ll be encoding probably in Main or High Profile, 1920×1080, averaging 21Mb/s, peaking to 24Mb/s, for 25p or 50i.
When rendering out, you must use Main Concept to re-create the VBR, and even that’s optional. Sony AVC and any HDV format is always constant bitrate. Nothing wrong with that, but it will deliver a larger file for the quality set.
(1) No surprise that plays well.. MPEG-2 has been kind of a “done deal” for about a decade or more. It’s the standard for DVD, for original DVB, and of course, ATSC high def TV here in the USA. An HDV at 1080/50i is going to be 1440×1080, a bit downrezzed from the 1920×1080 of your original video.
(2) The Sony MP4 file’s quality and possibly play-ability will depend on the specific settings, which you won’t see unless you got to the “custom” panel. If you’re using the supplied “Internet 1920×1080-50i” or “25p” preset, you should see about the same quality as that 25Mb/s MPEG-2, but of course higher resolution. Ideally, AVC encodes at about twice the quality per bitrate of MPEG-2. As always, it’s dependent on the encoder.
(3) That’s demonstrating the same problem I found — Sony AVC does something weird in the transport stream. Doesn’t affect everything, but VLC didn’t like it. And as my theory suggest, the TS reading code in VLC is likely to be directly related to the TS reading code in most Linux-based media players.
(4) Back to MPEG-2, but you have a better set of settings. Same encoder, so you’re pretty likely going to play if you fix the container. The Blu-ray setting makes a stream between 20Mb/s and 30Mb/s, variable bitrate. Since it’s thinking Blu-ray, it’s output as an elemental stream, but that’s not what you want. So go to the “Render As…” dialog, select your Blu-ray MPEG-2 setting, then click on “Custom”. Go to the “System” tab and uncheck “Save as separate elemental streams”. Leave the stream type as “Transport”, everything else alone. Now, go to the “Audio” tab and check “Include audio stream”. For even better quality, go to the Video tab and click the “Two-pass” box, just above the maximum bitrate box. This will deliver a better quality overall MPEG-2 at the same bitrate as your HDV.
Of course, you could also try the MainConcept MPEG-4/AVC encoder, but you’d have to build your own encoding, there are no preset for HD stuff.
The main reason to go to AVC would be storage… it uses less. There’s no technical problem with MPEG-2. Though if you’re playing back from SDHC or USB stick, higher bitrates could be an issue depending on the speed of the memory card.
-Dave
-
Nathan Smith
September 25, 2011 at 8:56 pmThis has been screwed up FOREVER! See the post below. I just tried 10e myself, and it still sucks balls.
https://forums.creativecow.net/readpost/24/921024
Reply to this Discussion! Login or Sign Up