Timecode issue with rendering in MPEG-2

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

Re: Timecode issue with rendering in MPEG-2

Postby Mister Hatt » Wed Mar 14, 2012 12:02 am

MPEG-PS and PCR issues I think. I'm more familiar with MPEG-TS though, and it continues to astound me that AMV coordinators don't refuse anything that isn't MKV to be honest.

Is there any reason you can't just submit it in a different format? Either MPEG-TS or MKV should work fine. In regards to your actual problem, can you try in TMPGEnc with a higher frequency of I-frames? What is probably happening is that PCR packets (timecode info based off a core system clock) are not frequent enough in your stream so dshow is having issues with frame accurate seeking. lavf is more forgiving with such things and will scan or index the file if it cannot find a PCR right away, making it slower but more accurate. Of course this isn't an issue in modern PC hardware but dshow isn't exactly a recent thing.

If you MUST have mpg format, you can try remuxing with avconv and it may fix it or re-index it for you, worth a try I think. MPEG-PS is meant to have it's own timecode setup but because it's H.222 it still does this via PCR with a fixed base clock instead of the sexy way m2ts does it with dedicated timecodes. Still worth trying TMPGEnc with more I-frames or other similar flags tweaked to provide more seek info for the GOP. Maybe use avprobe to check how many I-frames are in your content between different encoders even as it could just be you don't have enough GOPs rather than the PCR being infrequent. So a few options on how to progress there.

glhf~
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Timecode issue with rendering in MPEG-2

Postby NeoQuixotic » Wed Mar 14, 2012 1:36 am

I've had a similar issue. When playing back a .m2v file I would have the playback time in MPC-HC display shorter than the actual time of the video. However, when the seek bar reached the end it would continue to play the rest of the video. I just did a reformat last week and tried playing a .m2v I encoded using HC Encoder and the length was correct. I have MPC-HC forcing LAV Video/Audio decoder. So I checked what filters were being used and noticed "MainConcept MPEG Demultiplexer" was being used when playing the .m2v file. So I blocked the MainConcept filter and tried playing it again. This time the incorrect time issue occured and "LAV Splitter" took the place of the MainConcept filter.

To test things even further I opened up Vegas and encoded a 6 minute video to an .m2v elementary stream and also to a .mpg file. With "LAV Splitter" it showed the incorrect time again on the .m2v, but was correct with the .mpg file. So I blocked "LAV Splitter" and "MPEG-2 Splitter" took its place with the same results. My guess is it's just whatever is trying to playback(split) the file. Maybe when you installed the ProCoder 2 demo it replaced/preferred some filters it installed. I think something like GraphStudio would be useful for troubleshooting. The "MainConcept MPEG Demultiplexer" (mc_demux_mp2_ds.ax) that is currently registered for me came from a Cineform NeoScene install I use. And it looks like Encore and other Adobe Media apps have their own version of the filter in their program directory they use, but don't register with the system. Since once I used that file in Encore and similar Adobe apps I had no issues.

For me my problem is whatever is splitting the file, but maybe it's different for you. Any chance you could upload the problem file anywhere?
Insert clever text/image here.
User avatar
NeoQuixotic
Master Procrastinator
 
Joined: 01 May 2001
Location: St. Louis Park, MN
Status: I haz job!

Re: Timecode issue with rendering in MPEG-2

Postby Mister Hatt » Wed Mar 14, 2012 2:57 am

Interesting and something I didn't really think of. Although, it works in VLC apparently and that uses lavf, just like LAV filters and ffdshow-tryouts do. What's interesting is that it seems to only break under dshow, which would imply old versions of lavf compared to what VLC packages. I wonder how ffms2 handles it in avisynth.

The problem is obviously in the demuxer either way, although it is most likely caused by how the encoder placed GOPs in the initial stream to mux which is why the encoder changes the behaviour.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Re: Timecode issue with rendering in MPEG-2

Postby BadgerKing » Wed Mar 14, 2012 3:39 pm

Mister Hatt wrote:MPEG-PS and PCR issues I think. I'm more familiar with MPEG-TS though, and it continues to astound me that AMV coordinators don't refuse anything that isn't MKV to be honest.

