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

State of AVCHD support in Kdenlive, MLT and FFmpeg

Tags: None
(comma "," separated)
jmpoure_drupal
Registered Member
Posts
735
Karma
0
Hello, could we use this thread to make a statement of what needs to be done for a better support of AVCHD camcorders in FFmpeg, MLT and Kdenlive. Then we may ask for changes in FFmpeg and try to find collaborative support. Dan, what do you think would be needed for a better support of AVCHD camcorders in FFmpeg?

I believe that if we write a public statement and ask for help at FFmpeg, the core hackers can concentrate on FFmpeg important issues and fix them.

Jean-Michel
ddennedy
Registered Member
Posts
1315
Karma
1
The FFmpeg developers know the situation, but are not eager to resolve it on their own instead relying upon contributed patches. I am in the same boat as them. I have enough issues to deal with, and I do not own an AVCHD camera. Therefore, I am not inclined to work on this either. This is not out of malice; it is a matter of priorities and lack of personal nuisance. I have no personal "domination" agenda nor the energy to make kdenlive all things for all people in short time.

AFAIU, to give a technical summary, the FFmpeg seek API needs to be reworked to accept PTS instead of DTS. Then, MLT can change to use PTS as well. This info is based on the last outstanding patches from Ivan Schreter who was working on this. He had a partially complete FFmpeg patch. Again AFAIU, this is a difficult situation because I believe many demuxers will need to be updated. For example, the DV demuxer would crash as a result of the patch, and some other formats were not accurate IIRC. Also, there is a new seek API in progress, and this might be part of that.


ddennedy
Registered Member
Posts
1315
Karma
1
The other option is to not use FFmpeg for AVCHD support. I already need to add a separate Ogg Theora module to get better support for that. Perhaps gmerlin-avdecoder is an option or gstreamer. I do not know what is good and accurate at seeking for AVCHD. If someone can research that and give some feedback, that would be nice.


ArtInvent
Registered Member
Posts
85
Karma
0
FWIW - AVCHD seek is actually much improved in 0.7.4 now that I've gotten a working build.

I'm using the Ubuntu package described at
http://www.kdenlive.org/forum/kdenlive-074-launchpad-debs-jaunty-and-intrepid

Quoting from my remark there on that thread -

I'm using 1080p30 .MTS footage direct out of a Canon HF100. Previously it worked alright but you couldn't seek to midway into a clip and play back, you'd just get a grey screen. Now it's still dropping b-frames so a bit jerky still, but you can definitely seek and play. Very nice.
ArtInvent
Registered Member
Posts
85
Karma
0
At this point there are a couple of issues for me with AVCHD

First is playback. I'm on a dual core Athlon 64, and I'm using an Nvidia 9400 card, driver with VDPAU extensions. With this hardware, it's already a pretty impressive achievement that you can playback raw AVCHD directly in the NLE at all, even with dropped b-frames, because I was unable to do this on Windows with this hardware and a commercial NLE like Premiere Elements: not a usable editing experience, way too jerky and slow. 0.7.4 is pretty darn good in this respect. A luma transition with title over is even pretty fluid, which is pretty impressive. So maybe I'm wrong, but I'm wondering just how much better editing playback can get given hardware limitations.

