VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    Mar 2014
    Location
    Brazil, Rio de Janeiro
    Search Comp PM
    I use MKVToolNix GUI to compress my .avi files into .mkv with the zlib compression algorithm. But I'd like to know if there's a way to do the same process, except turning the file into .mp4 instead of .mkv.

    Can someone help me?
    Quote Quote  
  2. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Do what you are doing and then use MkvToMp4
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  3. zlib is not a "standard" codec for the MP4 container so you may have limited playback/editing compatibility.
    Quote Quote  
  4. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    What you are doing is just remuxing,not compressing,any special reason you need avi (xvid?)to be mp4?
    I think,therefore i am a hamster.
    Quote Quote  
  5. Had never heard of zlib (a ZIP-like lossless compression scheme) being used for video. I thought it was mainly for on-the-fly compression of HTML. It seems zlib is used only on the headers, not the audio or video data, which of course is 99% of the total. The effect on total file size must be minuscule.
    So don't worry about it
    https://en.wikipedia.org/wiki/Zlib#Applications
    https://www.matroska.org/news/compressed-headers.html
    https://forum.videohelp.com/threads/341226-Header-stripping?p=2219825&viewfull=1#post2219825
    Quote Quote  
  6. There are also zlib based lossless codecs.
    https://www.fourcc.org/zlib/

    Keep in mind that entropy encoding, similar to zlib's DEFLATE algorithm (a variation on Lempel–Ziv), is the last step of most video compression codecs. So compressed video isn't further compressed by such techniques.
    Quote Quote  
  7. Member
    Join Date
    Mar 2014
    Location
    Brazil, Rio de Janeiro
    Search Comp PM
    Originally Posted by netmask56 View Post
    Do what you are doing and then use MkvToMp4
    Not working, it gives me an error. I get a red (X) on Video after starting the process.

    Originally Posted by johns0 View Post
    What you are doing is just remuxing,not compressing,any special reason you need avi (xvid?)to be mp4?
    I do what I do when I upload my stuff to YouTube since it accepts .mkv. Twitch on other hand only accepts .mp4 (it introduced a video upload feature recently).
    Quote Quote  
  8. I don't think the MP4 container officially supports any lossless video codecs.

    http://www.mp4ra.org/codecs.html

    You should try using x264 in lossless mode. I don't know if Twitch will accept lossless h.264 in MP4.

    But why would you want to encode with a lossless codec for upload to video sharing sites?
    Quote Quote  
  9. Member
    Join Date
    Mar 2014
    Location
    Brazil, Rio de Janeiro
    Search Comp PM
    Originally Posted by jagabo View Post
    I don't think the MP4 container officially supports any lossless video codecs.

    But why would you want to encode with a lossless codec for upload to video sharing sites?
    Why not?
    Quote Quote  
  10. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    YouTube will certainly recompress the uploaded video again, for each offered same or smaller resolution. Therefore it may be useful to upload good quality because it will get worse ... but uploading losslessly compressed video is mostly a waste of internet bandwidth. Video with hardly recognizable loss will be suitable (e.g. x264 with CRF 15..18 is usually fine).

    If you have artifical content (e.g. game screen recordings with sharp edges, saturated colors, and fine structures), upscaling your video might be useful, to preserve some sharpness while YouTube will reduce the resolutions. But really lossless encoding won't preserve more quality than "visually transparent" lossy encoding, just blow up the file size more than necessary.
    Quote Quote  
  11. Member
    Join Date
    Mar 2014
    Location
    Brazil, Rio de Janeiro
    Search Comp PM
    Oh. Yes, I noticed that while my videos look perfect if watched from my computer, their quality decrease a lot once on YouTube, but I was still in a bit of doubt.

    Thank you for the confirmation.
    Quote Quote  
  12. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    In MKV files that have it it generally only relates to a subtitle track - miniscule and indeed many media players have problems with compressed headers. For awhile the default setting for MKVMergeGui was ON but now it is OFF. I wouldn't use it as it offers no real size advantage. Maybe 1% of 16 to 32K typical srt file size
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  13. ffmpeg includes a zlib video encoder and decoder. I was able to produce AVI and MKV files with zlib compressed video with ffmpeg:

    Code:
    ffmpeg -i %1 -vcodec zlib "%~dpn1.zlib.avi"
    ffmpeg -i %1 -vcodec zlib "%~dpn1.zlib.mkv"
    But, as I suspected, it refuses to make an MP4 video with zlib:

    Code:
    ffmpeg -i %1 -vcodec zlib "%~dpn1.zlib.mp4"
    Last edited by jagabo; 7th Oct 2016 at 16:22.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!