VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Dear all,

    Hi! I'm having a problem converting, and editing, MTS files from a Canon Vixia HF-M300, and I'm hoping someone can help me out. I'm a music student who uses this camera to record my rehearsals. I also do computer work as a hobby, so I'm not completely out to sea here, but, despite teaching myself everything I could about video formats, conversion, and editing, I have run out of ideas. I'll be as detailed as I can in explaining what I've tried, and what I understand and don't.

    The HF-M300 records in AVCHD. I need to edit its video files, cutting out sections of them, and convert those sections to something more widely supported -- either H.264 or MPEG-2 pt. 2 (for burning to DVD), and preferably to both formats.

    I'm using all open-source software, except my operating system (Windows XP), and I've had several problems along the way.



    Problem I. Opening these MTS files in a video editor. I've tried the following:

    I.A. VirtualDub. To get it to read these files, I'm using a DirectShowSource AVISynth script. They load, but the aspect ratio is wrong (more on this later) and, more importantly, they play back full of visual distortion -- square compression artifacts and some choppiness. (The speed of the video and audio, however, is correct.) Anyway, VirtualDub won't export to anything other than AVI, which isn't ideal.

    I.B. AviDemux. I've tried a number of things here, including using AVSProxy, which I prefer to constantly making little AVS files. As per the recommendations at http://avidemux.org/admForum/viewtopic.php?id=4397 , I've installed, as plugins: Haali Media Splitter (which I also ran the full install for, which is why VirtualDub can open my AVS script), FFMpegSource (I also have FFDShow, of course), DGAVCDEC and DGMPGDEC, and Nic Audio (which I don't even think I need). Through AVSProxy, I can get video to load into AviDemux via:

    I.B.1. FFVideoSource.

    I.B.2. DGDec. I used DGAVCENC to make the appropriate files, then loaded them through AVSProxy.

    I.B.3. DShowSource.

    I.B cont'd. All three methods result in heavily stuttering, half-speed audio and video, with the same incorrect aspect ratio. With FFVideoSource, every fifth frame or so is pulled from a little ways forward in the video. Also, AviDemux has trouble assigning cut points: the A and B cut markers always appear at the last position the seek bar was at, not the current position. Seeking by clicking and dragging is slow and sometimes unresponsive.



    I need a way to edit these files in their native format, to avoid having to convert each file before editing it. There's often a lot of footage I don't need, and converting hours of it would just be a waste. However, assuming I have to go that route, I found a new friend: the software HandBrake.



    Problem II. Using H.264 output from HandBrake, which I've saved to an MP4 file.

    II.A. I don't understand the aspect ratio of the files my camera produces. For those of you familiar with Canon's HF line, I'm shooting in "XP mode," which is 1440x1080 px, but with an aspect ratio of 1.78:1. I think this is why my efforts to open the files directly kept resulting in the same horizontally squashed video -- I never specified in my AVISynth script to account for it. Am I correct?

    II.B. If I use the default settings in HandBrake (which actually requires clicking the "Reset All" button on the Advanced tab), I get an H.264 video that, while it plays back impeccably in VLC, I can't edit with either:

    II.B.1. VirtualDub. I have to use an AVISynth script to frameserve H.264 into VirtualDub. The video comes through with the wrong aspect ratio, and video that plays at about 2/3 the speed it should.

    II.B.2. AviDemux: AviDemux doesn't need AVISynth to read H.264. The infamous "H.264 detected" error message appears.

    II.B.2.i. If I tell AviDemux to not use its alternate safe mode, it asks me to rebuild the time index. If I click Yes, it crashes. If I click No, I get the same stuttering, half-speed video as before.

    II.B.2.ii. If I use AviDemux's safe mode, I get the same stuttering problem, as well.

    II.C. If I frameserve the H.264 I created with HandBrake into AviDemux (using AVSProxy, though this shouldn't be any different than writing the scripts manually -- correct?), I get the following:

    II.C.1. With FFVideoSource: No stuttering, but 2/3-speed video and an incorrect aspect ratio.

    II.C.2. With DGAVCDEC: this program crashed when trying to process my .MP4 file.

    II.C.3. With DShowSource: Slightly stuttering (not the same as before!) audio and slow video.



    It seems to me I have three problems: 1) how to open my unconverted MTS files in an editor that can handle them; 2) how to correct the aspect ratio when opening a file, whether MTS or converted; 3) how to get H.264 files to open correctly in an editor.

    For what it's worth, my preferred editor is AviDemux, because of its versatile output formats (according to HandBrake's excellent documentation, AVI is an out-of-date container superannuated by the wealth of options in MP4, &c., so I got turned off VirtualDub after reading that). I also think it has a funny name. (Does anybody else call it "Avid Emux"? No?)

    Any help would be greatly appreciated. Thanks very much!
    Last edited by The Realms of Gold; 12th Nov 2010 at 20:41. Reason: Typo
    Quote Quote  
  2. Also, is it possible that the problems I'm encountering are partially due to my computer's hardware specs? I'm running on a 2.8 GHz Core Duo, with 4 GB RAM. My motherboard is the dependable ASUS P5E-VM DO, but I'm only using its onboard video and audio. I'd love to not have to upgrade, if I can avoid it.
    Quote Quote  
  3. Nobody is answering probably because all this has been covered numerous times. I'll try to summarize briefly:

    1) AVCHD is difficult to edit. You need a fast system , at least quad core or better. Some retail software allow GPU acceleration for easier editing e.g. premiere pro cs5 . If you're doing this through vdub and avisynth they add extra overhead and vdub isn't meant for playback (not optimized)

    2) AR - pixel aspect ratio is 4:3 (non square pixels) , so the 1440x1080 frame is "stretched" to 1920x1080 upon playback. The application you have been using use square pixels without PAR correction (you're viewing square pixels). You set the AR flag upon export or interpret the file (if using NLE's) . Some AVCHD variants can be square pixel as well 1920x1080. Check to see if your model has this

    3) Install haali media splitter, ffdshow (and set h.264 to ffmpeg-mt for multithreaded decoding)

    4) For simple cuts you can use tssniper or h264 ts_cutter or tsmuxer (cut by timecode, no preview) - no re-encoding but only I-frame accurate . At least you can do fast rough cuts before editing with these, and no time wasted re-encoding or quality lost . Videoredo beta can do this as well, and is more polished and has smart rendering (frame accurate, re-encodes GOP around cutsite) , but it's not free

    5) You are probably shooting interlaced, so beware of interlaced issues with scaling if you are making a DVD, and also of deinterlacing issues or keeping interlace depending on export format. Also Rec.709 vs. Rec.601 issues.

    6) None of the programs you mentioned are "real editors" . They just do linear cuts.

    7) vdub can export other formats with the external encoder function , or x264 vfw can export different containers as well now (use search), so you're not limited to "avi" necessarily. You can also frameserve to other applications

    8) you can do all your edits in avisynth as well - but requires re-encoding . You can use avspmod as an editor

    9) Directshowsource is probably the most stable import method if you are using avisynth (actually DGNVTools is, but you need Nvidia CUDA card, and it's $15) , ffvideosource() is unstable with transport streams, and DGAVCIndex has decoding issues with PAFF streams . The problem is dss isn't necessarily frame accurate and you can lose your place when scrubbing.

    DirectShowSource2 - DSS2() (comes with haali media splitter, put avss.dll in the plugins folder) is frame accurate with stream in a container, but decodes slower (because it relies on timecodes and seek recovery points for the accuracy). No audio so you have to use audiodub()

    10) another option : you can transcode to digital intermediate e.g. cineform, or high bitrate mpeg2 , which are less cpu intensive
    Last edited by poisondeathray; 13th Nov 2010 at 19:41.
    Quote Quote  
  4. Hi poisondeathray, thanks for taking the time to write all that. I know this has been covered before, as I've read dozens upon dozens of threads, sites, &c... I tried for weeks to solve this on my own without asking for help. I appreciate your assistance!

    In fact, you've partially solved my problem with your recommendation of software that can perform simple cuts, because thankfully, that's all I need to do. TSSniper works ideally so far. I agree with many other posters that it's the best utility for this out there, and I'm looking forward to its further development.

    I now need to deal with the aspect ratio problem, which I think ought to have its own topic.
    Quote Quote  



Similar Threads