AVCHD playback and editing

I have asked these questions in a lot of forums and I still don't have a conclusive answer. I am looking into buying a new laptop, which I would like to be able to play 24mbs AVCHD files with (and edit, but I've got patience and not so much to edit anyway).

It is essential for me to buy a laptop, so there is no way of convincing me otherwise. I can buy cheaper HP Pavillion laptops that were used in expos, so I'd like to limit my self to them (I already own one, but it's more than 2 years old). Today I saw on HP's website that dv5t series laptops offer a top CPU C2D 2.53 (I'd prefer the smaller weight, because I already own a 24" LCD) and dv7t and dv4t series offer up to C2D 2.80. Top configurations offer nVidia GeForce 9600M GT and 9200M for dv4t  (4gb RAM and 7200 rpm discs).

I don't know if these would be good enough and if Linux drivers offer GPU support for decoding H.264. Please let me know if I top configurations could handle AVCHD playback (24mbs is a must) in VLC and editing in Kdenlive).

 

Cheers and a happy new year!

I have a C2D laptop with an nvidia 256mb vid card that I purchased in early 2007 that can decode h.264 just fine.  However, I am using Ubuntu 8.04 so I had to compile the latest ffmpeg, vlc, and mplayer to support it.  I also had to set specific options in both mplayer and vlc for the video to display properly.  My CPU usage is about 40-50% for decoding.

You luck is going to vary a lot based on the source of your AVCHD videos. I have a Sony SR-11 camera and my quad core Phenom with 8GB of ram is not able to decode 1080i AVCHD videos in realtime. In additional to that FFmpeg has timestamp AVCHD decoding issues making editing near impossible.

Nvidia has released a beta driver that supports GPU based decoding (VDPAU - Video Decode and Presentation API for Unix) along with some reference patches for FFmpeg and Mplayer.  It is in the very early stages though, and Nvidia appear to have made quite significant changes to the implementation already as they release new test drivers. Their goal seems to be to support GPU decoding of MPEG-1, MPEG-2, H.264 and VC-1 bitstreams on more recent hardware (see the url below for a GPU support list).

Go here for more information: http://www.nvnews.net/vbulletin/showthread.php?t=123091

- Si

 

Canon just announced 4 new kick-ass AVCHD camcorders, all of them recoring 24mbs. It looks like I have plenty of time for reserch, before they hit the market in my country. Looks like I'll be playing the waiting game some more.

Your question is about playing AVCHD videos and editing AVCHD videos:

Playing AVCHD videos

Since VDPAU patch was committed to FFmpeg SVN, a simple single-core computer with an recent Nvidia video card should suffice. I tested that the Nvidia 8400 was able to decode a 24Mb stream.

Mplayer was patched to support VDPAU decoding. Xine is coming. It will take some time, maybe a few weeks, before Nvidia drivers, mplayer, xine and maybe other players support VDPAU decoding. Time for packagers too.

Presently, without hardware acceleration, you cannot decode a 24Mb AVCHD stream. Because decoding isn't really multi-process yet. So using single, dual or quad core will produce the same results.

Editing AVCHD videos

Video editing of AVCHD videos is more complex. There are several issues at stake, mainly as regards (a) video decoding speed. You need to be able to display video during editing and (b) timestamps and seek issues. You need precise editing of course.

After discussion on the mailing list, there are two options:

  • Use some kind of hardware acceleration for video decoding. VDPAU offers video acceleration for display, but we also need access to the full decoded frames. For example, during a transition. So we don't know presently if VDPAU can be used and this is being enquired.
  • Only use i-frames during display and fix timestamp issues in MLT. This seems to be a very workable solution. Then we only need to work around timestamp issues, which may also be a real problem.
  • Proxy editing is in my own opinion non-workable as there may be slight differences while editing due to different timestamps and hence no guarantee of results.

There is no precise answer yet to these issues. For sure, the price of a notebook and the number of cores will not entirely change the quality and speed of decoding. What is at stake here is mainly sofware choices and we are only trying to find solutions. For the time being it is preferable to decide that AVCHD editing is not at stake. This is why in the http://www.kdenlive.org/video-editor AVCHD camcorders are set as non-supported, even if you can sometimes edit the files.

What is the speed of the processor you tested the 24mbs stream on? How much RAM doea that 8400 GF have?

 