Probably to me the more attractive target would be pass-through rendering back to h264 or whatever is most compatible with AVCHD. It would be really fantastic not to do a re-encode on those stretches of footage that are trimmed but otherwise unaltered or that only have audio mods. Only transitions, effects, and compositing would need re-encoding. Rendering could conceivably be extremely fast, and moreover - this would be editing with basically no generational loss: extraordinary. Additionally, you could stick a finished render back on the camera and play that back on any tv through HDMI. Movies played back directly from the camera's dedicated decode hardware look better than anything I've so far experienced even over a computer with HDMI out.
ddennedy
Registered Member
Posts
1315
Karma
1
Thanks for the encouraging feedback. In addition to poor support for seeking on AVCHD we also have poor support for Ogg Theora, which is growing important due to its HTML5 support in Firefox, Opera, Chrome, and other Webkit derivatives. To that end, I am looking at adding a gstreamer or gmerlin-avdecoder backend to MLT. I know gmerlin has better support for AVCHD than we do, and I know gstreamer has better support for Ogg Theora. While both can bring additional benefits, I only have bandwidth for one at the moment (actually, I don't have bandwidth for either, but I may make room for one).

As for the pass through, we have had that request for HDV and DV in the past. I agree it would be nice, but it is far from trivial for any format, and H.264 is especially difficult. When I consider it against other factors and consider that advanced users will filter a lot (color correction esp. as that improves) and low end users will encode to something for the Internet or DVD, then its usefulness is rather limited. Nevertheless, it is on the MLT todo albeit rather low.



OsZ
Registered Member
Posts
23
Karma
0
OS
Hi,
just joined because I recently bought a Panasonic HDC-SD300 and I am very interested in editing AVCHD material, too.

Before I had a Mini-DV from Sony which broke down after 9 years of usage now. Kino, Cinelerra and later releases of Kdenlive were exactly what I needed to edit footage with my openSUSE box.

Nevertheless, find it difficult now to edit AVCHD material with any of the available software. Cinelerra doesnt except .mts at all (knowing the workarounds to change to other formats with ffmpeg), so Kdenlive is what almost does the job, even playback, exact frame cut and rendering still is an issue.

Not to get me wrong, I like Kdenlive, because it's very easy to use (much more than Cinelerra) but powerful enough to get my birthday or vacation footage to a nice film. I just wanna dis-agree to the statement that low-end users wanna render in formats like for Youtube or DVD. I can make better videos with my mobile phone to get it to Youtube. When people spend between 600 and 900 Euros for a Camcorder that is able to record in 1080i they usually wanna keep the high quality. Sure, downgrading is still an option to get footage to the internet but in general I wanna get my holidays memory film cut with nice music below playable in 1080i again on my Full-HD TV. And I always kept the raw footage just with some fade in and out, transitions and add musik. I only remember that I had to change the brightness for one clip one time in the past which would result in a complete new rendering.

So imho it should be one of the major focus to get good AVCHD support, even it is difficult. Short rendering time to raw, initial format (AVCHD) would be more than welcome by a lot of people that got a new AVCHD camcorder.

Maybe some PC specs if somebody interested: openSUSE 11.1, KDE 4.2 on an AMD 4600+ (dual core Athlon 2400MHz), 8GB RAM, nvidia 7600GT, 2.5TB HDDs. With this one I rendered 30min AVCHD footage to H264/AC3 5.1 @ 12.000 Kb/s in almost 10 hours.

Cheers,
OsZ


OsZ, proud to be a member of KDE forums since 2008-Oct.
ddennedy
Registered Member
Posts
1315
Karma
1
Should it be my major focus even though I do not have an AVCHD camera, am not getting paid for this, and have nothing to gain except, well, purely the glory of being an elite free software hacker? Yeah! Rock On!

IMHO, I should focus on helping Kdenlive be better at formats it does support fairly well. Then, hopefully, someone who really cares about AVCHD and has the skill to do something about might be compelled enough to contribute.


OsZ
Registered Member
Posts
23
Karma
0
OS
Hi ddennedy, nothing against that and I do not expect anything from open source software that is out of skill of the hackers that feel like you. I even do not know anything about programming otherwise I would help on some projects as well. My only bit to the open source community can be to help testing, and give feedback from a user point of view. And then back to topic: I appreciate that you are maybe not interested because you don't own a new camcorder but in general I always feel the open source hackers are mainly focusing on old stuff. I am system engineer in the automotive industry and we need to look forward when we develop new cars at least 4 years, not backwards whats available. Thats my general thinking in whole life - living for now and the future - past is gone. I am sorry if you do not think so. Again, nothing against you or open source and this great project but a bit forward thinking also in spare time when programming (yes, I know) for free would help a lot for the overall state of open source.

Will use Kdenlive, because thats so far the best open source video editor for daily use. I like the easyness and the way it interacts with me as the user.

For any AVCHD footage samples let me know, for things to test and try out, let me know. I registered my SD300 in the supported camcorders section.

PS: Just before I stop with this kind of conversation, if someday somebody feels like care about AVCHD then Metadata from the corresponding sub-folders should be considered as well, not only the video files (*.mts) themselves.

Thanks a lot...
Cheers,
OsZ


OsZ, proud to be a member of KDE forums since 2008-Oct.
MJ Peg
Registered Member
Posts
67
Karma
0
> Should it be my major focus even though I do not have an AVCHD camera, am not
> getting paid for this, and have nothing to gain except, well, purely the glory
> of being an elite free software hacker? Yeah! Rock On!

I appreciate that sentiment, but the majority of new camcorders being sold these days are AVCHD I suspect (or if not, soon will be).
You have the opportunity to be an online hero :) with this OS product that would keep 99% of consumers happy.
It is up to you though.

