PDA

View Full Version : Question regarding AVCHD decoding/converting


galleren
24th March 2009, 10:27
Hi

I have about 3-4 hours of footage from my Canon HF10 camera that i would like to edit and convert into something more playable.

My setup is a Core 2 Duo 2.4ghz with 2Gb of ram with a Geforce 8800GTX card.

I am using Vegas Pro 8 for editing. I've transferred all of the AVCHD (m2ts) files to my hard drive. They are in 1920x1080, 25fps (filmed using cinema mode). I have installed the CoreAVC codec.

Playing back the m2ts files directly works thru both VLC, WMP, MPC etc, but it's not a smooth experience. There is some audio lag and occasional video lag. In comparison, when playing back BD-rips at 1080p (mkv files) there is no audio/video lag. Im guessing this is because of the bitrate etc difference on the m2ts files?

Anyways, my main question is. What is a good way for me to convert these m2ts files into something less demanding, yet keeping the same resolution? And what kind of software/codecs would be useful for doing it?

Thanks for your time.

nm
24th March 2009, 10:55
Anyways, my main question is. What is a good way for me to convert these m2ts files into something less demanding, yet keeping the same resolution? And what kind of software/codecs would be useful for doing it?
1. (optional) demux with eac3to or tsMuxeR to get the audio track separated. This may not be necessary since mkvmerge can probably read the audio from the original file too.
2. use AviSynth with DGAVCDec to feed the video to x264
3. mux the re-encoded video and original audio to Matroska container with mkvmerge.

If you prefer a graphical interface, try MeGUI or one of the frontends here: http://forum.doom9.org/forumdisplay.php?f=78

audyovydeo
24th March 2009, 11:45
1. (optional) demux with eac3to or tsMuxeR to get the audio track separated. This may not be necessary since mkvmerge can probably read the audio from the original file too.
2. use AviSynth with DGAVCDec to feed the video to x264
3. mux the re-encoded video and original audio to Matroska container with mkvmerge.



just for my own knowledge, since I am considering purchasing an AVCHD camera : how can H.264-inside-m2ts be more demanding than x264-inside-mkv , at equal resolution ? Is is just a bitrate thing ? (but AVCHD == 24Mbps)

cheers
audyovydeo

nm
24th March 2009, 11:52
just for my own knowledge, since I am considering purchasing an AVCHD camera : how can H.264-inside-m2ts be more demanding than x264-inside-mkv , at equal resolution ? Is is just a bitrate thing ? (but AVCHD == 24Mbps)
Yes, bitrate is a major factor. However, Galleren's CPU should be fast enough to decode AVCHD when using ffdshow-tryouts (the mt branch), DivX 7 or CoreAVC, but re-encoding to a more compact size with x264 may still be advisable for storage and transfer.

galleren
24th March 2009, 12:18
Thanks for the quick reply, nm.

I was also thinking that my setup should be able to playback the AVCHD files without much trouble, but it doesn't seem to be the case. I have the XP codec pack installed (ffdshow etc) and viewing the m2ts files was a very laggy experience. After installing the coreAVC codec that was some improvement, but far from perfect.

Any suggestions about what codec and setup/player would be the most optimal? Also, what kind of bitrate would you recommend i use when encoding from AVCHD(m2ts) to x264 MKV or similiar?

nm
24th March 2009, 13:03
Any suggestions about what codec and setup/player would be the most optimal?
MPC-HC as a player and one of the decoders I mentioned if the built-in version of libavcodec is not fast enough. DivX 7 is free and it could be slightly faster than CoreAVC on your setup.

Unfortunately your GeForce 8800 GTX only has VP1 video capabilities, so DXVA doesn't work better than software decoders.

Also, what kind of bitrate would you recommend i use when encoding from AVCHD(m2ts) to x264 MKV or similiar?
Depends on the video content, but 10 Mbps is probably enough. If you want the output to be Blu-ray/AVCHD compatible, you also need to set the VBV parameters, number of reference frames and the GOP size properly. Some frontends provide Blu-ray and AVCHD profiles that make this easier.

audyovydeo
24th March 2009, 13:12
Depends on the video content, but 10 Mbps is probably enough. If you want the output to be Blu-ray/AVCHD compatible, you also need to set the VBV parameters, number of reference frames and the GOP size properly. Some frontends provide Blu-ray and AVCHD profiles that make this easier.

Galleren

are you sure it's not some problem with your system ?
highly fragmented video files play back badly. Also, I tend to maximise disk cluster size on the partitions I use for video.

re: bitrate -- video from a handheld camcorder can gobble a massive amount of bits. I can get 6Mbps for SD/PAL video with x264@crf22. So the 10Mbps for HD content leaves me wondering...

cheers
a/v

galleren
24th March 2009, 13:24
Galleren

are you sure it's not some problem with your system ?
highly fragmented video files play back badly. Also, I tend to maximise disk cluster size on the partitions I use for video.

re: bitrate -- video from a handheld camcorder can gobble a massive amount of bits. I can get 6Mbps for SD/PAL video with x264@crf22. So the 10Mbps for HD content leaves me wondering...

cheers
a/v

Yeah, could very well be. I'll try to defragment the drive when i get home from work and see if that improve the performance. I'll let you know.

nm
24th March 2009, 13:32
re: bitrate -- video from a handheld camcorder can gobble a massive amount of bits. I can get 6Mbps for SD/PAL video with x264@crf22. So the 10Mbps for HD content leaves me wondering...
True, I wasn't thinking of shaky and noisy handheld shots. However, shaky footage might get away with a higher CRF than 22 without a noticeable difference in quality. Filtering (stabilizing/deshaking (http://forum.doom9.org/showthread.php?t=136025), maybe denoising) will also help a lot.

galleren
27th March 2009, 18:29
I've done some testing now, and i reinstalled most of my codecs. Playing back the AVCHD files directly seems to be alot smoother now and the cpu usage is peaking about 80% instead of a 100%. I've been using MeGUI and playing around with different codecs and bitrates and i've found a couple of nice combinations to encode my footage as.

Do any of you know if there's a good way of actually editing/cutting the M2TS files without actually saving them/encoding them to a different format? I'm using VEGAS 8 and there is no problem editing the m2ts files, but i can't seem to be able to save the edited versions as m2ts files. I can only choose render as and then i need to encode it as something. I would rather just like to maybe edit the footage in VEGAS and then save the files as m2ts without any conversion/encoding, then encode those edited files in MeGUI f.ex.

Thanks again for all your help.