AWS Thinkbox Discussion Forums

poort MPEG4 quality

Hi, MPEG4 encoding is rather poor. I’ve tried increasing encoding quality via the KBitRate for MPEG4 codec, and it didn’t make any difference. (The file size stays exactly the same).

Also, for certain bit rate, Drafts fails completely, saying “RuntimeError: could not open codec”

I am on Linux, Draft beta 10

T.

Would it be possible for you to please send us a copy of your script, along with some image files that reproduce the problem? You can send files to us using our ticket system.

In addition, could you please tell us the exact parameter values that gave you trouble? (Ideally the entire VideoEncoder() line with all of the parameter values.)

fail example: (if I used 10000 instead of 99999, then it will work, but producing really poor/heavily compressed result)

File “/mnt/Z/tools/production/review_tool/versions/farm/review_tool/lib/free_session.py”, line 512, in annotate_and_generate_movie
encoder = Draft.VideoEncoder( movie_out, 24, width, height, 99999, “MPEG4”, trim_audio_path, audio_offset )
RuntimeError: could not open codec

Thanks! I received the images you sent too.

I reproduced the error you reported. It will be fixed in the next build.

I will look into the quality problem. In the meantime, would ‘H264’ work for you as an alternative to ‘MPEG4’?

the compression/quality of H264 is really good (and it works fine for Draft). However, h264 encoded video caches/decompress substantially slower in RV. This is especially true when decompressing the video backwards, this necessary for scrubbing where RV caches both backwards and forward from the current playback point. Mpeg4 is better in this regard, where compression/quality as well as playback cache speed is optimal.

I will use H264 for now, picture quality is higher priority in this case.

Cheers,
T.

Trough my test, i suggest you to use mjpeg compression to read it in rv. So far, i got the best picture quality with this one

Fred

Unfortunately for latest RV 3.12.16 as well as 3.12.14, the movie with encoded H264 doesn’t play. So now I am looking again back at the alternative of MJPEG or MPEG4…

MJEPG is ok, but the quality is still poor in comparison to that of H264 (also larger in file size because it’s not doing any inter-frame compression). The biggest draw back is there seem to be a max quality threshold for the bit per second setting, for example. There is no difference in file size if I set the bit rate at 16000 kbps vs 8000 kbps, any ideas why?

for MJPEG, I also notice the quality is inconsistent throughout the movie, for example, frame 1 is poor, frame 2 is best, then slowly degrades from there on…to poorest quality at the end of the movie. This is very noticeable for green text, which become so muddy it’s illegible.

Also the bits per second seems completely ignored when using MPEG4, has this been fixed?

Cheers,
T.

What platform are you using RV on? (For example, 64-bit Windows or Linux?)

We’re intending to expose a “quality” control as an alternative to the bit rate control to help work around such issues.

I’m not sure; I’ll look into this.

This sounds like a problem on our end, but I think it also indicates that you could improve the quality by increasing the bit rate.

It seems to work for me in Draft Beta 10, at least for bit rates within some range.

No I’ve seen this one before. It’s really frustrating because you have to set it to super-human bit-depths for frame 1 sometimes to “seed” the DCT transforms or something. Increasing bit depth over-all can take really absurd values to fix. Can’t rememeber if I’ve seen it in Draft though.

hi, we are using Linux 64 bit.

MPEG4: Can you suggest some values I can try for the bit rate? from range 4000-8000, there is definitely no change in file size. BEYOND a certain rate, there simply no difference in quality, can you reproduce this? Unfortunately even at the best quality, the result is poor, substantially different comparing to H264. Also, there is color shift from the first frame to the rest of the movie.

I will email the package with all my sample data to thinkbox support

I’ve installed beta 10 a while ago, is there a command which can query the exact version?

Thanks!

Yes, I can reproduce this.

Unfortunately not. I suspect we’re using FFmpeg’s rate control incorrectly. However I have gotten what I consider good results by specifying the quality instead of the bit rate. Quality controls should be included in the next Draft release.

It should print the version to stdout when you “import Draft”. You can also get the version as a string using the function: Draft.LibraryInfo.Version() For the latest beta, this should return “0.10.0.47171”.

I tested this in RV 3.12.17 on Linux and it seems to work without crashing. Unfortunately I don’t have any earlier versions around, so I’m not sure if this is a new fix.

Hi just wondering if there any progress on this (Poor mpeg4 quality), or indeed if there if you can reproduce the problem I am having?

Cheers,
T.

Yes, could you please try the latest Draft Beta 12 build, and set quality=100?

For example: enc = Draft.VideoEncoder( movie_out, 24, width, height, quality=100, codec="MPEG4", audioFilename=trim_audio_path, audioDelay=audio_offset ) (Please note that currently you must pass the codec, audioFilename, and audioDelay parameters by name if you set the quality.)

I remove this note because i didn’t see the previous one… will test first.
output.zip (852 KB)

ok I’ve tested and when I set the quality to 100 seems to work fine now. Thanks! That helps a lot.

I have new issue though. For tiff, when I render the movie, the frames get this strange artifact where various portion of the image is dimmed.

See the attached movie.

Cheers,
T.

Could you please send us some TIFF files that reproduce the problem? You can send us files using our ticket system.

Privacy | Site terms | Cookie preferences