This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Recommended way of working with avchd content

Tags: None
(comma "," separated)
dkasak
Registered Member
Posts
7
Karma
0
Hi.

I'm preparing to work on LOTS of avchd content, produced by a Panasonic HDC5 camera. It doesn't quite import into Kdenlive properly ( 0.7.5 on Ubuntu-9.10
). The video plays at double the speed. The audio plays at the correct speed. Is there a simple fix for this? If not, I'm not to concerned about that at this point. I've read http://www.kdenlive.org/forum/state-avchd-support-kdenlive-mlt-and-ffmpeg and I'm fine with converting to some other more friendly format. Which format should I choose to minimize quality loss? Better yet, does someone have a throw-away ffmpeg line to convert to their recommended format?

I've been using this, which is a hacked-up, cut-down version that converts to DV:

#!/bin/bash
source=$1
outfile=${source%.MTS}.dv
echo "Converting $source to $outfile ..."
ffmpeg -i $source -target pal-dv $outfile

I originally chose DV format simply because that's what my old video captured in. But now I'm not sure this is the correct way to do it. Is there a maximum resolution for DV? Some of my tools are saying I've now got 572x384 video ( or something ).

What do others use? If you're wondering about my target format, I want to export: xvid in high definition, DVD, and flv.

Thanks :)

Dan
mcfrisk
Registered Member
Posts
40
Karma
0
Right now I'd try to get the native avchd files supported by kdenlive, mlt, ffmpeg etc by trying the latest git/svn versions and filing bug reports if playback doesn't work. Also, when you have found a somewhat working combination, stick to it. Updating the parts of the stack may brake others so maybe try newer versions but have a backup of the working combo. And put that project file under version control too.

Previously I converted all MTS files to mpeg4, but there were errors in the conversion which I found out the hard way after all content was converted and I had done a weeks worth of editing.

In my experience, the best format with kdenlive has been 720p30 mjpeg from my Panasonic FZ28. I knew about avchd problems and stayed away from it, too bad my friends didn't and I had deal with clips from Sony HD cameras.

-Mikko


ArtInvent
Registered Member
Posts
85
Karma
0

Convert to DNxHD

Wed Nov 18, 2009 11:34 pm
You can use the transcode function built into Kdenlive to convert to DNxHD codec .mov files. It takes a while, and the files are about 10x the size of the AVCHD files, but it's about the only way to get easily editable files. I do this all the time.

DNxHD is near lossless, and Kdenlive handles it quite well on my decent dual core machine. I'm pretty much using it exclusively for all my editing from a Canon HF-100 and it's very stable.

Kdenlive from 0.7.5 has a built in transcode function. Go to File | Transcode and follow the wizard. Select the corresponding DNxHD profile such as "1920x1080 60i/30p 220 Mb/s". Transcoding can take quite a while, but you can batch transcode your files overnight or something and be ready to work. I see now that there is another option for 145 Mb/s encoding, have not used this, but if disc space is tight, that should make smaller files at the expense of some image quality.

If you don't see the DNxHD codec as an option, go to Settings | Download new render profiles, you should see it. It was added specifically - "Try this if Kdenlive is having trouble with performance or seeking on your AVCHD footage." There is also a setting under Settings | Configure Kdenlive | Transcode where you can specify/edit which render profiles are available to the Transcode function.

After editing a project, I delete the DNxHD files but save the AVCHD files for archival purposes. If I really need to change the project, I can re-transcode back to DNxHD and as long as the files have the same name and are in the same place, the project can be re-opened and edited.
bieber
Registered Member
Posts
2
Karma
0
What about 24p video? Is there an easy way to transcode that to the DNxHD format?
dkasak
Registered Member
Posts
7
Karma
0
Thankyou mcfrisk & ArtInvent for your excellent suggestions. I will try all of the above this weekend.
ArtInvent
Registered Member
Posts
85
Karma
0
As far as I know, the latest git svn whatever of ffmpeg kdenlive etc will make no difference. And going that route rather than just using a PPA binary build has been very frustrating and tedious to get set up correctly, and to have decent stability, and to maintain. AVCHD support is just not fully baked yet. I can actually edit and render AVCHD directly but seeking or scrubbing doesn't work and playback only works if you start at the very beginning of each clip. That is for the Canon HF100.