Is there any reason you can't just submit it in a different format? Either MPEG-TS or MKV should work fine. In regards to your actual problem, can you try in TMPGEnc with a higher frequency of I-frames? What is probably happening is that PCR packets (timecode info based off a core system clock) are not frequent enough in your stream so dshow is having issues with frame accurate seeking. lavf is more forgiving with such things and will scan or index the file if it cannot find a PCR right away, making it slower but more accurate. Of course this isn't an issue in modern PC hardware but dshow isn't exactly a recent thing.

If you MUST have mpg format, you can try remuxing with avconv and it may fix it or re-index it for you, worth a try I think. MPEG-PS is meant to have it's own timecode setup but because it's H.222 it still does this via PCR with a fixed base clock instead of the sexy way m2ts does it with dedicated timecodes. Still worth trying TMPGEnc with more I-frames or other similar flags tweaked to provide more seek info for the GOP. Maybe use avprobe to check how many I-frames are in your content between different encoders even as it could just be you don't have enough GOPs rather than the PCR being infrequent. So a few options on how to progress there.

glhf~




The AMV coordinator said she could accept other formats, but she was able to re-convert the one I had already sent in and was able to fix the issue (hopefully). Once I get home I'll try what you suggested in TMPGEnc and avconv. I'm just hoping that this isn't something that will happen every time I might render an mpeg-2, regardless of the file, and that it's just something weird going on with the project or source files.

I'm also going to try opening the project on my work computer with an older version of Premiere Pro to see if it might be something that is due to CS5.5 or some other issue with my computer, as well as try encoding it with TMPGEnc on the work comp.

NeoQuixotic wrote:For me my problem is whatever is splitting the file, but maybe it's different for you. Any chance you could upload the problem file anywhere?


Once I've tried everything else and when I re-encode for online submission, I'll upload the original source that is having the issue for download. The only thing that is really bothering me is that it's not occurring on my work computer at all when playing in WMP or MPC (another reason why I'm going to try exporting the project from an older Premiere Pro version to see if it's just something going on with my computer at home).
User avatar
BadgerKing
 
Joined: 12 Feb 2011
Location: Minnesota

Re: Timecode issue with rendering in MPEG-2

Postby BadgerKing » Wed Mar 14, 2012 5:57 pm

Two questions:
1) Where do I increase the I-frames in TMPGEnc? Is there a certain number I should be striving for in order to see better results?
2) Under the Advanced Setting it has Inverse Telecline checked, which says that it'll convert it to 24fps - does this conflict with keeping my framerate at 29.97 instead of "23.976 fps (internally 29.97 fps)" ? Since the convention submission guide says if it's at 29.97 fps to keep it at that and choose 'Interlace' for the Encode mode.
User avatar
BadgerKing
 
Joined: 12 Feb 2011
Location: Minnesota

Re: Timecode issue with rendering in MPEG-2

Postby BadgerKing » Wed Mar 14, 2012 7:06 pm

Ok, so I did a little experiment - when I have the bitrate encoding in both Premiere Pro and TMPGEnc set to CBR and not VBR, the issue doesn't really happen (it's off by about a second or so from the original uncompressed source video).
User avatar
BadgerKing
 
Joined: 12 Feb 2011
Location: Minnesota

Re: Timecode issue with rendering in MPEG-2

Postby Mister Hatt » Wed Mar 14, 2012 11:39 pm

Not too sure as I haven't used TMPGEnc in years myself. The CBR and VBR bit allocation will possibly change frame coding types to better optimise bitrate, that might have something to do with it. Re sources, every source has a different amount of scene changes and places where the encoder decides to insert an I-frame, so it kinda does depend on your source if this will happen.

As for different PCs doing stuff differently, it's all about versions and demuxers so chances are they have different software. I still recommend remuxing it to either a different container or the same one in avconv. Odd that bitrate allocation changes impact the seeking though, but that points even more at a broken demuxer.
Mister Hatt
 
Joined: 25 Dec 2007
Status: better than you

Previous

Return to Footage Help

Who is online

Users browsing this forum: No registered users and 2 guests