DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

DJI Video codec

Jeffdj

Well-Known Member
Joined
Nov 6, 2016
Messages
57
Reactions
65
Age
80
I use many of DJI's products including Mavic 2 Pro, Mavic Zoom, Phantom 4 Pro and Osmo Pocket. In all of these products I mainly take video, preferably 4k at the highest frame rate. However I believe the DJI video codec is very inefficient when compared to Sony and Panasonic 4 k codecs.
My computer, a recent build windows 10 machine, will easily play back and edit 4k video clips at very high bitrates from the Panasonic GH5 and Sony A7 3. However even lower bit rate DJI video clips from any of my DJI machines cause my machine to stutter when playing on the timeline. I use Edius Pro 9 and Sony Vegas. All other 4K video clips play smoothly except DJI clips.
Curiously the dji 4K clips play ok when playing on video players like VLC and Microsoft Media but not once on a timeline in any editing software.
Of course you can create proxy files to speed things up but this should not be needed when other 4K codecs are more efficient.

I would like to suggest we canvas DJI to improve their codec. I also remember when DJI video clips missed a few frames when recording long video shots. The clips were split after the 4gb limit was reached and a file started.

Eventually DJI fixed this problem which other manufacturers had long since solved. Now is the time to fix the codec.
 
As far as I know, the codec is either MP4 or MOV, which are standarized codecs, no DJI adjustments to that.
The cut after 4,xx GB is also not caused by DJI, it is caused by the fact, that they use a windowsbased filesystem. Mac has no limitation to the filesize. The missing frames show up, when your card is slower then the rate of writing.
 
  • Like
Reactions: mereflyer
If this is true then explain why there is a difference in the way video editing software does not play smoothly with any DJI 4K video clip but it does with Panasonic and Sony 4K video clips, even when they are at a higher bitrate. I sent a copy of my DJI 4K video to the software companies and they confirmed it is a codec problem.
 
Also the missing frames were nothing to do with card speeds, the DJI software simply left a gap between consecutive continuous files. They have fixed this problem now. I still have plenty of files where these missing frames are evident. Some members said well you shouldn't be recording long files!
 
Also the missing frames were nothing to do with card speeds, the DJI software simply left a gap between consecutive continuous files. They have fixed this problem now. I still have plenty of files where these missing frames are evident. Some members said well you shouldn't be recording long files!
I don't think it's the DJI software that's leaving a gap between consecutive continuous files. This sounds like the usual (normal) thing that happens when you record HD video to an SD card that's formatted FAT32. There is a file-size restriction of 4GB in FAT32, and so the recording process is broken into 4GB chunks if the video recording is prolonged.
 
Yes the there is the file limitation re size depending on the format but irrespective of this, if a new file is created there should not be a gap. As I said this problem has now been fixed by DJI.
The new issue which I want fixed is the poor performance of the DJI 4K video codec. It is inferior to that used by Panasonic and Sony. Note They all produce a so called MP4 or MOV file but they do it in a different way and the DJI produces a stuttering on video editing software that Sony and Panasonic mP4 and MOV files do not produce.
 
the DJI software simply left a gap between consecutive continuous files.
I've been recording long files with a split with half a dozen DJI devices over the years and never had missed frames.

DJI consumer devices use common "action camera" chipsets, and thus output the same kind of file. Your Sony / Panasonic use formats more optimized for efficient post-processing. If you spring to an Inspire 2 you'll also get pro grade low compression and codecs with no I-frames...

Both your cameras are significantly more expensive than your Mavic, and they don't fly. Remember what you get with an M2P is not a $1500 class camera, it's a $1000 aircraft with a $500 class camera, aka pretty low end.
 
Last edited:
  • Like
Reactions: mereflyer
As far as I know, the codec is either MP4 or MOV, which are standarized codecs, no DJI adjustments to that.
The cut after 4,xx GB is also not caused by DJI, it is caused by the fact, that they use a windowsbased filesystem. Mac has no limitation to the filesize. The missing frames show up, when your card is slower then the rate of writing.
Neither MP4 or MOV are codecs.
They are simply containers/wrappers and nothing to do with the codec.
 