Having no seek, scrub, or playback makes editing very very frustrating. This is why I use DNxHD.
mcfrisk
Registered Member
Posts
40
Karma
0
I'm trying learn from my mistakes and convert all AVCHD stuff to DNxHD before editing in kdenlive. Problem is that I have 339 clips to start with and I like using ffmpeg command line scripts when transcoding stuff. Is this command similar to how kdenlive would transcode MTS to DNxHD?

$ ffmpeg -i input.mts -vcodec dnxhd -b 120000k -deinterlace -acodec \
copy -r 25 output.dnxhd.mov

My input .MTS and .m2ts files are interlaced 1080i50 so I'm deinterlacing them at the same time.


capslock
Registered Member
Posts
699
Karma
4
OS
Maybe you want to deinterlace your result after or while rendering. If you deinterlace before editing, the effects and transitions could have lower quality because deinterlacing removes information from your source material. That's what I have read in other forums about deinterlacing.
mcfrisk
Registered Member
Posts
40
Karma
0
I'm mixing both progressive and interlaced sources, about 50-50. Previously kdenlive did not deinterlace well -- or at all for dv streams -- so I've been much better of using deinterlaced sources. Though now I have one helmet camera recorder using some odd DV format that even ffmpeg doesn't know how to deinterlace, but that's a separate bug...


Chamo
Registered Member
Posts
27
Karma
0
Hi,

with mlt 0.5.0 and kdenlive 0.7.7.1 on a Gentoo system with a cheap Nvidia card and VDPAU enabled, I can edit my AVCHD material from a Panasonic HDC-SD100 just fine. Take the clips from the SD card, load them into kdenlive, edit ...

There are just two major issues for me:
- Overlapping clips make the project monitor hang, this bug has been reported and should be resolved since mlt 0.5.4
- Rendering more than about 15 minutes of video with rescaling, deinterlacing and 2-pass dies. Also resolved with mlt 0.5.4?

So, I consider this as a great success, kdenlive and VDPAU does the job for my AVCHD stuff!

Chamo
magnusl
Registered Member
Posts
37
Karma
0
Hi!

Well.. I have a newly installed from scratch Ubuntu 10.04, on a dual core AMD 64, kdenlive 0.7.7.1 and MLT 0.5.4-1 (according to Synaptic). I try to work with AVCHD material from a Panasonic HDC-SD60, and it is painfully slow. It takes some 30 seconds to drop a clip on the timeline. And playback is very jumpy. Is there anything I should check or try? (I am currently experimenting with the transcoding to DNxHD)

Best,


Magnus Larsson
Chamo
Registered Member
Posts
27
Karma
0
Hi,

well, I'm not an expert to this at all. I just started working with kdenlive and AVCHD material a few weeks ago. But from what I've read so far, VDPAU is the only way to work with AVCHD material directly. So if you have an nvidia card, enabling VDPAU might be worth a try. Works for me on a single core AMD 64 3200+. :-)

This is what I did (as far as I can remember what might be related to this subject):
- get a cheap nvidia card (GeForce 8400 GS)
- install gentoo (so that I can compile everything with the flags that I need)
- add USE flags vdpau dv imagemagick win32codecs nvidia ffmpeg melt xine cdda ...
- install the video driver from www.nvidia.com (Version 190.42-r3)
- install kdenlive and all the stuff that it depends upon

It didn't work until mlt 0.5.0 came out. AVCHD playback was always very jumpy, as you said. Now, AVCHD playback in kdenlive is smooth with about 85% to 90% of CPU usage. I believe this must be the VDPAU support that came with mlt 0.5.0.

HTH

Chamo
interestedindividual
Registered Member
Posts
5
Karma
0
OS
Maybe I missed it but what is the source file that comes off your camera? Transcode is a last resort. It is more likely a container file issue. When I take stuff off my camera I use a script called modcopy which turns mod/moi files into proper mpeg without transcoding. It writes a valid header for the file. There are other programs which will change the container format but copy the stream. I think that should be your plan if you don't want to loose quality.

Hope that helps.

John
nyme
Registered Member
Posts
131
Karma
0
hi

it's more easy and free to use ffmpeg to convert avchd to mpeg2 or dnxhd ...

a lot of post say how to do that ...

this post is not a spam to a commercial product ...

nyme


capslock
Registered Member
Posts
699
Karma
4
OS
sunyanan85 posted a nice advertising here. The same post has been placed in about 15 other forums. But why use windows - we have doors! ;-) ...and ffmpeg and other free tools.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]