Intro | Usage help | Version history | Download
Intro
H264LevelEditor is a free and small tool to edit an H264/AVC encoded video stream and change IDC profile level (see here for detailed info about IDC levels).
Works both on MKV containers and raw H264 streams (*.h264, *.264, *.ts or any other file containing H264 encoded video).
It's a portable software, no need to install it.
Video stream/file is edited in-place, which means:
- fast editing
- no need to reencode the file (save time)
- no need to demux, edit and remux streams (save time and HDD space)
To make a long story short, some mediaplayers (like my Samsung C6000 LED TV and Sony PS3) search the video file being played for an header info named AVC profile level; if this level is greater than the requested (supported) one they simply refuse to play it, even if they could.
BluRay specifications requires level 4.1, which is supported by all actual HD mediaplayers. Many of the video files you'll find on internet were encoded with an unnecessary high level, like 5.1.
The right way to change AVC level is to reencode the file; this is really time consuming, even if you have a recent CPU.
A quick way is to change some bytes inside the file and make it appear as being encoded with a different level; if you're lucky, changing that 5.1 to 4.1 will make the file playable on your mediaplayer.
Just to be clear: H264Editor does not change the video stream compression.
It only changes a value in file header, where it "declares" its level to the world.
Many of the 5.1 encoded files out there are not really 5.1, but over-leveled 4.0 or 4.1.
If the file itself is encoded using 5.1-only features, and your player is not able to decode it, well... you must reencode it, no way.
Usage help
Using H264LevelEditor is easy as 1-2-3:
- select the video file to edit by pressing then tree-dots button, or drag&drop the file directly from Windows Explorer
- H264LevelEditor will show actual AVC level into the "h264 level" box, choose the new level you want to set
- press "Change level" button
- click on "Donate" button (well, this is obviously optional ;) )
Download
H264LevelEditor it's portable software (single EXE), no need to install it.
Latest version is v.1.2.0, click here to download.
WARNING: .NET Framework 2.0 or newer is required to run H264LevelEditor.
(Windows Vista comes with .NET Framework 3.0 preinstalled, Windows 7 comes with .NET Framework 3.5 preinstalled.)
Version history
v.1.2.0 - 2012-01-24
- NEW: Search limit can now be extended up to first 100MB of the file (default is 1MB). This adds better support for MP4 files.
- NEW: initial (and really experimental) support for H264 encoded AVI files. Please remember that AVI is not a good container for H264/AVC stream.
- NEW: added automatic software update checking feature, can be set into Options dialog
- FIX: fixed search algorithm to avoid @n.k profiles detection
please see comments here for further details.
v.1.1.0 - 2011-08-05
- NEW: backup feature, allows to undo any changes to input file
- NEW: improved search algorithm, now changes the muxing tag too
- NEW: fix to recognize mislabeled profiles, such the ones produced with very old encoders
Comments
When will it be released?
When will it be released?
Now available
H264LevelEditor is now available, finally!
Thanks
Thanks for tool.
It is very simple.1 suggestion :when the change is made it give a mesege "ok"or someting.
Thank You
Thanks for your
Thanks for your feedback.
Well, one of the (unreleased) beta version of the tool had a Message Box with the message you're asking for.
Since it was so annoying, I decideed to add a log area that will collect all the informational messages.
After a successful editing, the message "Level changed successfully to x.x" is shown into the log area at the bottom.
Amazing!
This tool is amazing! Is there any project for this to be made for Mac OS? :)
Could work with Mono
Well, since it's written in .NET, you could try to run it with Mono (http://mono-project.com/).
There's a precompiled MacOS X version downloadable here: http://www.go-mono.com/mono-downloads/download.html
Please give me a feedback if it works...
Great app, please add batch
Great app, please add batch mode! It would be perfect...
It's already on my todo
It's already on my todo list.
Stay tuned!
Very good post ...i really
Very good post ...i really enjoyed great job thank you!
I still have problem. Like
I still have problem. Like your story, I have Samsung LED D5000 which is very sensitive to H.264 profile. I already changed the profile (before is High@5.1) to 4.1.
However, my TV keep refusing to play it and says that 'Video Codec not Supported'.
In addition to that, when I checked the file with mkvtoolnix (after changing profile to 4.1), it is written like below:
AVC (container profile=High@5.1)(High@L4.1)
so, the file is still recognized with profile container of High@5.1.
I guess that is why the TV refuses it; although the profile has been changed to 4.1 with your tool.
would you help me? please share how you can cheat your C6000 TV regarding this H.264 profile?
thanks in advance. and thank you very much for your tool !
Suggestion
Two things can prevent Samsung TV to play an .mkv file, giving the error you reported:
You can check the latter with a tool like MediaInfo (http://mediainfo.sourceforge.net).
Anyway you could try to remux your original mkv DISABLING header compression (it's really fast, no recompression and no quality loss):
Please let me know if it works.
Hi, thanks for your reply.
Hi, thanks for your reply. I've done what you suggested.
Regarding the header compression, I googled it up and found and indeed it is one of the problems. However, I (guessed) I already change the compression to None (with mkvmerge - mkvtoolnix), and remux. It was fast, less than 2 minutes. Then, change the H264 profile to lower one. but no luck, the file still can't be played with my samsung. error code still 'Video Codec not supported'. any other suggestion?
and I checked the file with MediaInfo, but as long as I know, MediaInfo does not show header compression status. Or did I not use it correctly?
B'Rgds
Well, so that maybe means
Not working correctly
Things to try
Well, that message does not come from H264/AVC Level Editor, so I suppose there's something wrong within your system.
The program needs .NET Framework to run, so no need to run in compatibility mode (or even as Admin).
On Windows 7 the .NET Framework 3.5 is preinstalled, so all prerequisites are satisfied... I'm really out of ideas
.
if you get the same error, then the problem is with .NET framework installation, then look here.
Please let me know if you succeed.
This tool would be wonderful
Container profile issue
A sony blu ray player refuses to play the file because of the tag "Container profile @l5" regardless the change on profile level. The same file was modified in its profile level with tsmuxer, and this file IS playable. The only diference between the two ile is that, when analised using mediainfo. So i guess this is a bug. Please fix it soon. Thanks.
My tool doesn't add/edit any
My tool doesn't add/edit any tag at all; it only changes 3 header bytes, containing profile level definition.
So I'm sure the tag "Container profile-High@L.5" was already present into your original file, then will be into patched file too.
Can you please confirm it?
That said, this'll be the first case I saw of a player using a tag content (which is a "free" text) instead of a well-coded header field. But maybe Sony players work this way.
Please send me a sample non-working file, extracting the first 5Mb of it, and I'll take a look. Use the contact form...
I confirmed the original
I confirmed the original file DOES NOT carry that tag. Maybe you are not aware of this as well, but somehow this tag "muxing mode @highL5" is CREATED after changing the profile level. I guess that is a bug. I am not the only one facing this problem, you can see other posts commenting about this "muxing mode @highL5"..
What i am trying to say is
What i am trying to say is the tool does put the tag "HighL5" on the field "Muxing mode" out of nowhere, because original files does not carry this tag at all.
Any ideas for a command line version?
I'm writing an application that remuxes avi, mkv files into mp4files.
During the automated process, it doesn't changes the h264 level.
So, I would like to have an H264LevelEditor's command line version.
Could you make one?
Thanks!
Command line
Implementing a comand line version is not on my todo list, but I'll add it.
Meanwhile take a look here: http://www.ode2.com/?p=12. That helped me a lot to understand how to change AVC level.
While demuxing and remuxing stream, you could easily patch the stream on the fly, no need of other external software.
Released version 1.1.0
Version 1.1.0 has been released
v.1.1.0 - 2011-08-05
Issue fixed
The issue "Muxing mode High@5" now is gone.
I can confirm for sony blu-ray owners the tool now works perfectly with this new version (1.1.0).
Thanks to the developer for this wonderful tool.
You're welcome.
You're welcome.
Thank you for the detailed feedback and cooperation that lead us to v1.1.0.
Video format
Hi
possible edit video format for H264 files too ? (NTSC/PAL/SECAM) etc
cheers
Could you please elaborate
Could you please elaborate your question a little bit?
Do you mean you want to change fps or standard resolution (PAL=720x576x25fps, NTSC=720x480x30fps)?
PAL/NTSC/SECAM are analog video formats, so I can't understand where you find them into an H264 stream.
thx for the tool!it is
thx for the tool!it is great!!
You're welcome
You're welcome
Great tool! Super fast and
Great tool! Super fast and lightweight.
When can a batch processing mode be expected?
Well, I already have this
Well, I already have this feature on my todo list.
But I work on my projects on spare time, and it reduces day by day, so it's difficult to give them the right priority.
PS: H264LevelEditor is the 2nd of my most downloaded tools (Drupal-SQLite is the top one), but it never had any donation, not even a buck!
Would someone fund this feature ;) ?
you can run this program on
you can run this program on Mac OS X using CrossOver. I ve tried it. perfect. thanx
Thanks
Thank you very much for your feedback.
I'm sure it'll be usefull for other users.
Error messages:
I have created several test files with AVS Editor, AVS Remaker (cut, join tool), video redo as you can see. All files are playable (!) on PC, but only 3 (with 2, or 02 and 31 name extension) work off USB stick/port on Sony BDPS-770 player. I discovered with help of Mediainfo that playable ones (on Sony) are Profile 4.1 or lower (4.1, 4.0 and 3.1). Found your tool to correct AVC Profiles and got these errors.
Mediainfo has no trouble reading profile. See this:
Complete name : Preview_1cut-cut videoredo (02).mp4
Format : MPEG-4
Format profile : Base Media (Baseline@L5.1)
Codec ID : isom
file works on PC not on Sony... but after transcoding it with Handbrake:
Preview_1cut-cut videoredo (02handbrake).m4v
Format : MPEG-4
Format profile : Base Media / Version 2 (high@3.1 (CABAC 4Ref Frms)
Codec ID : mp42
it works on Sony... yet your tool will not report AVC profile. The only profile it read is from unplayable file (on PC and Sony!!!) and this one I could change. After correction file is still unplayable. What's the problem? Why your Level editor can not read the profile yet mediainfo has no trouble with it?
Here are the error msgs:
Selected file: G:\Preview_1.mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_1cut-cut videoredo (02).mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_1cut-cut videoredo (02handbrake).m4v
ERROR: Can't find AVC profile
Selected file: G:\Preview_2.mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_3 (2).mp4
AVC level pattern found at file offset 658: @4.1
AVC level pattern found at file offset 666: @4.1
AVC level pattern found at file offset 2590: @n.k
WARNING: Warning: different levels found, proceed at your own risk!
Selected file: G:\Preview_3.mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_3avs.avi
ERROR: Can't find AVC profile
Selected file: G:\Preview_3iso.mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_31.mp4
ERROR: Can't find AVC profile
Selected file: G:\Preview_1 (2).mp4
AVC level pattern found at file offset 658: @4.1
AVC level pattern found at file offset 666: @4.1
AVC level pattern found at file offset 14722: @n.k
WARNING: Warning: different levels found, proceed at your own risk!
Selected file: G:\Preview_31.mp4
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\AVC Intel and mp3.avi
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\Coding test 1 AVC MP3.avi
AVC level pattern found at file offset 13447: @5.1
Backup file created: G:\New TESTS\Coding test 1 AVC MP3.avi.hle-bak
AVC level pattern found at file offset 13447: @4.0
Level changed successfully to High@4.0
Selected file: G:\New TESTS\Preview_1cut-cut_remaker_avi_mp3.avi.mp4
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\Preview_1cut-cut-remaker avi pcm.avi
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\Preview_cut_cut1 mp4 divx.avi
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\same test 720p avs edit.avi
ERROR: Can't find AVC profile
Selected file: G:\New TESTS\Video0013i14remaker avi mp3.avi
ERROR: Can't find AVC profile
Selected file: G:\Preview_3.mkv
ERROR: Can't find AVC profile
Thanks for your feedback
Well, my software doesn't do a complete stream analysis on input file as MediaInfo does.
It only tries to find profile tags by searching a corresponding byte pattern; that's why patching process could be done in-place and really quick.
The counterpart of this method is that it could detect "false positives" or found nothing at all.
That said, "AVC level pattern found at file offset 2590: @n.k" is a strange log message, just because the list of supported tag patterns doesn't include it, so there should be something wrong.
I see you're an experienced user, could you please extract a 4-5 seconds sample from 2 files (one with undetected profile and one with @n.k one), check if they have the same issue and send them to me?
I'll send you an email with my personal mail address...
Thanks for your detailed feedback.
n.k profile detected
Hello There,
Am also facing the "n.k" profile detection issue.
Claimingly the tool detects 2 profiles. 5.1 and n.k (in many of my files).
Then whatever level I change the profile to, it won't be playable back in VLC or anything else either, the video goes blank.
EVEN if I change it to 3.1 and then back to 5.1 with the tool.
So messing up something in it.
Any idea would be greatly appreciated :)
Thank you
I faced the same problem. The
I faced the same problem. The issue resolved firstly remuxing the MP4 file into a MKV file using mkvmerge.
http://www.bunkus.org/videotools/mkvtoolnix/win32/mkvtoolnix-unicode-3.0...
Then change the profile using the program. The problem seems to be caused by:
a) There is NO h264 encoded stream in the file (containing divx, xvid, or any other codec)
b) The file is encoded to MP4. The tool is not very friendly with the iso MP4 file container.
c) an AVI file container is used (.AVI) containing the h264 stream. I am an owner of a Sony Blu-Ray Player and using this trick the files become playable.
Revert your files ASAP. then
Revert your files ASAP. then use the trick. As the developer said, send him the file. I was going to contact him to discuss this issue anyway.
@b wings: thanks for your
@b wings: thanks for your replies.
@Joe7 and @b wings: As I already said, please send me a sample file (please cut it to be less than 10MB) and I'll have a look.
I'm thinking to add the possibility to discard some of the found levels and change only some, i.e.:
- found 5.1 profile at offset 1323
- found 5.1 profile at offset 3455
- found n.k profile at offset 17823
Now the user could choose to only patch the first two and discard the latter.
What dou you think about it?
But before I need to know why it detects n.k profile, which is not an expected one, so I'm waiting for a sample file.
Beta version to test
I just uploaded a 1.2.0_beta1 version here:
H264LevelEditor_1.2.0_beta1.zip
Regarding AVI files there are some things to highlight.
First: AVI is the worst container for H264/AVC encoded streams. Despite this, it could be the only way for some players to read H264 files.
Avi file is basically composed by RIFF chunks, a sort of data block (see Wikipedia for details).
That said, each video block has its own profile header. Into a 100MB file the profile information is repeated hundreds of times, once for each data chunk.
H264LevelEditor limits its search to the first 3 patterns found (avoiding false positives into audio/video data stream); this works well for MKV and MP4 containers.
Since I don't have an AVI/H264 capable player available, please let me know if I should increase that limit.
Thanx Guys you've saved me a
Thanx Guys you've saved me a lot of time!!!
Version 1.2.0 released
New version 1.2.0 released, see version history for details.
batch!
This is really wonderful! I do hope you add a batch feature though.
thanks
Thank you very much for this wonderful application
Thankyou, Works Perfectly.
Just a quick note to say thankyou, this software is brilliant, I had 6 MKV's that would not play on my sony bdpS380 but played perfectly on my pc. After much messing around I came across this little program and it works great, so simple and now all my MKV's play perfectly. Again many thanks for taking the time to produce such a great piece of software.
@anonymous, @Happy
@anonymous, @Happy Chappy,
thanks for your feedback and... help me spread the word (FB, Google+, Technical blogs, forums, ...)
Thank for your great tool.
Thank for your great tool. Hope to see next update.
Cannot ? why?
hi tanQ for this tool but A few days this tool cant change level 5.1 to 4.9 and other levels. and saved level 5.1 in the orginale file why? all of my file is mkv whit Level 5.1
Trying to help
It's really difficult for me to understand your question, anyway I'll try to.
4.9 is not an existing H264 level, so I suppose it's a typo in your comment.
Do you mean you aren't able to change level now but you were in the past?
If yes, please check:
After that, if you still have issues, please cut and paste me the log messages outputted by the tool using this site contact form.
!!!!
hi dear friend
sorry for last questions , because my english writing is very bad :D
but, when change level dont show error and type successfull but in Orginal file Dont change level
This log for me
and this .hle-back
and original file write with
Writing application : mkvmerge v5.2.1 ('A Far Off Place') built on Jan 2 2012 23:21:10
Writing library : libebml v1.2.3 + libmatroska v1.3.0
Ok, but Dont Change level in orginal File :-s
in few day ago don't have this problem.
Thanks!
Worked like a charm and helped me play an 1080p movie on my Samsung 40D5000 TV. The movie had container profile=High@5.1, changed it to 4.1 and worked great.
Suggestions
How did you noticed that the code was not changed? The file itself was changed, because of these lines:
H264LevelEditor, after the change, rescan the file, and those are the log lines confirming that it found the new level set.
So when you say "the level is not written" I suppose you mean "when I play the file on my player it does not work" or "when I scan the file with another tool it still reports the original level".
In this case, press "Options" and increase search limit by 5MB at a time up to 100MB; remember that with a largest limit H264LevelEditor could find more false positives, so the less the better.
You could also increase pattern count limit, but the default 2 is always a good choice.
Actually it finds only 2 occurrences in your file, see if increasing the limits makes it found some other pattern.
Issue
I think the user is trying to play the file on a tv, blu-ray player or anything that plays, let’s say, "standard" AVC files. In order to play the files, change the file’s profile UP TO LEVEL 4.1, because LEVEL 4.2 is NOT supported on such players. If the file is still unplayable, remux it using any version UP TO v3xx of mkvmerge, you mention your file is muxed by "Writing application : mkvmerge v5.2.1 ('A Far Off Place') built on Jan 2 2012 23:21:10" That version of mkvmerge makes the file unplayable due to the header stripping problem and not because of the level of the file. Please reply if you’ve resolved the issue
Thanks for your detailed
Thanks for your detailed help.
Itunes /Ipad2 high profile
Hi!
First of all want to say congrats! you made a beautiful peace of software.
I was able to change the levels of the profile AVC/H264 perfectly-. I'm just having trouble with Itunes and Ipad2. The thing is that itunes don't allow copy of video files with High profile it only allows Main profiles. Do you know a way to change the profile (no level) from High to Main Without econde again?
I have a movie like this:
1050 kbps, 1280*688 at 23.976 fps, AVC (High@L3.1) (cabac / 6 Ref Frames)
The level editor can change the "level" but no the "high" stream.
Excelent soft Mate!!!
Changing profile is a
Changing profile is a completely different thing.
I mean changing the profile could be done the same way we do for level (it's only a byte), but after changing it most of the time the file becomes unplayable.
Maybe because decoders find unexpected data blocks or miss expected ones.
First versions of H264LevelEditor had this feature; after a lot of issues I removed it.
You could try with other remuxing tools...
Thanks for the
Thanks for the reply!
Solved! The problem wasn't the profile on the video it was the audio (ac3 instead acc).
With the release of the "new Ipad" apple now allow high and main profiles with 3.1, 4.0, 4.1, 5.5 levels. Because the new Retina display and movies 1080p.
You should look here: https://discussions.apple.com/thread/2391597?start=15&tstart=0
Thanks again!
In that case I recommend you
In that case I recommend you to reencode the audio stream only by using xmedia recode. Just copy the video stream and then recode the audio to aac.
GREAT SOFTWARE !!!
Hello, I can tell you that your software is great and really worked for me. I have an Android phone Samsung Galaxy Plus ( Adreno 205 GPU ) that can not play 720p mkv files with h264 level equal and higher than 4 with hardware decoding (with software no problem but very slow), so I changed some files to level 3 with your software and now hardware decoding works !! But after changing the level in some mkv files your software tells me that the level has been changed from 4 to 3 although when I check with mediainfo software in Windows it tells me that the level still at 4. When I now try to play this "new" file, Android crashes... some idea why it can not fully change the mkv file to level 3 ?
By the way, if you could integrate a batch function (being able to select and patch more than 1 file at the time) would be really helpful.
Thanks !!
Martin
Thanks for your feedback. >
Thanks for your feedback.
> when I check with mediainfo software in Windows it tells me that the level still at 4
Try to increase the pattern count limit from 2 (the default value) to 3 or more.
Beware that higher values could lead to more possible "false positives".
Thanks for your fast answer.
Thanks for your fast answer. I tested increasing the pattern count limit up to 10 but Mediainfo still shows the original 4.1 level hasn´t changed.... anyway luckily that problem is not very often
Another option
I suppose you also tried to increase the bytes limit too, did you?
Default limit is 1MB, but you could also try to increase it...
Yes, I have increased this
Yes, I have increased this value up to 10MB and after patching the file, Mediainfo would not show any level anymore and the file becomes unreadable, so I patched it back with the backup and restored the original file.
Sample needed
I'd like to take a look to a sample file to see if (maybe) there's something wrong.
Could you take a small sample out of one of these "unpatchable" files (maybe using mkvtoolnix tools)?
Try to extract a 5-10MB sample file and check that H264LevelEditor doesn't work on this sample too.
Then send me a private message through the contact form and I'll get back to you through email.
No level change issue
I faced the same problem. This happens when either the container or the encoding are very old. I suggest you to remux the file using v3xx of mkvmerge, then change the profile. If the level failed to change, the encoding is the issue. In that case, you should change the level using another tool. I should let you notice that many files that I changed to level 4.1 never changed in the mediainfo analisis, remaining high L5.1 but they are PLAYABLE on a Sony Blu-Ray Player). Maybe you are changing the level to a very low level, remember that the level has to do with the resolution of the file, for example high L3.0 is mostly used for SD, L4.1 for HD, so if you, for example, change an HD file to level 2.1 or even main or baseline profiles, the file will be corrupted because of the level. You mentioned that your file became totally unplayable, for me that is proof of the issue described. Besides, depending on the resolution, some levels cannot be used. In other words, you cannot use level 3.0 on 1080p and even 720p encodings. See this for details.
http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels