Results 1 to 25 of 25

Thread: H264 Lossless recompression, Pied Piper (losslessh264)

  1. #1
    Member
    Join Date
    Sep 2015
    Location
    Madrid
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation H264 Lossless recompression, Pied Piper (losslessh264)

    Hello,

    didn't find a topic on a subject, though it seems a very interesting project (on JPEG part - not so much in light of PackJPG/StuffIt).

    https://github.com/danielrh/losslessh264

    It currently should work only on Baseline Profile files, but compatibility with Main profile is in progress as well.

    If anyone have Windows build - could you please share it? Or compile the re-encoder/decoder, if you please. Thanks in advance!

  2. #2
    Member
    Join Date
    Feb 2015
    Location
    United Kingdom
    Posts
    159
    Thanks
    23
    Thanked 68 Times in 39 Posts
    I assume that name is a direct reference to Silicon Valley.

  3. #3
    Member
    Join Date
    Sep 2015
    Location
    Madrid
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Lucas View Post
    I assume that name is a direct reference to Silicon Valley.
    Yes, it is

  4. #4
    Member m^2's Avatar
    Join Date
    Sep 2008
    Location
    Ślůnsk, PL
    Posts
    1,611
    Thanks
    30
    Thanked 65 Times in 47 Posts
    The description is not clear, which one of the options listed below is it?
    * A program that takes a video and compresses it losslessly to h264
    * A program that takes a h264 video and compresses it further, losslessly, while preserving h264 compatibility
    * A program that takes a h264 video and compresses it further, losslessly, without preserving h264 compatibility
    * Other

  5. #5
    Member
    Join Date
    Sep 2015
    Location
    Madrid
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As far as I understand, it recompresses pure .264 streams.

    "To try running this on a set of test movies, activate the run_compression_on_test_movies.sh file and it will run on some .264 streams."

    Can't test it myself due to absense of windows builds anywhere

  6. #6
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    58
    Thanks
    1
    Thanked 9 Times in 6 Posts
    So, I understand, then that it compresses .h264 streams losslessly, but does not preserve .h264 compatibility? That is, the compressed stream will have to be decompressed in order to play back as an .h264 stream?

    I also can't test, because there isn't any Win32 or Win64 bulid. Would anyone be kind enough to compile one? Thanks.

  7. #7
    Member
    Join Date
    Sep 2015
    Location
    Madrid
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by zyzzle View Post
    So, I understand, then that it compresses .h264 streams losslessly, but does not preserve .h264 compatibility? That is, the compressed stream will have to be decompressed in order to play back as an .h264 stream?

    I also can't test, because there isn't any Win32 or Win64 bulid. Would anyone be kind enough to compile one? Thanks.
    Yes, by description it looks like a special archiver for h264.

  8. #8
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts
    The project has been shifted to https://github.com/dropbox/avrecode

    who will be a hero to provide a compiled version for testing?

  9. #9
    Member
    Join Date
    Sep 2007
    Location
    Denmark
    Posts
    886
    Thanks
    52
    Thanked 107 Times in 85 Posts
    Darn i was hoping for a h.264 compression optimizer.

  10. #10
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts
    BTW JPEGMINI owner (Beamr) has product called "Beamr Video (http://beamr.com/product) but running on Linux with demo. You need to send them sample file and they will send you an optimized one..

  11. #11
    Programmer schnaader's Avatar
    Join Date
    May 2008
    Location
    Hessen, Germany
    Posts
    580
    Thanks
    225
    Thanked 218 Times in 103 Posts
    Quote Originally Posted by maadjordan View Post
    The project has been shifted to https://github.com/dropbox/avrecode

    who will be a hero to provide a compiled version for testing?
    Hmm.. couldn't even manage to compile under Linux (Ubuntu). Submodule update worked after adjusting .gitmodules a bit (see issue #1), but after that, "brew install protobuf" doesn't work (seems to be an OS X command). The best I could find for Ubuntu was this blog entry, but the commands there didn't work for me.

    Regarding these difficulties, I guess a Windows compile is far far away
    http://schnaader.info
    Damn kids. They're all alike.

  12. #12
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts
    the old version he mentioned windows and mac

  13. #13
    Member
    Join Date
    May 2009
    Location
    France
    Posts
    98
    Thanks
    13
    Thanked 74 Times in 44 Posts
    Hello,

    I've compiled a MSYS2/GCC version but it doesn't work well. It can "compress" files (output is bigger than original and it is very sensitive to input files) but fails when decompressing, can be a 'ffmpeg compiled with mingw" related bug but not sure.

    Not really usable...

    AiZ

  14. #14
    Member
    Join Date
    Feb 2016
    Location
    USA
    Posts
    41
    Thanks
    27
    Thanked 63 Times in 24 Posts
    Quote Originally Posted by maadjordan View Post
    BTW JPEGMINI owner (Beamr) has product called "Beamr Video (http://beamr.com/product) but running on Linux with demo. You need to send them sample file and they will send you an optimized one..
    Beamr is just lossy recompression.

  15. #15
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts
    yes but it will be visually similar as encoding process is not that clever to analysis frame by frame.
    to understand my point of view test jpeg-recompress at https://github.com/danielgtaylor/jpeg-archive
    also JPEG-recompress description is accurate "Utilities for archiving JPEGs for long term storage"
    Last edited by maadjordan; 15th June 2016 at 13:24.

  16. #16
    Member RamiroCruzo's Avatar
    Join Date
    Jul 2015
    Location
    India
    Posts
    15
    Thanks
    137
    Thanked 10 Times in 7 Posts
    Greetings Sir,

    Tried to compile it, but failed...DO ya have any compiled version of it???

  17. #17
    Programmer schnaader's Avatar
    Join Date
    May 2008
    Location
    Hessen, Germany
    Posts
    580
    Thanks
    225
    Thanked 218 Times in 103 Posts
    Finally managed to get the new avrecode project (commit 0a8695c) compiled under Linux (Ubuntu) - here are the steps to do so:

    • git clone https://github.com/dropbox/avrecode
    • cd avrecode
    • git submodule update --init
    • get protobuf source code from this Google developers site (.tar.gz version)
    • extract the protobuf package
    • in the extracted protobuf directory:
    • ./configure
    • make
    • sudo make install
    • copy the subdirectory src/google from the protobuf package into the avrecode directory (avrecode/google)
    • back to the avrecode directory
    • export PKG_CONFIG_PATH=[path to avrecode/google]
    • cd ffmpeg
    • ./configure
    • make
    • cd ..
    • make


    So, similar to the README.md instruction, but "brew install protobuf" has to be done different.

    This creates a very big executable (60,7 MB), that's why I won't post it here - if anyone is interested, I can upload it somewhere. Anyway, first results are not convincing. I used 5 testfiles, one of these had the same issue as reported here, the others were successfully processed - quite fast, only took several seconds - but the resulting file was the same as the input file except for 10 additional bytes at the beginning:

    Code:
    20404772 james.mp4
    20404782 james_compressed.mp4
    20404782 james_roundtrip.mp4
    14126809 linkin_park.mp4
    14126819 linkin_park_compress.mp4
    14126819 linkin_park_roundtrip.mp4
    One of the testfiles above was from YouTube, the other was the Linkin Park file from this H264 sample page.

    Just saw that the GitHub page has 3 more commits now, one of them called "Fix bug with neighbor calculations", so perhaps things will get better.
    http://schnaader.info
    Damn kids. They're all alike.

  18. Thanks (3):

    maadjordan (20th June 2016),RamiroCruzo (20th June 2016),Samantha (21st June 2016)

  19. #18
    Member
    Join Date
    May 2008
    Location
    Kuwait
    Posts
    338
    Thanks
    36
    Thanked 36 Times in 21 Posts
    so according to your testing gain is null. unless something is not active .. it should take longer time to process each file.

    Would you kindly try compiling older program https://github.com/danielrh/losslessh264

  20. #19
    Programmer schnaader's Avatar
    Join Date
    May 2008
    Location
    Hessen, Germany
    Posts
    580
    Thanks
    225
    Thanked 218 Times in 103 Posts
    Quote Originally Posted by maadjordan View Post
    so according to your testing gain is null. unless something is not active .. it should take longer time to process each file.

    Would you kindly try compiling older program https://github.com/danielrh/losslessh264
    Compiling the current commit (456c276) on Ubuntu works with a simple "make", but leads to an memory access violation when executing "h264dec" (h264enc seems to work); when using the release version v1.4.0 (commit 4adf9cd) it can be executed, but the roundtrip script outputs "files are different" and I have no clue how to use "h264enc".

    Also tried the latest commit (2de743d) of the other project (avrecode) with the same results as before.
    http://schnaader.info
    Damn kids. They're all alike.

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

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

  23. #22
    Member
    Join Date
    Aug 2008
    Location
    Planet Earth
    Posts
    878
    Thanks
    80
    Thanked 315 Times in 219 Posts

  24. #23
    Tester
    Stephan Busch's Avatar
    Join Date
    May 2008
    Location
    Bremen, Germany
    Posts
    876
    Thanks
    474
    Thanked 175 Times in 85 Posts
    there are still no precompiled binaries of the programs in the links above

  25. #24
    Member
    Join Date
    Jul 2014
    Location
    Mars
    Posts
    189
    Thanks
    133
    Thanked 12 Times in 11 Posts
    +1 for win binary

  26. #25
    Member
    Join Date
    Oct 2009
    Location
    usa
    Posts
    58
    Thanks
    1
    Thanked 9 Times in 6 Posts
    +2 for for somebody posting a compiled Windows binary. I would sure like to try this out.

Similar Threads

  1. exists an recompressor for h264 streams and audio streams?
    By thometal in forum Data Compression
    Replies: 34
    Last Post: 12th January 2017, 01:16
  2. lossless recompression of camera raw
    By Stephan Busch in forum Data Compression
    Replies: 74
    Last Post: 23rd March 2016, 00:40
  3. Video Recompression
    By Gonzalo in forum Data Compression
    Replies: 6
    Last Post: 21st June 2015, 21:35
  4. HEVS vs H264
    By Nania Francesco in forum Data Compression
    Replies: 18
    Last Post: 14th December 2014, 17:53
  5. LZMA recompression
    By twisted89 in forum Data Compression
    Replies: 4
    Last Post: 4th December 2012, 18:31

Tags for this Thread

Posting Permissions

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