VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Dec 2015
    Location
    Canada
    Search Comp PM
    I capture video in TS format with Hauppauge HD PVR 2. I enclose the details of a file (MediaInfo).

    I want to convert to MKV format to reduce their size. I also want to use MeGUI. I almost reached my goal, but I still have some details to polish up.

    In MeGUI, I go first in the Tools menu -> AVS Script Creator

    Click image for larger version

Name:	MeGUI_IO.jpg
Views:	1456
Size:	60.6 KB
ID:	34875

    In the Filters tab, I put 23,976fps value as the source of my TV decoder. The source is progressive (720p).

    Click image for larger version

Name:	MeGUI_Filters.jpg
Views:	1443
Size:	59.1 KB
ID:	34876

    In the Script tab, I was advised to add the command : AssumeFrameBased().SelectOdd().tdecimate(). And changing audio = True

    Click image for larger version

Name:	MeGUI_Script.jpg
Views:	1565
Size:	46.9 KB
ID:	34877

    The Save button, I return to the main screen. Note that there is nothing in the audio section.

    Click image for larger version

Name:	MeGUI_P1.jpg
Views:	1456
Size:	72.8 KB
ID:	34878

    On the Config button on the video section I can change the quality of the output file. I leave the defaults. Is it correct?

    Click image for larger version

Name:	MeGUI_Config_Video.jpg
Views:	1469
Size:	63.1 KB
ID:	34879

    On the Queue button on the video section, a message appears. I click YES and MeGUI generates the MKV file. I enclose the details attached (MKV.txt).

    Name:  MeGUI_MKV.jpg
Views: 3186
Size:  29.4 KB

    Click image for larger version

Name:	MeGUI_Queue.jpg
Views:	1521
Size:	47.4 KB
ID:	34881

    Click image for larger version

