Converting AVCHD .mts format to Xvid at DVinfo.net

Go Back   DV Info Net > Panasonic P2HD / AVCCAM / AVCHD / DV Camera Systems > Panasonic AVCCAM Camcorders

Panasonic AVCCAM Camcorders
AVCHD for pro applications: AG-AC160, AC130 and other AVCCAM gear.


Reply
 
Thread Tools Search this Thread
Old June 13th, 2009, 05:08 AM   #1
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Converting AVCHD .mts format to Xvid

Hello
This might be a true 'greenhorn' question, but I'll ask anyway.

I have an AG-HMC150 that I'm using to shoot a documentary about rural folk organizations and rural martial arts societies in north China.
I'm not very familiar with the camera or video terminology/technology, and am constantly learning.

I've shot all the video at maximum resolution knowing I can always downgrade. I store the AVCHD .mts files on mirrored 1 tb drives.
But playing the files back is very difficult- my notebook computer running Linux won't really play them.

I was converting the AVCHD files to standard format video, but then I realized that the standard format converted video was taking up even more room than the original AVCHD files. I can't afford to buy so many harddrives in order to store the AVCHD files and a standard definition copy.

So, I thought of a solution. I figured I could convert the AVCHD files to Xvid because this format takes up minimal disk space. I could then easily play the files and burn them to DVD. I plan to use the Xvid files to piece together a rough outline of my documentary to show to interested partners and supporters.

My question is:
1) is this a practical solution? Is it technically practical to use Xvid for this purpose? Can I edit the Xvid footage easily enough?

2) what software and settings can you recommend to convert the AVCHD .mts files? I primarily run LINUX and am using MediaCoder running in wine in Linux. I also have Handbrake. What settings should I use? The video that I have converted so far looks very poor and lacks constrast and details.

I greatly appreciate any recommendations and advice!
Ray Ambrosi is offline   Reply With Quote
Old June 13th, 2009, 10:30 AM   #2
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
H264 video compression (which is what AVDHD video is) is more efficient (image quality for number of bits) than Xvid. Xvid encoded video requires less CPU power to decode for playback, but to get a smaller file size, you will take a considerable image quality hit.
Robert M Wright is offline   Reply With Quote
Old June 13th, 2009, 10:35 AM   #3
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
What resolution are you shooting at? What kind of processor is in your notebook?
Robert M Wright is offline   Reply With Quote
Old June 13th, 2009, 02:32 PM   #4
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Hi

The only reason I want to convert to Xvid is because the AVCHD files are too big to play on my computer now. I will begin editing my film next year when I get my story figured out and have a faster computer. For now, I will archive the AVCHD files on my 1tb drive.

In order to be able to view the files conveniently, I want to all the AVCHD files to Xvid. I will use the Xvid files to review my footage, and build my story. I thought of going with Xvid because I have very limited storage space available now. The lower-quality image offered by Xvid should be just fine- my main concern is to save storage space.

(If for example my 1 gig drive can hold about 93 hours of AVCHD video (the video from sixty two 16gb SD cards. If I convert it to standard definition video, the files will take up at least another 93 hours. Thus I will need TWICE as many harddrives. However, if I can make Xvid files of decent quality, the space occupied will be far less)

Computer specs:

My computer is an IBM T61 notebook. Intel Core2 Duo T7500 @ 4096 KB cache flags( sse3 nx lm vmx ) clocked at [ 2201.000 MHz ] with 4 gb of RAM.

My video files all reside on a 1 tb mirrored harddrive connected to my notebook via Firewire.

I have shot all my video on the HMC-150 at 1920 x 1080.

I hope that I've explained my situation more clearly.
Any advice regarding my original questions, I'd be very pleased to hear it!
Ray Ambrosi is offline   Reply With Quote
Old June 13th, 2009, 05:04 PM   #5
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
It sounds like you mean that 1920x1080 "AVCHD files are to big to play" (not that the file size is to big to play, which wouldn't really make sense) and you want to convert to standard definition (720x480 presumably) so the video is viewable on your notebook (something the processor can keep up with). I get the impression, that when you wound up with files that were even larger than the original files, you may have been generating uncompressed files (uncompressed standard definition files would be much larger than high definition AVCHD files)

Xvid compression can work just fine for the standard definition files, but I've experienced serious problems with Xvid, when using MediaCoder. For whatever the reason, it seems not to get the bitrate correct (anywhere close to what you set it at). That might be causing some of your problems.

You could try this (and actually get better quality compression than with Xvid):

Under the "Video" tab in MediaCoder (on the left set of tabs), set the "Format" to "H.264" and set "Mode" to "bitrate based". Set the bitrate (where you see a box with a number in it next to "Kbps") to "1000".

Under the "x264" tab (on the right set of tabs), set the "Profile" and "Level" to "Auto". Set "Predictor Frames" to "3". Set "Motion Est. Mode" to "Uneven Multi-Hexagon" and set "Motion Est. Range" to "16". Set "B-Frames" to "16". Set "Subpel refinement" to "9".

Under the "Audio" tab (on the left set of tabs), set "Encoder" to "Nero Encoder"

Under the "Nero Encoder" tab (on the right set of tabs), set "Profile" to "auto" and "Rate Mode" to "Target Bitrate". In the box with a number next to "Kbps" set that to "96".

Under the "Container" tab (on the left set of tabs), set the "Container" to "MP4".

Under the "Picture" tab (on the left set of tabs), make sure you have set "Resize" to "720x480" and "Aspect Ratio" to "16x9". Also make sure the "Frame Rate" is set to whatever the original footage was shot at.

Let her rip, and you should get files that are much smaller in size than the original AVCHD files from the camera, with very little loss in quality due to compression (of course the resolution will be lower - standard definition).
Robert M Wright is offline   Reply With Quote
Old June 15th, 2009, 01:26 AM   #6
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Hi

Thanks very much for your very good advice!

I am now transcoding some video using the settings you suggested.

The only thing I changed was to set "Encoder" to "Lame MP3" rather than to "Nero Encoder". This is because I always try to used open-source codecs (and software) where ever possible.

I also increased the bitrate to 1500 kbps because I found that the transcoded video still lacks detail and contrast. Blacks are very black and have no detail while bright areas are very washed out. Is there any way to avoid this?

The resulting file sizes at 1500 kbps are even smaller than using Xvid set at 2500 kbps and the quality seems to be better!
Ray Ambrosi is offline   Reply With Quote
Old June 17th, 2009, 09:43 AM   #7
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
Quote:
Originally Posted by Ray Ambrosi View Post
The only thing I changed was to set "Encoder" to "Lame MP3" rather than to "Nero Encoder". This is because I always try to used open-source codecs (and software) where ever possible.

I also increased the bitrate to 1500 kbps because I found that the transcoded video still lacks detail and contrast. Blacks are very black and have no detail while bright areas are very washed out. Is there any way to avoid this?
I'd suggest CBR 128kbps for Lame MP3. VBR MP3 with video can goof up some players. 96kbps MP3 may work just fine, depending on the audio you record (can be a little weak for music). 128kbps is fairly safe to give a decent demo/preview of almost anything you you will likely record.

You are downsizing the image considerably. You will lose some detail by downsizing to SD. As a test, try encoding the video at a much higher bitrate (like 5000kbps), and see if you notice a difference. If you do, you might want to play around with the bitrate a little more to find a sweet spot (where increasing the bitrate results in almost no visually perceptible improvement, when viewed on the display you will show it on - your laptop in this case).

You could also try increasing the resolution of your downsized image a little. Try something like 800x576 at around 2000-2500kbps, see if the laptop can keep up with that for playback, and see how it looks. Keep in mind that the human eye tends to be more sensitive to vertical lines of resolution than horizontal lines, so anamorphic video can be your friend when downsizing to conserve bandwidth (bitrate).

Let me know how that works. There are more tricks you can use that might help, but can involve a heck of a lot more work too.
Robert M Wright is offline   Reply With Quote
Old August 10th, 2009, 09:18 PM   #8
Regular Crew
 
Join Date: Jun 2009
Location: Winnipeg , Manitoba, Canada
Posts: 43
Make a backup of that 1tb drive and keep it safe in an off-site location, like a safety deposit box. You cannot afford to lose your raw footage.
Greg Paulson is offline   Reply With Quote
Old February 5th, 2010, 11:43 PM   #9
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Still having trouble with Mediaplayer conversion of .mts AVCHD files

Hi everyone...
Sorry for my "months-late" reply. I'm often in villages in the countryside doing my fieldwork and filming footage for my film(s)

Thanks Greg for your advice- I will buy a 4tb harddrive as soon as I can possibly afford it and back up my all my data which is already stored on Raid 0 Mirrored drives (2 drives in one box, with one drive being an exact copy of the other)

Thanks to your recommendations Robert, I was able to successfully use Mediacoder to transcode my files. But when I reinstalled my system and tried to use the 'presets' that I had saved for Mediacoder, it has been unable to transcode .mts files properly. The video is invariably in slow motion out of sync with the audio which is normal speed.

After searching for hours on Google, and fiddling around endlessly with the settings, I it now works, but the output is less than ideal. Wherever there is motion, it is not captured very smoothly and fine jagged lines appear around the edges

Container: mp4
muxer: mp4box
Video: H264
encoder: x264
Mode: average bitrate
Bitrate: 3500
Resolution: 1920 x 1081
Aspect: 1.78:1
Framerate: 30 fps
Deinterlace: auto

Audio: mp3
Encoder: Lame mp3
Bitrate: 128 kbps

My x264 settings:
Profile: Auto
Preset: Custom
Tune: Normal
Motion Est Mode: Uneven Multihex
Motion Est Range: 16
Level: Auto
B-frames: 16
Predictor: 3
SubPixel refinement: 9


My questions:

1. How can I get better performance from Mediaplayer? Is it as flakey as I've found it to be? Do the results differ a lot with each new release of Mediaplayer?

2. What should the framerate be set at? My camera, Panasonic HMC-150 PAL is shooting at 30 fps.

3. I want to convert all original .mts format files to lower quality/resolution so that they are easier to play. I generally give copies of the film I shoot to rural people- local rural video shops cannot handle high-def video, and have old computers. So its best to convert my footage as I have been doing. It is mainly going to be played on television in a DVD format. What resolution should I be giving them?

4. In order to show people what I am working on, I plan to piece together a rough edit of my documentary ideas using the converted low-res .h264 mp4 files.
This avoids people running off with my good hi-res footage.
I will find some pro editors to do my editing later using the hi-res footage.
Does anyone else do this?
Ray Ambrosi is offline   Reply With Quote
Old February 6th, 2010, 05:04 AM   #10
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
For 1920x1080 30p video, you need to use a considerably higher bitrate than 3500Kbps. To get reasonably decent quality try 15000Kbps and set "Motion Est Range" to 64 as well. Encoding will be much slower than with low resolution versions and the files will be much, much bigger. Depending on what you intend to do with the footage, some other changes might (or might not) make sense. What is your purpose for re-encoding the source footage at 1920x1080 though?

If you are shooting at 30p, then you want to encode as 30p. PAL footage is not 30p though, so I'm a little confused about what you mean when saying "HMC150 PAL is shooting 30 fps". Under the tab that says "Picture" do not check the box next to "Frame Rate" and the encoder will automatically encode using the framerate of the source footage.

I'm not sure why, or where, you have "Deinterlace" set to "auto". You don't want MediaCoder to be trying to deinterlace your footage (especially progressive footage!).

MediaCoder is freeware, and is indeed pretty flaky. They don't do much for preventing invalid settings, so it is pretty easy to goof it up. You might want to give Avidemux a try for encoding with x264. It's perhaps a bit less flaky, and can do the downsizing, for your low resolution versions, quite well.

When you want to give footage to the local people, are you saying they will be playing it back on a computer, or will they play it back using a DVD player connected to a television?

I'm really quite confused about what all you are trying to accomplish. Maybe it would be best to try breaking this down to figuring out one thing at a time.
Robert M Wright is offline   Reply With Quote
Old February 9th, 2010, 12:23 PM   #11
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Hello!
Thanks for your reply!
I am a bit clued-out as to what I am doing. and for this, I feel some embarassment because I am supposed to be a professional researcher. But we can't be good at all things I suppose.

There are 2 main reasons why I want to convert from AVCHD 1920x1080 to a lower resolution:
1. my computer (and nearly every computer I have tried), cannot play the AVCHD 1920x1080 files from my camera. My idea was to decrease/downsize the image resolution to 800x576. This way, it will easily play on my computer and I can use these lower-quality .h264 files to piece together rough copies of the documentary storylines that I want to present. In addition, the smaller files are easier to send to people. Once my group/supporters have seen my rough ideas, we can proceed with something more serious and use the original high-def footage.

Question 1a: Is this a smart approach or am I really wasting a lot of time/effort with this approach

2. I want to give copies of most of my video to the subject of my film- friends in rural China. They will primarily play the footage on a DVD players connected to home TVs.
I have been giving them footage that I have downsized to 800x576 which they can take to a local shop to convert to even lower resolution (720x480) for making DVDs to be played on home TVs.
And, if they want, they can play the original 800x576 footage directly on a computer if they want better resolution.
They are thrilled to receive copies of the video- a snapshot of their lives, rituals and social environment.

Question 2a: Does this seem sensible? Or should I simply convert directly to 720x480 directly the first time?

(Embarassed to say, I still have no idea how to convert my AVCHD 1920x1080 to lower format to make DVDs directly).

I only vaguely remember that PAL cameras do not shoot at 30 fps, but rather at 25 fps. Thanks, and I'll be sure to UNCHECK the box next to "Frame Rate".
I shot most of my footage at a shutter speed of 1/50 sec. In low light settings, I reduced the shutter speed to 1/25 and 1/12

The problem I've been having is that I only occasionally have success using MediaCoder and I cannot figure out if its because of something I'm doing wrong (I saved the settings as a 'preset' and use it every time), or if the program itself is buggy.

I just downloaded Avidemux and will give it a try tonight. However, I was unsure what some of the settings should be. I tried Handbrake as well, and had similar problems figuring out how to configure it properly.

I hope this posting is clearer than my past postings. Again, thanks for your patient replies to 'greenhorn newbie' here in Beijing.
Ray Ambrosi is offline   Reply With Quote
Old February 10th, 2010, 03:40 PM   #12
Inner Circle
 
Join Date: Jan 2006
Location: Minnesota (USA)
Posts: 2,171
I'm confused by a number of things here (as to what you are doing/trying to do), but I'll just focus on a couple things.

I don't understand why you had "Resolution: 1920 x 1081" if you want 800x576 to work with yourself, or something smaller for purposes of giving to the locals (in some form).

What are you using for actually editing?

I'll try to write something (in the near future) explaining how to take footage straight from the camera, and use Avidemux to both downsize the video to 800x576 (properly - so the quality is good) and encode it with x264 at 800x576 (and some tips on specific settings to make it look decent). I can't really do that right now though - pressed for time, and I'm not feeling well at all today either. (Unfortunately, I have some very serious health issues, and some days can be pretty darn awful, making it quite difficult to maintain enough focus to explicitly explain stuff like that carefully enough not to make things even more confused.)

You said you are using Linux and Wine. That does make things a bit tougher (especially when I've got absolutely no experience trying to run Windows apps that way), and could potentially be a considerable problem at times with compatibility issues when working with video.

Is it possible for you to install Microsoft's Windows XP on your computer?
Robert M Wright is offline   Reply With Quote
Old March 1st, 2010, 11:45 PM   #13
Regular Crew
 
Join Date: Jun 2004
Location: Canada
Posts: 58
Thank you very much for your reply!

Yes, I did want to convert to 800x576, but for some reason, got the settings mixed up.

If you could post some instructions on how to use Avidemux to downsize the video to 800x576, I'm sure many people would appreciate it greatly!

I'm sorry to hear that you are not feeling well. Please take good care.
Ray Ambrosi is offline   Reply
Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

Professional Video
(800) 833-4801
Portland, OR

B&H Photo Video
(866) 521-7381
New York, NY

Z.G.C.
(973) 335-4460
Mountain Lakes, NJ

Abel Cine Tech
(888) 700-4416
N.Y. NY & L.A. CA

Precision Camera
(800) 677-1023
Austin, TX

DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Panasonic P2HD / AVCCAM / AVCHD / DV Camera Systems > Panasonic AVCCAM Camcorders

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 



Google
 

All times are GMT -6. The time now is 01:00 AM.


DV Info Net -- Real Names, Real People, Real Info!
1998-2017 The Digital Video Information Network