Is there any possibility of decoding support for ATI cards? (I've seen some really cheap computers with Athlon X2 and ATI graphic cards)

Kdenlive 0.7.2 will include an option to drop B-frames during editing, which should allow good AVCD editing. There is also fixes pending on the FFmpeg side. Wait a few weeks before the dust settles down.

I went ahead and bought HP Pavilion C2D 2.53 3gb RAM 320gb (5400rpm) with 9600m gt 512mb GPU...

At the moment I cannot play 16mbs AVCHD files smoothly and I'll just wait for the plugin to get officially released... I just hope the disc won't too slow.

Good news: I posted a series of patches to FFmpeg, which address AVCHD support (timestamps, interlaced videos, seeking), so both 1080p and 1080i AVCHD movies (at least from Panasonic and Sony camcorders) are now editable with kdenlive directly. The patches have not been reviewed/accepted yet.

Attached is a complete patch against FFmpeg revision 17028, which corrects the issues.

There is only one issue remaining, this time in MLT framework. Namely, when seeking, it repositions the stream to 1 second before actually needed position, which causes decoding 1 second worth of H.264 data unnecessarily (and makes seeking very slow, depending on your horsepower). The result is correct, though.

Have fun!

shadow,

it's really a very good news ...

i wan't to buy a panasonic hdc-sd9 ...

I see your patch, but i don't know how to apply this..

i will search how to apply a patch but if you have the command line in your bash history ...

i wan't made film in 720P whith this cam because my computer is slow (pentium M 1,73) ...

Thanks again ..

Nyme

Excellent!  Would you report back if and when the patch is accepted?

Thanks,

was anybody able to superimpose / burn the timestapm on a DVD compilation? Seems like the timestamp data is stored (at least for Sony HDR-SR11) in one of the 3 files for each video, however, no software would print it over when editing the video in "home production".

Is anyone aware of a software that can automaticaly do this?

Well, it's a standard patch, so you'd get source of FFmpeg at the aforementioned revision, e.g., via

cd /where/you/want/to/get/ffmpeg/sources
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk -r 17028 ffmpeg

and then do:

cd ffmpeg
patch -p0 < /where/my/patch/is/avchd.patch

and then normal process of ./configure <params>, make and sudo make install. I personally use following params for configure:

./configure --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libdirac --disable-encoder=libschroedinger --disable-decoder=libdirac --enable-gpl --enable-libxvid --enable-gpl --enable-libx264 --enable-shared --disable-static

Obviously, you need to have dev packages for all the mentioned libraries installed. But configure will complain if you don't.

Hope this helps...

I have a Canon HF100 and have tried to edit the MTS files directly. It almost works, actually, you can add the clips and play them (haltingly) and render something. Almost ain't good enough, of course. But I'm wondering if these patches will be out around the time Ubuntu 9.04 is released. I kind of hate to go back to trying to compile ffmpeg myself, had lots and lots of fails in that respect already.

It takes a quad core with 4mb of RAM to edit this stuff with Windows Vista. With the VDPAU drivers for Nvidia cards, the prospect of editing this smoothly on a mere dual core Linux box - sweet.

Editing AVCHD on Linux would pretty much be the end for me, the final sticking point.. At that point, Linux has arrived and Windows is completely irrelevant. Keep up the good work folks. It's almost there.

Further investigation reveals that packages for Ubunty Jaunty (alpha 4 at this point) look to be much better than what I have going on Intrepid. Recent updates to the alpha really helped overall multimedia and sound. Some of the problems I've had with transitions and effects seem to have cleared up. Now, bear in mind that I am experimenting with this in a virtual machine (VirtualBox), which is actually pretty astonishing. But I can load an HF 100 AVCHD file. In Configure Kdenlive | Playback I checked off the "Drob B-frames" box. Playback of the timeline is halting, no surprise, but free of the weird blockiness I saw before. But a render out to mp4 in full resolution gives a final file that looks quite perfect with good sound - however the sound is off sync by about a full second for some reason. (I'm playing this back in a real machine, not a VM.)

Can't wait to try out Jaunty in a full blown native install.

I had a similar problem with mencoder, x264, and a DVD source.  I used "-mc" to correct the a/v sync issue.  ffmpeg  has the "-async" option that should be able to help.  It looks like the rendering interface has the ability to edit parameters.

shadow, did the avchd patches make it into ffmpeg yet?

 

Does anyone know if ffmpeg or kdenlive support removing (or working with) the 24FP or 30FP pulldown in Canon AVCHD camcorders? I've had to use mplayer/mencoder to remove the pulldown so far...

This is actually good patch. It is possible to edit AVCHD in kdenlive.

But there is a little problem now.
Patched FFmpeg worked good only for kdenlive, I have no ability to play native AVCHD files with video player. New version of the FFmpeg have very good AVCHD playback support - VLC play's it nice. But now (with new version) it is impossible to edit AVCHD in kdenlive :(

Conclusion: it'll be very nice if we will have patch for newest version of FFmpeg