Results 1 to 12 of 12

Thread: Is there an .MP4 optimizer ?

  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    885
    Thanks
    52
    Thanked 107 Times in 85 Posts

    Is there an .MP4 optimizer ?

    In wondering if the is an .MP4 H.263 H.264 optimizer

    - Strip unneeded meta data
    - Recompress if the weak lossless encoding have been used (CALV vs... something)

    Anyone know a tool like this ?

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,693
    Thanks
    267
    Thanked 1,180 Times in 651 Posts
    Here's what I found:

    https://superuser.com/questions/4413...ts-with-ffmpeg
    https://libav.org/avconv.html
    https://video.stackexchange.com/ques...ding-the-video

    Somehow there's still no public implementation of cavlc to cabac transcoding?..

  3. #3
    Member
    Join Date
    Feb 2015
    Location
    United Kingdom
    Posts
    159
    Thanks
    23
    Thanked 68 Times in 39 Posts
    Quote Originally Posted by Shelwien View Post
    Somehow there's still no public implementation of cavlc to cabac transcoding?..
    The coders are public, just not very user friendly :
    https://github.com/libav/libav/blob/...c/h264_cabac.c and
    https://github.com/libav/libav/blob/...c/h264_cavlc.c

    This is the only source for the encoder I could find:
    https://www.ffmpeg.org/doxygen/2.7/cabac_8c_source.html

    I don't imagine a transcoder would be impossible given that there are a lot of shared functionalities like: 'decode_cabac_luma_residual()' and the cavlc equivalent 'decode_luma_residual()'.
    It's just a lot of work.

  4. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,693
    Thanks
    267
    Thanked 1,180 Times in 651 Posts
    There's this: https://github.com/dropbox/avrecode
    But it works only for a very limited subset of video streams.

  5. #5
    Member
    Join Date
    Jun 2009
    Location
    Puerto Rico
    Posts
    190
    Thanks
    84
    Thanked 18 Times in 14 Posts
    Quote Originally Posted by Shelwien View Post
    There's this: https://github.com/dropbox/avrecode
    But it works only for a very limited subset of video streams.
    I cannot get this to compile on Linux, sadly

  6. #6
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    885
    Thanks
    52
    Thanked 107 Times in 85 Posts
    Thank you for all the link,. but it looks more likee transcodes and specif comrpession programs ( to its own format)
    what im looking for is something more along the line of ECT and pngput. enhance the lossless compression layer and keeps same format/playability

  7. Thanks:

    Krishty (25th October 2019)

  8. #7
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,693
    Thanks
    267
    Thanked 1,180 Times in 651 Posts
    Well, ffmpeg and avconv have some options that could be used for container optimization.
    I'd not been able to find an actual h264 optimizer though... maybe format is too complex or something.

    > I cannot get this to compile on Linux, sadly

    It should be possible... I guess you can try previous version: https://github.com/danielrh/losslessh264
    https://www.solveigmm.com/en/howto/t...s-compression/

  9. #8
    Member
    Join Date
    May 2017
    Location
    Germany
    Posts
    80
    Thanks
    48
    Thanked 39 Times in 24 Posts
    Quote Originally Posted by SvenBent View Post
    Thank you for all the link,. but it looks more likee transcodes and specif comrpession programs ( to its own format)
    what im looking for is something more along the line of ECT and pngput. enhance the lossless compression layer and keeps same format/playability
    Backing up that request!

    Quite related, I have been asking for lossless MPEG-2 → H.264 conversion in a German forum in 2011. The answer mentioned two papers for lossless transcoding instead of lossy re-encoding.

    The first paper was at http://www-ee.uta.edu/Dip/Courses/EE...hellepaper.pdf and it’s offline. I cannot find it on archive.org either. If anyone knows where it’s gone, I’d be happy to learn.

    According to eXile, they chose transcoding over re-encoding because of the speed improvement (re-using previous DCT coefficients is faster than re-computing them), and the PSNR got 4 dB worse in the process.

    The second paper can be found here: www.tara.tsukuba.ac.jp/~maki/reprint/Makino/yoshitome10mcc1-6.pdf

    They appear to have gotten 0.19–0.31 dB better PSNR, but some videos were better off with re-encoding (e.g. Susie with 39.10 dB in transcoding and 38.97 dB in re-encoding).

    At the time, no source code could be found for anything relating to the papers or the topic in general.

    End quote. I have to read the papers again this weekend, maybe they contain some useful keywords or pointers on the topic.

    Quote Originally Posted by Shelwien View Post
    maybe format is too complex or something.
    H.264 is known for its ridiculous complexity, e.g. it can include face recognition and 3D VRML data. This does not make things easier.

    To clarify:
    MP4, MKV, AVI, … = container format for audio/video streams, subtitles, metadata
    MPEG-2, H.264, H.265, … = codecs for video streams inside those containers ← what we’re trying to optimize, right?

  10. #9
    Member
    Join Date
    Jul 2014
    Location
    Mars
    Posts
    189
    Thanks
    133
    Thanked 12 Times in 11 Posts
    If someone will compile win binary it would be great to test https://github.com/dropbox/avrecode

  11. #10
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,693
    Thanks
    267
    Thanked 1,180 Times in 651 Posts

  12. #11
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts

  13. #12
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,693
    Thanks
    267
    Thanked 1,180 Times in 651 Posts
    Compiled https://github.com/danielrh/losslessh264 for windows with MSYS and added some tools to make it work with mp4/mkv and test scripts:
    Failed to compile avrecode, but they say that its worse anyway.

    https://sites.google.com/site/shelwi...lrh_h264_v0.7z

    Only worked with its own sample though. I tried testing it with a few small mp4 files from my hdd, but it created empty output.
    Also normally multiple files are created on output (different data types?), so I used rar as container.
    Code:
    8,027,706 walk.mp4      // test file
    8,021,149 walk.264      // video stream in it
    7,992,717 walk.264.7z   // 7z -mx=9
    7,791,234 walk.264.cdm  // bwtsh+cdm
    8,015,681 walk_mp4.rar  // walk.mp4 in .rar
    6,905,315 walk_pip.rar  // walk.pip.* in .rar

Similar Threads

  1. Papa’s Optimizer
    By Krishty in forum Data Compression
    Replies: 79
    Last Post: 18th February 2020, 06:14
  2. Does a jpeg2000 optimizer exist ?
    By SvenBent in forum The Off-Topic Lounge
    Replies: 2
    Last Post: 28th August 2014, 17:24
  3. Ultra7z Optimizer 0.12 is out
    By Surfer in forum Data Compression
    Replies: 13
    Last Post: 30th December 2010, 00:22
  4. Pak_Pic Gui for pictures optimizer
    By ben in forum Data Compression
    Replies: 0
    Last Post: 22nd November 2010, 20:36
  5. help : Psd optimizer
    By Yuri Grille. in forum Data Compression
    Replies: 25
    Last Post: 25th April 2009, 10:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •