H264/AVC Level Editor

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!

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, and comes in two flavours:

  • Graphical (GUI):
    Use it if you need to edit a single or few files.
  • Command line (CLI):
    It has the same features of the graphical version and can also work on multiple files.
    You could also include it into your custom conversion scripts.

Quick intro

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: H264LevelEditor does not change 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 (graphical version)

Using H264LevelEditor is easy as 1-2-3:

  1. select the video file to edit by pressing then tree-dots button, or drag&drop the file directly from Windows Explorer
  2. H264LevelEditor will show actual AVC level into the "h264 level" box, choose the new level you want to set
  3. press "Change level" button
  4. click on "Donate" button (well, this is obviously optional ;) )

User BlackMIIX published a good video tutorial here, take a look.

Usage help (command line version)

Command line version can be used to edit a single file or a group of files in a shot.
Can also be called by .bat or .vbs custom scripts.

This will change level of file C:\MyFiles\test.avi to 4.1:

> H264LevelEditorCli.exe --action change --input "C:\MyFiles\test.avi" --new-level 4.1

This will change level of all file*.avi files into folder C:\MyFiles (file001.avi, file002.avi, fileabc.avi, ...) to 4.1:

> H264LevelEditorCli.exe --action change --input "C:\MyFiles\file*.avi" --new-level 4.1

See the included file H264LevelEditorCli.txt for more options, samples and exit codes.

Version history 

v.1.5.3 - 2017-04-28

  • FIX: CLI parameter "--new-level" is not required if action is "restore".

v.1.5.2 - 2014-07-17

  • NEW: Added *.avc to the list of supported file extensions.

v.1.5.1 - 2014-04-22

  • NEW: Initial support for Mono Framework. The application should now run on Linux and Mac OSX through the Mono framework.

v.1.5.0 - 2014-01-29

  • NEW: Added an option to preserve last modified date of the file being patched. The option is available in both GUI and CLI versions.
  • FIX: Runtime error when closing the GUI while search is running.

v.1.4.0 - 2013-08-29

  • NEW: Command line version of H264LevelEditor is now available (H264LevelEditorCli.exe).
    It has the same patching engine of the GUI version and can also work on multiple files.

v.1.3.0 - 2013-08-16

  • NEW: Search task now runs in a separate thread.
    This will keep the UI alive during long searches.
  • FIX: Readonly files caused a runtime error when pressing the "change level" button.
    This state is now detected and user is asked to clear the flag before level change starts (thanks to Biomech for the suggestion).

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:
    http://coolsoft.altervista.org/comment/363#comment-363

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
 

Download

H264LevelEditor it's a portable software (single EXE), no need to install it.

WARNING: .NET Framework 2.0 or newer is required: 2.0 (x86) - 2.0 (x64) - 4.0 (client profile)
(Windows Vista comes with .NET Framework 3.0 preinstalled, Windows 7 comes with .NET Framework 3.5 preinstalled.)

H264LevelEditor_1.5.3.zip
Description Latest version, includes both GUI and CLI
Release date 2017-Apr-28 Size 256,566 bytes
MD5 3ae92b7b79df9a3acbff8bdcb699bb5b
SHA1 ac5af720ee64b0babf1ec44af4272dbf5d26c8e4
SHA256 a087600d0265da5481c3e480542e8f05eb06b1dfcf284921cdd7a79424ae4797
Open virus check report
H264LevelEditor_1.5.2.zip
Description Previous version
Release date 2014-Jul-17 Size 264,834 bytes
MD5 d9998f523f0ee21de338da472f8610a1
SHA1 1d4b0fa4cfa48195b61a8d0ce248b1ef85c1fe02
SHA256 32fbf98a6f7811c3a42a9aa25237f9fd272acc04c484089ec6e39b3f800d267f
Open virus check report

Comments

Pages

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

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 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.

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.

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

With this method also you can change a H264 level without any quality loss.

Dowload FFMEG for Windows x86/x64

Unzip it using 7z .

Open CMD (Start --> Run --> Type "cmd")

type

ffmpeg -i "INPUT_FILE"  -vcodec copy -acodec copy -scodec copy -vbsf h264_changesps=level=41 -y "OUTPUT_FILE"

NOTE:

  • INPUT_FILE =  File path + File name with + Extention (Ex :- "M:\Cant PLAY TV\Green Arrow 2011.mkv" )
  • OUTPUT_FILE File path + File name with + Extention (Ex:- "M:\Cant PLAY TV\Green Arrow 2011_L4.1.mkv" )

this will Transcode the File with changing Level to 4.1 

Thanks for your comment, really appreciated.

BTW, this recoding is not done "in place" and requires double the space of the original file; it also require some times to complete because the whole file must be processed.
I suggest to create the output file on a different phisical disk than the source one to speed up the process.
 

You're absoloutely right, this need double space, but I hope if there is no else solution u can use this.

And previous FFmpeg is Undone and wont work "-vbsf h264_changesps=level=41" command, but this FFmpeg Patched Version works fine.

CoolSoft note: I edited your previous link, so now they're the same, thanks.

Greetings from Chile. Great progam! and thanks ! :D

First of all I would like to thank you for your tool. I have recently bought a Samsung UE46ES6340 TV and I have realized that it is not able to play movies with Level 5.0 or more.  I have tried your tool with a few movies and it worked. It has changed the Level at media info and the movie played at my TV too. Unforunately it does not change the level at many other movies. It says that the procedure is done but the movie does not play at my TV and doesnot show changed level at Media info.Is there something like a restriction that does not allow your tool to change the level at some movies?

For example I am giving you details from a movie which was not changed:  

General
Unique ID                                : 196976634551695172348006774646753889501 (0x943051E3D66116A89DE99F646BAE8CDD)
Complete name                            : C:\Users\Tsiartas\Desktop\AllShare\BasiliasTwnLiontariwn3D_GreekAC3_Repack_Dolby22\xxxxxxxxxxxxx.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 7.71 GiB
Duration                                 : 1h 28mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 12.4 Mbps
Movie name                               : Encoded by Dolby22
Encoded date                             : UTC 2011-09-22 16:05:05
Writing application                      : mkvmerge v4.9.1 ('Ich will') built on Jul 11 2011 23:53:15
Writing library                          : libebml v1.2.1 + libmatroska v1.1.1
 
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Muxing mode                              : Header stripping
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1h 28mn
Bit rate mode                            : Variable
Bit rate                                 : 11.7 Mbps
Maximum bit rate                         : 18.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.236
Stream size                              : 7.28 GiB (94%)
Title                                    : by Dolby22
Default                                  : No
Forced                                   : No
 
Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : Header stripping
Codec ID                                 : A_AC3
Duration                                 : 1h 28mn
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 285 MiB (4%)
Title                                    : by Dolby22 - teamHD
Language                                 : Greek
Default                                  : Yes
Forced                                   : No

 

Click the Options button and increase the pattern count limit from 2 (the default value) to 3 or more.
You can also try to increase bytes limit from the default 1MB to 10 in 1MB steps.

Remember that H264LevelEditor does not reencode the stream anyway, it only does search&replace against it to fool H264 players.
So beware that higher values could lead to more possible "false positives".

The problem again is not the tool’s fault, LED TVs are unable to play movies muxed by recent versions of mkvmerge, if you noticed, This is your real problem:

Format settings, ReFrames : 2 frames
Muxing mode : Header stripping (this is the problem)
Codec ID : V_MPEG4/ISO/AVC

That Header stripping issue is still bothering Blu-ray users like me, so in past posts you can answer yourself this question.

Once again download And old version of mkvmerge (up to 3.0.0) 

http://www.videohelp.com/tools/MKVtoolnix/old-versions or this link http://www.bunkus.org/videotools/mkvtoolnix/win32/mkvtoolnix-unicode-3.0...

You should remux the movie (You are nor Re encoding It) Remuxing means you will be turn to and old mkv container that IS able to play on your devide.
Then come replying if your problem solved.
As I think, that is the problem and not the change of level. (Try changing the level after remuxing, or get more help at Videohelp)

Thanks for your reply. I have remuxed it with mkvmerge 3.0.0 and the result is:

General
Unique ID                                : 185592159120714706726016766620487310715 (0x8B9FBFEA558FC5F1BD9ED7D13F12DD7B)
Complete name                            : C:\Users\Tsiartas\Desktop\AllShare\xxxxxx.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 6.73 GiB
Duration                                 : 1h 17mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 12.5 Mbps
Movie name                               : Encoded by Dolby22 - www.greekstars.co
Encoded date                             : UTC 2012-10-15 15:36:44
Writing application                      : mkvmerge v3.0.0 ('Hang up your Hang-Ups') built on Dec 12 2009 15:20:35
Writing library                          : libebml v0.7.9 + libmatroska v0.8.1
 
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1h 17mn
Bit rate mode                            : Variable
Bit rate                                 : 11.8 Mbps
Maximum bit rate                         : 18.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.236
Stream size                              : 6.36 GiB (94%)
Title                                    : by Dolby22 - www.greekstars.co
Default                                  : No
Forced                                   : No
 
Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 1h 17mn
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 248 MiB (4%)
Title                                    : by Dolby22 - teamHD
Language                                 : Greek
Default                                  : No
Forced                                   : No

Unforunately it cannot be played at my TV and when I try to change the AVC level even though it says success the level is not changed and the movie cannot be played at my TV.

The strangest thing is that older version of LED Samsung TVs of my friends play all the movies without problem.

I was reading on older posts that some Samsung TV’s play files encoded at High@L5 just fine. But here I noticed the level did not change at all. Did you change the level after remuxing? Otherwise you can upload a file sample to do it myself. My blu-ray player refuses to play High@L5 files too, but when the tool changes succesfully the level but NOT in the mediainfo analysis, the files amazingly ARE playable. This is a little problem I will discuss with the author, because some people face the same problem: The file changes its profile by using the tool, but not in the mediainfo analysis. I ignored the problem because it did not bother me, but my guess is: Samsung players recognize mediainfo over the tool. In my case, the inverse case is happening. 

Thanks bwings for your help, really appreciated.
I'll take a look at the file in your PM ASAP.

Im afraid I have the same problem that the user above. I can't get the [email protected] mkv file to work in my sony blu-ray BDP S590 no matter what.

I tryied changing the the bytes value up to 100 mb (1, 10, 100); the patterns up to 4 (2,3,4) and even re-enconding the file with tsmuxer 5.6.0 and 3.0.0 (strange is, i've never had problems with this header stripping thing in the updated version).

I've never even reached the point where MediaInfo reads the file as 4.1 (i know it worked for some folks while it was showing 5.1); when i messed with the patterns the media file couldn't even see the AVC level in the file. But in all tests i did i was able to play the file in my PC.

In the Blu-ray, on the other hand, the file would aways crash the system.

Any ideas?

Thank you!

After hours of deep web searching I`ve finally found a software that actully works.

This is for those (like me) who couldnt deceive the player with H264LevelEditor. In other words, ppl that have to do it the hard way.

You can download the program here: http://www.xmedia-recode.de/download.html

cheers

Thanks for your info, I'm sure other users will find it usefull.

Well, the problem is: Sony and other players are very sensitive about levels and even the encoding tool. I can confirm there ARE files that are encoded with handbrake and they won’t play even if they are High@L3. Samsung brand new LED TV’s play ALMOST EVERYTHING, They do not search for levels, and they even play formats such as wma pro. So I sent a file to the programmer and still no answer. Maybe he is working hard to solve the issue (XD).

XmediaRecode of course is an excellent tool. I use it from a long time ago. But by Re-encoding you will lose (almost no) quality even if your eyes won’t notice the loss. The tool changes the level without re-encoding. That’s why some quality lovers (like me) want it. It is very strange for me that your file is still unplayable after using ts muxer.  Normally that fixes the file when the tool fails. (in fact, it can even change the level that the tool refuses to change) but tsmuxer demux your streams, then you should mux them, that’s fine for one file, but when you got several files you will lose some time demuxing and remuxing. So I ask for you ppl to post your mediainfo analysis to at least try to help you to play those files. Or send it to the developers mail to forward it to me. Thanks and, please fix the problem, I am asking for that too!

It worked perfectly, changed a file from 5.1 to 4.1 as reproduction in either a sony blu ray.

Sorry for the English, translated by Google

Is this software tool able to set the frame packing detail?
I'm looking for something that can set the 3D modes without recompressing the stream (nice and quick).  

Regards and Thanks for your website and tools 

No it's not, sorry ;)
And I'm not aware if any exists.

Hi. I found that H264LevelEditor didn't find AVL level pattern in A*****.mp4 file.
I changed the pattern with HexEditor in offsets 562 and 570.

The originals bytes were 0x6E0033.
With this bytes MediaInfo shows High [email protected] as format of the video.

Maybe this info help you to improve your program.

It was very usefull a lot of times.
Thanks!

Thanks for your info.
Actually H264LevelEditor doesn't support High10 level, but it could be easily added.

Could you tell me what you changed those bytes to?
I mean, did you changed 0x33 only (5.1 to something alse) or the whole pattern (High10 to something else too)?

Hi ! I have problem about changing the format profile.

i changed the bytes to 6mb  the mkv file played but after seconds it is stoped and ends

i have try with 2 mkv files

You can try to raise search limit up to 50Mb.

If the file doesn't work... I'm sorry, you need to reencode it.

tanks for Quick Reply !

i will try

 

 

hi again !

i Try with 50mb.

its doesnt work with my samsung LED TV (ES6600M) but is is worked with my samsung Blu-Ray played (3550k).

Thanks For help!

Hello: I downloaded the application 3 times H264 Level editor and I can not abrirla.mi operating system is windows xp professional
with sp3, and I have installed net framework 3 and 3.5. some solution
Thank you. excuse the google automatic translation

Which is the error message you see?

You could also send me a screenshot through the contact form.

Pages