View Full Version : Commandline Reference (JM) H.264/AVC Encoder - AVS input, RAW/AVI output
KpeX
26th November 2003, 03:13
http://www.hydrogenaudio.org/index.php?showtopic=15724&
http://pessoal.onda.com.br/rjamorim/lencod_jm73special.zip
Just spotted this on HA, looks interesting. Doesn't look like there are any good decoding options ATM. Haven't had time to try it myself yet.
bond
26th November 2003, 09:39
hm it still outputs avi, i hope that there isnt too much hackery going on to put h.264 into avi :(
and also bad that there doesnt seem to be any decoder available except mplayer, or does someone know one?
slavickas
26th November 2003, 10:19
Originally posted by bond
hm it still outputs avi, i hope that there isnt too much hackery going on to put h.264 into avi :(
and also bad that there doesnt seem to be any decoder available except mplayer, or does someone know one?
ast least supplied encoder.cfg file won't define use of b frames, so where problems?
Tommy Carrot
26th November 2003, 13:50
What's the benefit of this encoder compared to hdot264? As i can see, both are doing the same, but hdot264 is easier to use.
EDIT: i mean hdot264 ofcourse. :)
bond
26th November 2003, 13:54
h.264 is an overall encoding technology (like mp3, aac)
hdot264 and this encoder are implementations of this technic (like xvid, divx5 for "normal" mpeg-4) but at the very beginning (more proof of concept than for regular use atm)
Tommy Carrot
26th November 2003, 14:05
Thank you, but i know what is h.264. :)
I'm just curious if this encoder has some additional optimization to JM73, or it is a hack on the ref. software just like hdot264. Because if it is, i'm staying with hdot264, because it has better interface. :D
The Belgain
26th November 2003, 15:19
If h.264 is now part of FFMPEG libavcodec, are there any plans for it to be included in ffdshow? This would be quite helpful...
bond
26th November 2003, 15:34
JohnV already contacted milan about that and he said he will have a look at it (he had problems with supporting hdot264 for some reason thats why it isnt here already)
symonjfox
27th November 2003, 20:37
A nice suggestion to all H.264 technology and implementations: stop using AVI container. Just try to contact mp4ip members or matroska developers and please create encoders that natively support at least one of them.
It's just a suggestion, but nowadays AVI has so many troubles and limits that IMHO it's better use anything else.
For example: I suppose that H.264 will have BFrames, Aspect Ratio and other stuff, you will have the same problems and hacks to do like DivX and Xvid staff to make it work in AVI.
Tommy Carrot
27th November 2003, 21:19
Perhaps AVI support would limit some of the capatibilities of the codec, but still this is the only way to ensure the wide support. A specialized encoder couldn't give a lot of option we are accustomed for(see Windows Media Encoder for example).
Selur
27th November 2003, 22:31
If one could use the codec through Graphedit one could safe the file as .mp4 via the 3ivx media muxer,.. ;)
Cu Selur
bond
27th November 2003, 22:38
afaik no mp4 muxer supports h.264 input atm :(
symonjfox
28th November 2003, 22:29
Originally posted by Tommy Carrot
Perhaps AVI support would limit some of the capatibilities of the codec, but still this is the only way to ensure the wide support. A specialized encoder couldn't give a lot of option we are accustomed for(see Windows Media Encoder for example). maybe you're right, but why MPEG1 or 2 just works using MPG container (at least VOB if DVD authoring)?
Or just let it save as elementary stream M4V so everybody can mux it into what they want.
Sirber
1st December 2003, 16:07
How can I playback a H264 AVI? :confused:
Latexxx
1st December 2003, 16:21
Use Mplayer (http://www.mplayerhq.hu). There are Windows binaries lying somewhere in their ftp-server. The future versions of ffdshow are going to support it also according to JohnV @ Hydrogenaudio
Edit: http://www.mplayerhq.hu/MPlayer/releases/win32-beta/mplayer-wingui-preview.zip
Sirber
1st December 2003, 19:12
Nice :D
I plan to add it to Surreal UI. I checked encoder.cfg and it seems Quant only, no rate control. Is it true?
Latexxx
1st December 2003, 21:23
Originally posted by Sirber
Nice :D
I plan to add it to Surreal UI. I checked encoder.cfg and it seems Quant only, no rate control. Is it true?
Currently it suports only encoding at constant quntizer. The quality is quite impressive but the Mplayer's decoding function limit the decoding quality while Mplayer doesn't support in-loop filtering which gives good results with a good decoder.(At least I've heard so)
Ps. I've heard lot of your Surreal UI but I haven't seen even one simple download link anywhere. Where can I get that? Or is it still in some prvate beta stage?
Sirber
1st December 2003, 22:18
SUI is still in dev. I haven't finished implementing D2V spport. I'll have more time in 2½ weeks, when school finish. What will be cool is that it will be the first GUI supporting RV9 and common VFW codecs :D
d'Oursse
2nd December 2003, 09:10
@sirber : with ffmpeg. libavcodec decode h264 streams
dillee1
2nd December 2003, 11:33
As far as I know H264 has proposed a new media container call AVC(ya, same name as the profile). H264 do supports mp4 container, but official one is AVC.
No one have even started to implement AVC. If you are using h264 now it gonna be be using unofficial conatiner anyway....
Stux
2nd December 2003, 15:25
Originally posted by dillee1
As far as I know H264 has proposed a new media container call AVC(ya, same name as the profile). H264 do supports mp4 container, but official one is AVC.
No one have even started to implement AVC. If you are using h264 now it gonna be be using unofficial conatiner anyway....
My understanding (and I've got the specs ;)) is that the AVC file format is simply an extension to the MP4 file format.
The specs also call for the .mp4 file extension
FastMike
5th December 2003, 05:25
I read somewhere that at least a couple solutions for encapsulating H.264 in MPEG-2 Transport Streams (.ts). Why couldn't people just use that?
Here's a news link for Modulus video
http://biz.yahoo.com/prnews/030924/law048_1.html
shlezman
5th December 2003, 17:24
H.264(ITU) aka AVC/MPEG4-Part 10 (ISO) has two official containers :
1. MPEG2 Transport
2. MP4 container
.avc is probably just raw bitstream.
bobololo
5th December 2003, 20:32
Originally posted by shlezman
H.264(ITU) aka AVC/MPEG4-Part 10 (ISO) has two official containers :
1. MPEG2 Transport
2. MP4 container
.avc is probably just raw bitstream.
.avc is iso mpeg-4 file format (.mp4) extended with "box" (actually atoms) required to exploit h.264/avc features.
.264 is raw bitstream.
-- bobololo.
dillee1
15th December 2003, 14:46
Originally posted by Stux
My understanding (and I've got the specs ;)) is that the AVC file format is simply an extension to the MP4 file format.
The specs also call for the .mp4 file extension
I have a copy of the h.264 final spec from ITU as well.
However is there any difference between the ITU spec and
ISO spec?
I can't get a hold on the ISO spec as the price tag is prohibitive.
(26000 swiss franc.. wtf)
FastMike
16th December 2003, 02:49
Originally posted by dillee1
I have a copy of the h.264 final spec from ITU as well.
However is there any difference between the ITU spec and
ISO spec?
I can't get a hold on the ISO spec as the price tag is prohibitive.
(26000 swiss franc.. wtf)
I don't see why the two standards would be different, e.g. MPEG-2 = H.262.
bond
10th April 2004, 13:18
ok i now retested this JM73 (reference h.264 encoder version 7.3) on a small clip (its fun watching how slow it is :D )
get the result here (http://8ung.at/bond/test.zip)
the file also contains the same clip encoded with mainconcept h.264 (main profile + default settings), and xvid (with i think the best settings) as a mpeg-4 asp reference
all clips are @ 460kbps
Originally posted by slavickas
at least supplied encoder.cfg file won't define use of b frames, so where problems?nope, the reference encoder supports b-frames, theoretically, as it is buggy in this avs/avi version :(
but i heard that the author will probably fix this in the sources and will upgrade them to the current reference encoder 7.6 too :)
Originally posted by Sirber
How can I playback a H264 AVI?now that vss released a decoder filter its possible to decode the output avi files with it in dshow, if you change the 4cc to VSSH
bond
13th April 2004, 11:34
there now is a new avs/avi mod available, which is using JM76 (not 73 as the last one)
grap it here (http://pessoal.onda.com.br/rjamorim/lencodjm76-avi.zip) (icl compile (http://pessoal.onda.com.br/rjamorim/lencodjm76-avi_ICL.zip)) kindly hosted by rjamorim
note that the b-frames are still buggy in this mod (afaik the author still tries fixing this)!
but you can already test the new ratecontrol coming with jm76 :)
as its the reference encoder it offers a lot of features h.264 has already (maybe not with the best quality possible tough) and its damn slow
still it already brings great quality as you can see in the sample i posted 1 thread above and its nice to test out the h.264 features
lithoc
15th April 2004, 19:04
Here's jm80 from Roberto
http://www.hydrogenaudio.org/index.php?showtopic=20746&hl=
Mango Madness
16th April 2004, 06:42
gui please? :)
bond
16th April 2004, 08:39
Originally posted by Mango Madness
gui please? :) a gui would be very complicated the reference encoder offers a wohle bunch of options (you have to change the settings manually in the encoder.cfg)
btw the b-frames are still buggy it seems :(
billou2k
5th May 2004, 18:05
I've tried the modified version from roberto that handles avs as input and avi as output, but unfortunately it stops encoding after 2 or 3 frames where the file is 10 seconds long.
I've tried with the same file (converted in raw yuv) with the original version of the reference code and it worked ok for the 10seconds..
Anybody got that problem too?
By the way do you know if the sources of the roberto's modified version are available somewhere?
Tommy Carrot
5th May 2004, 18:41
You have to set the number of frames manually with the following commands:
FramesToBeEncoded =
LastFrameNumber =
Or alternatively you can try the h.264 encoder in the latest ffdshow build. It's infinitely faster and easier to use (although it has worse quality).
billou2k
5th May 2004, 19:43
I first only set the FramesToBeEncoded parameter but even setting LastFrameNumber doesnt change anything...
A weird error message appears after the first 2 or 3 frames encoded depending on the settings used : "No frames for output available"..
P0l1m0rph1c
5th May 2004, 19:49
Could you send that avi & avs to dcoder@alexandria.cc ?
And, what version of the JM were you using? JM80?
Regards
bond
28th July 2004, 20:46
rjamorim posted builds of the latest version of the h.264 reference encoder (jm 8.3) on hydrogenaudio (http://www.hydrogenaudio.org/forums/index.php?showtopic=19554&hl=), able to handle .avs input and .264/.avi output
grap them here:
http://pessoal.onda.com.br/rjamorim/lencod_jm83-264.rar
http://pessoal.onda.com.br/rjamorim/lencod_jm83-avi.rar
b-frames seem to be still buggy
Tommy Carrot
28th July 2004, 21:36
Originally posted by bond
b-frames seem to be still buggy
But it finally got some kind of motion estimation, which at the cost of a minimal quality loss nearly doubles the speed (still much slower than x264 though).
Btw, could someone enlighten me, what is weighted prediction? How is it different from 'normal' prediction, and what are the advantages/disadvantages of it?
Audionut
28th July 2004, 21:39
A little help would be greatly appreciated.
I edit the encoder.cfg file as best I can.
At the command prompt I type "lencod" without the quotes.
It parses the config file, says it's opening the file as I specified.
Under "output H.264 bitstream" there is nothing.
Output log and stat file seem fine.
Then it says, "Fatal: cannont open file ' ', exit (1)
edit: it helps when you take the # away from in front of the output file location.:(
Holy crap it's slow.
bobololo
29th July 2004, 00:23
Originally posted by Tommy Carrot
But it finally got some kind of motion estimation, which at the cost of a minimal quality loss nearly doubles the speed (still much slower than x264 though).
Btw, could someone enlighten me, what is weighted prediction? How is it different from 'normal' prediction, and what are the advantages/disadvantages of it?
The weighted prediction allows a reference picture used for temporal prediction to be linearly scaled :
pw = weight * p + offset
where 'pw' is the weighted predictor, 'p' the original predictor, 'weight' and 'offset' are arbitrary constant transmitted for a whole picture (actually for a slice).
This is very useful for coding fades for instance.
-- bobololo
Tommy Carrot
29th July 2004, 01:55
Thanks for the clarification. :)
virus
29th July 2004, 11:58
Originally posted by bobololo
The weighted prediction allows a reference picture used for temporal prediction to be linearly scaled
Nice feature. But can you detect a fade easily when you do motion estimation? Or maybe the cost of searching for it outweights the benefits?
bond
29th July 2004, 16:08
guys beaware, according to the developer of the reference software, the 8.3 version seems to be buggy, 8.4 is out now
JM 8.3 contained an encoder bug that produces mismatches for picture adaptive frame/field coding. Along with a fix for that problem the new version contains a number of decoder bug-fixes. See below for a detailed list.
Changes for Version JM 8.4 to JM 8.3
------------------------------------
- encoder: fix encoder merge bug (AT)
- encoder: count parameter set bits (AT)
- decoder: spatial direct long-term support (KS)
- decoder: fix colocation problem (KS)
- decoder: fix SPS/PPS changes (KS)
- decoder: fix reordering with multiple slices (KS)
- decoder: allow paired output of unpaired fields (KS)
- decoder: fix POC on MMCO=5 (KS)
- decoder: fix picture unmarking problem (KS)
- decoder: SPS activation on buffering SEI (KS)
- decoder: weighted prediction typo (AT)
- decoder: fix CeilLog2 function (KS)
P0l1m0rph1c
30th July 2004, 08:05
While Roberto doesn't come (he'll be back monday), updated builds can be found here (http://dc0der.is-a-geek.org/lencod_jm84-avi.rar) and here (http://dc0der.is-a-geek.org/lencod_jm84-264.rar).
By the way, i noticed that b-frames can be played correctly using hdot264 to play the AVI's. Pretty slow, though.
juGGaKNot
17th July 2009, 21:50
Any new 16.0 builds ? from what i've read it suports 4:4:4.
G_M_C
17th July 2009, 22:41
Yes it does apparently. I've found no build though. Sorry.
Quote the complete changelog since v.13.0.
Changes in Version JM 16.0 (since JM 15.1)
------------------------------------------
- encoder: Early termination in various distortion computation functions (AT)
- encoder/decoder: Various speed optimizations/restructuring/cleanups (AT)
- encoder/decoder: removal of almost all global variables (AT)
- encoder/decoder: Severe restructuring and merging of Various encoder and decoder functions in lcommon (AT)
- decoder: Deblocking bug fix in the presence of errors (TB/AT)
- encoder: Rate Control Improvements/Reentrancy (AL)
- encoder: RDOQ/Mode decision bug fixes (YY)
- encoder: Motion Estimation/Mode decision bug fixes (YHe)
- encoder: Motion Estimation reorganization/cleanups (AT)
- encoder/decoder: doxygen cleanups (YHe/AT)
- encoder/decoder: add workspaces for Visual Studio 2009 (Windows) and Xcode (MacOS)
Changes in Version JM 15.1 (since JM 15.0)
------------------------------------------
- encoder/decoder: Redundant picture bug fixes (KS)
- encoder: fix config limit type for IntraProfile (KS, bug id #153)
- decoder: fix copy and paste bug in pps_is_equal() (KS, bug id #157)
- decoder: cleanups to intra prediction functions (AT)
- decoder: 4:4:4 bug fix (AT)
- encoder/decoder: Various bug fixes/cleanups (AT/KS)
Changes in Version JM 15.0 (since JM 14.2)
------------------------------------------
- encoder: Various bug fixes relating to MBAFF and High 444P profile (EM)
- encoder: Adaptive Rounding reorganization and bug fixes(EM)
- encoder: Motion Estimation reorganization (AT)
- encoder: Various bugfixes related to 8x8 transform and submacroblock partitions (AT)
- encoder: Extension to support VLC codes > 32 bits (AL)
- encoder: RC bug fixes (ASe)
- encoder: SEI/AU support & cleanups (AL)
- encoder: Various bug fixes and cleanups, including bipred ME (AT)
- encoder: Weighted Prediction offset computation using Motion Compensation (PC, MK, YY)
- encoder: support of explicit sequence information functionality (AT/KS)
- encoder: support of separate & interleaved raw video files (AT)
- encoder: don't allow GenerateMultiplePPS in baseline profile (KS)
- encoder: encoder support of some ANNEX A level limits (AT/KS)
- encoder/decoder: Lossless encoding bug fixes (AT)
- encoder/decoder: memory alloc/free speedups (AT)
- encoder/decoder: VLC speedups (JaB/AT)
- encoder/decoder: don't access uninitialized memory in cabac.c (PL/KS)
- encoder/decoder: various cleanups and bug fixes (KS/AT)
- decoder: Support for 64 bit bitstream I/O (AT/KS)
- decoder: Severe code reorganization and various bug fixes, some relating to High 444P (AT)
Changes in Version JM 14.2 (since JM 14.1)
------------------------------------------
- encoder: fix cabac_zero_word calculation (KS)
- encoder: bipredictive ME bug fixes (EM/AT)
- encoder: MBAFF qp bug fix (AT)
- encoder: Statistics collection rewrite (AT)
- encoder: RDOQ CAVLC support & improvements (PC/YY/MK/LL/AT)
- encoder: fix range of DFDisable* parameters (KS)
- decoder: Fix copy and paste error in sei.c (KS)
- decoder: Fix syntax of full frame freeze SEI message (KS)
- encoder/decoder: convert time measurement system calls to be more consistent and don't use "obsolete" functions (KS)
Changes in Version JM 14.1 (since JM 14.0)
------------------------------------------
- encoder: fixes in lossless coding (KHH)
- encoder: Improved MC precision using Reordering & Weighed Prediction (AL, AT)
- encoder: Weighted Prediction Extensions (AT, AL)
- encoder: MS-SSIM distortion computation (PeP)
- encoder: Rewrite of Error Resilient RDO (PeP/AT)
- encoder: SSIM distortion computation (ZHL/WK/AT)
- encoder: RGB color space distortion computation (WK/AT)
- encoder: Distortion/Statistics functionality cleanups (AT/WK)
- encoder: RDOQ and Quantization cleanups (LL/AT)
- encoder: RC cleanups (AT)
- encoder: Adaptive Rounding Support for Low Complexity RDO (EM)
- encoder: Multipass RD coding bug fix for PicAFF (AL)
- decoder: Motion vector limit checking (LlL)
- encoder/decoder: Various code optimizations (AT)
- encoder/decoder: Various cleanups /reorganizations (AT)
- decoder: SP/SI slice decoder fixes (AT)
- encoder: fix 4:0:0 encoder bit depth initialization (KS)
- encoder: use SPS id parameter in GenerateSequenceParameterSet (KS)
- encoder: fix number of bits calculation for pic aff with slices/DP (CS)
Changes in Version JM 14.0 (since JM 13.2)
------------------------------------------
- encoder: Bipredictive ME bug fixes (AT)
- encoder: Intra mode decision reorganization (LL/AT)
- encoder: Quantization/transform process reorganization (AT)
- encoder: Trellis based quantization (VCEG-AH21) (PC/YY/MK/LL/AT)
- encoder: WP Cleanups (AT)
- encoder: Lossless Coding Cleanups / Bug fixes (AT)
- encoder: Profile/Level Conformance code cleanups (AT)
- encoder: fix trace file for data partitioning (KS)
- encoder: fix encoding for picture aff (KS)
- encoder: fix memory allocations with num_ref_frames=0 (KS)
- encoder: fix rate control config error message (AL)
- encoder: fix 4:2:2 chroma transform (KS)
- encoder: fix 4:2:2 chroma scaling matrices (SSe)
- encoder: improve profile restrictions (KS)
- decoder: fix 4:2:2 decoding (SWi)
- decoder: allow intra-only deblocking filter configuration in decoder.cfg (KS)
- decoder: add quantizer initialization for data partitioning (PL)
- encoder/decoder: memory assignment reorganization (AT)
- encoder/decoder: deblocking cleanups (AT)
Changes in Version JM 13.2 (since JM 13.1)
------------------------------------------
- encoder: 4:4:4 chroma mismatch fix (4x4 intra) (KS)
- encoder: 4:2:2 chroma mismatch fix (THi)
- encoder: fixes for negative QP (AT)
- encoder: fix trace file and average qp calculation for slices with fixed byte size (AL)
- encoder/decoder: various 4:4:4 fixes (HY)
- decoder: fix temporal direct mode (KS)
- decoder: implement I_PCM for more than 8bpp (KS)
Changes in Version JM 13.1 (since JM 13.0)
------------------------------------------
- encoder: 4:4:4 performance fix (4x4 intra) (KS)
- encoder: always use ChromaMEEnable for 4:4:4 common mode (KS)
- encoder: 4:2:2 transform fix (AT)
- decoder: fix slice_group_id allocation (KS)
- encoder/decoder: fix inline functions for compilers without c99 support (KS)
- encoder/decoder: makefile updates (LW/KS)
- encoder/decoder: 4:0:0 fixes (KS)
- encoder/decoder: further cleanups (AT/KS)
Changes in Version JM 13.0 (since JM 12.4)
------------------------------------------
Professional Profiles:
- encoder/decoder: 4:4:4 combined color coding mode
- encoder/decoder: lossless coding
- encoder/decoder: remove MS Visual Studio 6 workspaces (KS)
- encoder/decoder: various optimizations (AT/AL)
- encoder/decoder: fix mbuffer.c copy and paste error (KS)
- decoder: allow loss of single partitions (DA/KS)
Note: some loss pattern will require usage of RTP file.
- decoder: indicate wrong emulation prevention (ZH)
- decoder: make memory allocation for slice_group_id dynamic (KS)
- add simple tool for pseudo-random RTP packet loss (KS)
juGGaKNot
18th July 2009, 23:00
Yes it does apparently. I've found no build though. Sorry.
Quote the complete changelog since v.13.0.
And how can one make a build ?
drmpeg
19th July 2009, 07:56
Here's a build with VC2003.
http://www.w6rz.net/jm16_0_build.zip
Ron
juGGaKNot
19th July 2009, 11:03
Here's a build with VC2003.
http://www.w6rz.net/jm16_0_build.zip
Ron
thnx.
G_M_C
20th July 2009, 09:12
thnx.
Do you know a guide on how to use this encoder ?
I want to test if i can make a fully BD compliant stream with this (including slices etc.), and test if it makes any difference with muxing/playback etc.
Dark Shikari
20th July 2009, 09:40
Do you know a guide on how to use this encoder ?
I want to test if i can make a fully BD compliant stream with this (including slices etc.), and test if it makes any difference with muxing/playback etc.I assume so; it'll only take about 3 years to encode one Blu-ray movie (yes, I did the math).
juGGaKNot
20th July 2009, 10:16
Do you know a guide on how to use this encoder ?
I want to test if i can make a fully BD compliant stream with this (including slices etc.), and test if it makes any difference with muxing/playback etc.
-h
and it sux
working on it ....
G_M_C
20th July 2009, 12:08
I assume so; it'll only take about 3 years to encode one Blu-ray movie (yes, I did the math).
Better get some (cases of) beer then, than i'll have something usefull to do :D
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.