That's the problem with many Open Source projects - it's great when programmers give away their code that they wrote to "scratch their own itch" but if we want anything else then we're straight outta luck. I had high hopes that kdenlive was the other kind of OS - where the developers are hellbent on the challenge of rivalling the Big Boys :)

Oh well. Good luck with the project anyway. I hope it doesn't meander down a dead-end and go nowhere, because I love the idea of Open Source and love to see succesful projects start from promising beginings like this.

cheers
ArtInvent
Registered Member
Posts
85
Karma
0

Trimming the front of an AVCHD clip

Mon Jun 15, 2009 6:51 am
Actually I'm pretty impressed with the state of AVCHD handling in 0.7.4, and also noted is how much it's improved in a fairly short time. Somebody's doing something right, and it seems to me it can't be that far from being nearly perfected. (Easy for me to say, right?)

Today I edited a pretty short video with about 15 clips. (Canon HF100.) It seems to me that the only blocker I have is in trimming off the front part of a clip, especially if more than a second or so is trimmed. I had one clip where I had to do this, and it played fine on the timeline but that clip wouldn't render right at all. I had to transcode the clip to DNxHD and then import that, then I could trim it. Everything else rendered fine. Clips with substantial trimming off the back end don't seem to have the problem.

How important is to have robust AVCHD handling? Well, check the camera sites and stores. Basically nearly every new camera worth having under $3500 uses it, unless it's a pocket still cam or a Flip. By next year it will basically have taken over the market. If Kdenlive is going to be relevant, well, yeah, it's gonna need to do AVCHD and do it well.

Why don't we just all pitch in and buy Dennedy a new camcorder? :)

jmpoure_drupal
Registered Member
Posts
735
Karma
0
You are right, I read that 95% of camcorder market in 2009 would be AVCHD. Impressing, no?
KoRnholio8
Registered Member
Posts
88
Karma
0
I'm expecting the Canon HFS100 to arrive this week (maybe next week). AVCHD is the future (I guess manufacturers choose it long ago).


johanneswilm
Registered Member
Posts
8
Karma
0
So that is the conclusion of all this? Everybody will wait until someone else comes along to fix it? Whatever happened to this patch: http://www.kdenlive.org/forum/avchd-playback-and-editing#comment-2524 ?


madsdyd
Registered Member
Posts
204
Karma
0
> Why don't we just all pitch in and buy Dennedy a new camcorder? :)

It still would not solve the problem of Dan not having the bandwidth. I think we should consider it though. Dan is probably our best bet in getting first-class AVCHD support in Kdenlive, as long as the ffmpeg infrastructure needs so much rework to mature.

I do not personally own a AVCHD camera - I explicitely chose a HDV in order to be able to edit that.

However, I would be willing to pitch €100 towards a AVCHD camera for Dan, if he thinks it will improve his motivation for working with AVCHD. Note: one can't ask him to commit to this, only ask if he thinks it will help!

I guess you only lack about 15 others then - if some of you can pledge in some money too, we could make a fundraising thing on e.g. http://www.fundable.com - iff Dan would accept this, of course.

So, what do you say? Are you ready to put your money where your mouth is, or do you just rely for Dan to implement this in due course :-)



Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]