Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th January 2011, 06:14   #1  |  Link
GG-Xtreme
Registered User
 
Join Date: Dec 2010
Posts: 45
Converting a .m2ts containing VFR AVC into mp4/mkv

I feel like an idiot when it comes to this stuff. After sorting out my other issues, I came across an odd video file: a 4GB, 1080p .m2ts that contained a variable-framerate H.264 stream and an AC3 track. The video plays fine in VLC (although seeking and time are completely broken, video appears as 00:00:00 in length and dragging the seek bar has no effect), and even plays fine in Windows Media Player (seeks fine and shows correct length).

I can't figure out how to turn this into a CFR mp4 or mkv. Every .m2ts converter I've tried seems to be looking for a large Bluray-format video stream and fails to load the file. Demuxing the .m2ts only gives me a raw .h264 file without timecodes or anything--useless, as I can only specify constant framerates when muxing.

I tried loading the .m2ts directly into MeGUI to convert to constant-framerate, and it loads fine...using DirectShowSource, which has been so-far useless to me, since the encoded files do not seek or play properly on Android phones or in MPC. Attempting to use FFmpegSource with the file just crashes MeGUI. Is there any other method of turning this .m2ts file into any constant-framerate format?
GG-Xtreme is offline   Reply With Quote
Old 11th January 2011, 17:04   #2  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Why do you need to convert VFR to CFR?
roozhou is offline   Reply With Quote
Old 11th January 2011, 22:07   #3  |  Link
GG-Xtreme
Registered User
 
Join Date: Dec 2010
Posts: 45
Because my Android phone can't play VFR with hardware acceleration without going way out of sync (seems to be a limitation in the hardware or firmware). Not to mention that it can't play .m2ts files anyway.
GG-Xtreme is offline   Reply With Quote
Old 11th January 2011, 23:49   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by GG-Xtreme View Post
I feel like an idiot when it comes to this stuff. After sorting out my other issues, I came across an odd video file: a 4GB, 1080p .m2ts that contained a variable-framerate H.264 stream and an AC3 track.
Where exactly did you get that kind of file?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 12th January 2011, 00:15   #5  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
A sample would be nice. I have never seen such a stream would probably like some other users have a look at it.
btw. did you try to feed it directly to x264 with '--force-cfr' activated?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th January 2011, 00:34   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Selur View Post
btw. did you try to feed it directly to x264 with '--force-cfr' activated?
If the source really is VFR this would destroy the sync (assuming all this option does is to make x264cli generate the timecodes itself?). But I have to admit that I have never come across a VFR m2ts myself.

What I find strange is that he says that using DirectShowSource will make the output not seek or play properly while the source filter used in an AviSynth script shouldn't have any impact on things like these at all.
sneaker_ger is offline   Reply With Quote
Old 13th January 2011, 20:02   #7  |  Link
GG-Xtreme
Registered User
 
Join Date: Dec 2010
Posts: 45
Quote:
Originally Posted by LoRd_MuldeR View Post
Where exactly did you get that kind of file?
I had a friend at my dorm rip some of my Blurays for me and put them on my external hard drive, since I don't have a PC Bluray drive for ripping stuff myself. I should ask him what the hell he did.

Quote:
Originally Posted by Selur View Post
A sample would be nice. I have never seen such a stream would probably like some other users have a look at it.
btw. did you try to feed it directly to x264 with '--force-cfr' activated?
How would I get a sample of this file? (I'm have no idea how to convert it, much less trim it) I didn't try the --force-cfr option, I'll look into it.

Quote:
Originally Posted by sneaker_ger View Post
What I find strange is that he says that using DirectShowSource will make the output not seek or play properly while the source filter used in an AviSynth script shouldn't have any impact on things like these at all.
I think this is weird myself. However, testing on 2 different PC's for encoding and 2 different phones for playback, the same exact source video had serious playback and seek issues if encoded with DirectShowSource, but had no problems if encoded with the same settings (H.264, resolution, quality, framerate, etc.) using FFVideoSource instead. The problem remained for any source videos I tried (and I tried a good 20 or so videos before I realized that using FFVideoSource resolved the problems).

Last edited by GG-Xtreme; 13th January 2011 at 20:05.
GG-Xtreme is offline   Reply With Quote
Reply

Tags
convert, demux, h264, m2ts, vfr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.