Name:	MeGUI_log.jpg
Views:	1552
Size:	117.0 KB
ID:	34882


    I have no audio in the video!?! How can I add?

    My goal is to see my video in a HDTV with an identical visual (or very close) to that of my source (tv decoder) and 6-channel AC3 audio.

    Thanks for your help.
    Image Attached Files
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Have you just tried load the .ts as audio input? And just copy/passthrough the audio.

    Or try add the audio to the mkv after you converted with mkvtoolnix gui. Add the mkv and the ts file. Delete the ts video track. Make/Mux a new mkv.
    Quote Quote  
  3. Don't use DirectShowSource.
    Open the TS file via the File/Open menu or via the Script creator, and when MeGUI asks how to open it, choose the "file indexer". When it opens, add the indexing job to the queue. Run it.
    When the indexing is done, the Script Creator should open. Don't specify a frame rate (unless you opened the video with DirectShowSource or AVISource you won't be able to anyway). Don't change audio to "true" even if you can.
    Don't add AssumeFrameBased().SelectOdd().tdecimate() and don't ever listen to the person who advised you to do that again.
    If the source is progressive and you don't want to crop or resize, simply save the script for encoding.
    The script should be loaded into the video section for encoding. Set up the x264 encoder configuration, add the script to the queue and run it.

    This part's the way I generally do it. MeGUI can do it for you, but for the moment......
    Open the MKV containing the encoded video with MKVMergeGUI (it's in MeGUI's sub-folder "MeGUI\tools\mkvmerge" but it might be easier to also download it as a separate program and install it).
    Add the original TS file.
    You should now see the encoded video stream, the original video stream, the original audio stream(s) and any chapters and subtitles in MKVMergeGUI's stream list. Uncheck the streams you don't want to keep (ie the original video) and click "start muxing". That'll give you a new MKV containing the encoded video plus the original audio etc.

    When you open a file and index it, MeGUI will (if audio is selected in the file indexer) extract the audio and add it to the audio section for encoding. It can't always extract the audio (it depends on the file type). If it can't, it'll create a script for encoding the audio and load it into the audio section. You can use the queue buttons in the video and audio sections to encode each individually and mux them together yourself using MKVMergeGUI, or one of the muxers under the Tools menu.

    Alternatively, you can use AutoEncode. It'll re-encode both and do the muxing for you. If you don't want to re-encpde the audio and you extracted it with the file indexer, use the "x" button to clear the audio section before clicking AutoEncode. If the "add additional content" box is checked when the AudoEncode window opens you'll be able to add existing audio (extracted audio) to the output rather than re-encode it.

    There's several ways to do the same thing, but hopefully that'll help you and...... keep DirectShow as a last resort decoding method. It's not frame accurate and not reliable and it's ability to work depends on which DirectShow decoders you have installed, which are out of MeGUI's control.

    PS I just noticed your source seems to be 59.940fps progressive (according to MediaInfo). I'd keep it that way.
    If you open the video with DirectShowSource and specify 23.976fps it'll drop frames to reduce the frame rate and it'll probably be ugly. In your case you then added SelectOdd() which would delete every second frame and reduced it further to 11.988fps and to top it off you followed that up with Tdecimate() which will delete one frame in five. Fortunately though, I think you at least failed adding SelectOdd and TDecimate to the script (if you change something in the script creator MeGUI will rewrite the script and you'll lose any manual changes) because you did encode at 23.976fps.

    PPS. In MeGUI's options, under "external program configuration", if you uncheck "x264, use external muxer for MKV" the encoder output should be written directly to an MKV file. Currently it's being written as a h264 file then muxed into an MKV, hence the two steps when you added the video encoding job to the queue.
    Last edited by hello_hello; 18th Dec 2015 at 09:53.
    Quote Quote  
  4. Member
    Join Date
    Dec 2015
    Location
    Canada
    Search Comp PM
    Thanks hello_hello!

    Just to clarify fps settings:

    TV source is 23.976fps and my HD PVR 2 recording 59.970fps. Is too high relative to the source, but I can not change this value. I thought significantly reduce the size of my MKV file without losing the quality of the source (tv) if I came back to 23.976fps...

    I was going through "DirectShowSource" to change the fps (59.970fps to 23.976fps). In this case, if I leave it to 59.970fps, why do not I use the "One click encoder" option? It allows me to generate an MKV that contains the video and audio. I do not need remix. There is probably something I do not understand ...

    Thanks
    Quote Quote  
  5. How are you determining the video is really 23.976fps when MediaInfo says it's 59.94fps?
    If that's the case and you look at the video in MeGUI's preview (without changing the frame rate) you should see a lot of repeated frames when you step through them one at a time. If that's the case, then SelectOdd().TDecimate() might in fact work (don't use DirectShow to change the frame rate as well though), however the following might be better (leave the source frame rate at 59.940fps):

    LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TIVTC.dll") #or wherever the path is in your case
    TDecimate(Cycle=10, CycleR=6)

    That'll remove 6 frames out of every 10 and the output frame rate will be 23.976fps. Unlike simply changing the frame rate with DirectShow or using SelectOdd(), which will just remove frames in a particular pattern, TDecimate will discriminate more and try to only remove duplicate frames.

    If that doesn't give you smooth motion you could try:

    TDecimate(mode=2, rate=23.976)

    It seems a bit unusual though.... 23.976fps video recorded at 59.940fps...... but if that's what it is, that's what it is. And if it is, I guess I was wrong.

    There's no reason why you can't use the OneClick encoder. You can even use it to remove frames as above by creating an Avisynth template with TDecimate and including it as part of a OneClick preset, but for jobs where you want to do "unusual' things, such as removing lots of duplicate frames, then it might be easier to do it the "long way".
    Last edited by hello_hello; 18th Dec 2015 at 09:55.
    Quote Quote  
  6. Member
    Join Date
    Dec 2015
    Location
    Canada
    Search Comp PM
    Thank you!

    I checked. It is 59.940fps. There are no repeated frames.

    So I followed your instructions and it works. Since I have not found mkvmerge in the Tool menu MeGUI, I went through MKVToolNix GUI to mix video and audio. I have 3 audio tracks in my original file! I have all added to my MKV.

    Here is the final result in my MediaInfo file.
    Image Attached Files
    Quote Quote  
  7. Member
    Join Date
    Dec 2015
    Location
    Canada
    Search Comp PM
    I just did my first real try.

    My video is about 11GB. Some images are pixelated, but it seems pretty rare. Probably a transmission error?

    I just read that Project X with demux option could repair them. In your opinion is it worth the trouble to do so? Otherwise, I thought again recording the TS file to see if errors would occur again...

    Edit : I launched the project x with demux option. Here is the log ... how should I interpret it? Can I repair the errors? How?
    Image Attached Files
    Last edited by Erik80; 18th Dec 2015 at 22:53.
    Quote Quote  
  8. To be honest I've never use Project X and I don't understand it's log file. Maybe someone else will come along......
    Line after line of "dropping video data, GOP larger than 6MB" seems a bit of a worry though.

    You could try remuxing with TSMuxer and using the new TS file as the source. Likewise you could remux it with MKVMergeGUI and use the MKV as the source. If the pixelation keeps occurring in the same spots it's probably an issue with the video.

    I can't remember which decoder/indexer MeGUI defaults to for TS files. Whichever one when you open the TS file for indexing, try selecting the other instead (it'll probably be a choice of ffmsindex or L-Smash). Sometimes one decoder will have issues with a file while another won't and.......

    Despite my recommendation not to use DirectShowSource earlier, or at least only as a last resort method, if all else fails it might be worth a shot. It's usually okay as long as you're simply re-encoding from start to finish and not using complex filtering, and depending on the DirectShow decoder you have installed (I use ffdshow myself) sometimes it'll successfully decode when nothing else will, or at least with less image problems.

    It's probably an issue with the video, and i rarely work with TS files myself, but those are some of the things you could try.
    Quote Quote  
  9. MKVMergeGUI should be in the "MeGUI\tools\mkvmerge" folder (I think it's mmg.exe). It's not listed as MKVMergeGUI under MeGUI's Tools menu but MeGUI uses it for MKV muxing. MKVMergeGUI is more versatile than MeGUI's MKV muxer though (it makes it easier to open multiple files and add and remove streams), so I mainly use it.

    Not that it matters if you also download MKVToolnix and run MKVMergeGUI from a different location. I do.
    Last edited by hello_hello; 19th Dec 2015 at 02:56.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!