As far as I know, the codec is either MP4 or MOV, which are standarized codecs, no DJI adjustments to that.
The cut after 4,xx GB is also not caused by DJI, it is caused by the fact, that they use a windowsbased filesystem. Mac has no limitation to the filesize. The missing frames show up, when your card is slower then the rate of writing.
Mp4 and mov are containers, not codecs. The codec in use is either h264 or H265 dependant.

The air and M2P both shoot 100mb/s in either codec but x265 is a lot more difficult to decode in software (a 100mb/s H265 file is equivalent to a 140mb/s h264, not 200mb/s like people think for some reason)

So if your hardware doesn't have x265/H265 hardware decode then you will get stuttering etc as it's all being attempted in software on the cpu.


Remember :

Mp4/mov - container nothing to do with the codec
Codec : x264 / x265
Bitrate : data rate of the file (most consumer cameras don't use 100mb/s like dji, more like 50-70)
ColourSpace : 8/10 bit colour (4:2:0 on dji if 10)
Filesystem : ntfs / exFat don't have 4gb limits, fat16/32 do, this applies to macs too if using Fat16/32
 
This still does not explain why the Panasonic and Sony x262 and H265 100mb's +, 4K video files play smoothly on the same computer that if you play the DJI equivalent or even lower bitrate 4K files on produce stuttering.
My computer obviously does have the correct hardware decode or it wouldn't play the Sony and Panasonic files smoothly.
 
I've been recording long files with a split with half a dozen DJI devices over the years and never had missed frames.

DJI consumer devices use common "action camera" chipsets, and thus output the same kind of file. Your Sony / Panasonic use formats more optimized for efficient post-processing. If you spring to an Inspire 2 you'll also get pro grade low compression and codecs with no I-frames...

Both your cameras are significantly more expensive than your Mavic, and they don't fly. Remember what you get with an M2P is not a $1500 class camera, it's a $1000 aircraft with a $500 class camera, aka pretty low end.
I still have the files taken with my early Phantom 3, when playing files that were shot continuosly in flight, when played back and viewed on the time line showed that there were missing frames between adjacent supposedly continuous shots. Other devices that also had to split files because of the format limitations did not exhibit this fault.
With regard to price of devices the GoPro and Sony X3000 action cameras that shoot 4K video files produce files that play perfectly smoothly on my computer and they are not expensive but the application of the codec is obviously more efficient.
 
This still does not explain why the Panasonic and Sony x262 and H265 100mb's +, 4K video files play smoothly on the same computer that if you play the DJI equivalent or even lower bitrate 4K files on produce stuttering.
My computer obviously does have the correct hardware decode or it wouldn't play the Sony and Panasonic files smoothly.
X262 isn't H265, x262 is an mpg2 codec. But maybe got the wrong end of the stick there.

I know the gh5 shoots 10bit x265, but that is at 72mb/s, not not million miles off but still not 100mb/s. Also the Sony action cameras shoot 4k in h264 8bit 50mb/s or XAVC 100mb/s I believe, correct me if wrong, as both of those codecs are actually x264 variants (XAVC is a version 5.2 H264 codec)

I can't say why you have issues though, none of my pc's struggle with the M2P files, even my 'toy' HP 850G3 (only has Intel integrated 600 series graphics) plays them back without issue, and any of my 'real' machines can edit in Premier without frame rate stutters or drops with just barrel roll and colour grading, premier can start dropping frames if effects are added though on all my machines, and all 3 of my machines I edit on are pretty beefy (all i9 with either Quadro or gForce gpus), so not sure. Perhaps upload a small example we can have a look see if it's a drone recording issue or a pc issue for whatever reason?


What gpu / cpu combo you using, and using AMD/nVidia drivers or WHQL Microsoft ones?
 
Last edited:
Try using KODI to view your videos and see if you get the same issue ??
 
I have had issues with VLC and 4k - no issues with KODI
Fair enough, never had issues, but use what works, VLC and KODI both use the same underlying software (ffdshow) but whatever works is always the best tool [emoji6]
 
Fair enough, never had issues, but use what works, VLC and KODI both use the same underlying software (ffdshow) but whatever works is always the best tool [emoji6]
Charles you are right - I should have said before I upgraded my computer KODI was the only thing that would play properly - with VLC the screen would be green a lot - I got a new DELL Gaming Desktop - GTX 1070 video card - lots of ram - no issue really now. Now that you mention that I gotta download VLC and try some 4k stuff !!! Thanks
 
This still does not explain why the Panasonic and Sony x262 and H265 100mb's +, 4K video files play smoothly on the same computer that if you play the DJI equivalent or even lower bitrate 4K files on produce stuttering.
My computer obviously does have the correct hardware decode or it wouldn't play the Sony and Panasonic files smoothly.
The reason for the difference is way beyond the scope of this forum but will boil down to how the codec is individually implemented by the manufacturer.

Codec structure, intra, inter frame and GOP structure as well as key frame, p-frame, b-frame and delta frames are all important in their own right.

DJI have historically been sloppy in how they implement codecs. Manufacturers like Sony have years of experience in honing their acquisition and delivery codecs and have come from the early days of MPEG compression thru to sophisticated intermediate and delivery codecs as well as lossless formats.
 
  • Like
Reactions: mereflyer
The reason for the difference is way beyond the scope of this forum but will boil down to how the codec is individually implemented by the manufacturer.

Codec structure, intra, inter frame and GOP structure as well as key frame, p-frame, b-frame and delta frames are all important in their own right.

DJI have historically been sloppy in how they implement codecs. Manufacturers like Sony have years of experience in honing their acquisition and delivery codecs and have come from the early days of MPEG compression thru to sophisticated intermediate and delivery codecs as well as lossless formats.
Agreed, however the cameras quoted aren't using the same rates or even codec's for some of them, and we all know x264 is infinitely easier on hardware at the moment at least.

Plus a 75mb/s x265 is a lot easier to decode than a 100mb/s one, due to the non-liniar way x265 does its thing.

But your right, dji are a little lax at times with codecs
 
X262 isn't H265, x262 is an mpg2 codec. But maybe got the wrong end of the stick there.

I know the gh5 shoots 10bit x265, but that is at 72mb/s, not not million miles off but still not 100mb/s. Also the Sony action cameras shoot 4k in h264 8bit 50mb/s or XAVC 100mb/s I believe, correct me if wrong, as both of those codecs are actually x264 variants (XAVC is a version 5.2 H264 codec)

I can't say why you have issues though, none of my pc's struggle with the M2P files, even my 'toy' HP 850G3 (only has Intel integrated 600 series graphics) plays them back without issue, and any of my 'real' machines can edit in Premier without frame rate stutters or drops with just barrel roll and colour grading, premier can start dropping frames if effects are added though on all my machines, and all 3 of my machines I edit on are pretty beefy (all i9 with either Quadro or gForce gpus), so not sure. Perhaps upload a small example we can have a look see if it's a drone recording issue or a pc issue for whatever reason?


What gpu / cpu combo you using, and using AMD/nVidia drivers or WHQL Microsoft ones?
My apologies I dont have any issues with the m2p files, that was a typo. I only have problems with DJI H265 and H264 4K files but not Sony or Panasonic files. My cpu is a 3.30 ghz, i 7 -5820k, gpu is Nvidia GTX 960, I have 32mb ran and an Asus X99-A Mb. This combo plays all 4K files ok using video playback software like vlc and Windows Media player. However once on a timeline in Sony Vegas, DaVinci or Edius the DJI files stutter. The Sony and Panasonic 4K files do not stutter when on the same timelines.
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,075
Messages
1,559,551
Members
160,053
Latest member
maviclake