MP4 & MKV

Discussion in 'other software & services' started by Yash Khan, Aug 30, 2014.

  1. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    Sometimes I download videos from Youtube with 4kvideodownloader.

    4kvideodownloader gives MP4 & MKV options
    MP4 - MP4/H264/AAC
    MKV - MKV/VP9/AAC

    Which one will give better quality?
    MKV ones are little smaller in sizes compared to MP4 for the same formats (720p, 480p, etc...)
    For example - if MP4 video size is app 720 MB then MKV is app 640 MB. So a difference of app 60-120 MB for a 1 GB video.

    I watch videos on my Full HD 1920*1080/60p TV.


    And to join videos what all should be the same from the below?
    Format/Resolution
    Bitrate
    Bit rate
    Duration
     
    Last edited: Aug 30, 2014
  2. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    MP4 and MKV are just containers. If you are looking at quality, you need to look at the codecs and settings used to encode the video file. The file sizes also depend on these settings. The codecs in your case will be H264 and VP9. The VP9 file is smaller in size because VP9 is a little bit more efficient than H264 and is more in the class of the H265 codec. Even then it is tricky to determine the quality, because it all depends on what settings the encoder was programmed at. The only way to determine quality is to download the file and then run some utility like mediainfo to see the settings used to encode that file.
     
  3. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    So I guess the quality would be the same as file size difference is little & videos are from the official media company.

    What is Vorbis?
    Is it a low quality or something old? Coz 4kvideodownloader shows Vorbis for 360p & below videos & AAC for 480p & higher videos.
     
  4. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    Vorbis, or more specifically Ogg Vorbis, is an audio codec, it is equivalent to MP3 pro and provides better audio quality at lower bit rates. At bit rates 128 kbps and above, the difference between Ogg Vorbis, mp3 and aac is not that much noticeable.

    I do not know why the video stream is being identified as Vorbis. Most probably, at 360p, the video codec is divx/xvid and the audio codec is Ogg Vorbis.
     
  5. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    The video stream is not identified as Vorbis.
    I just wanted to know about Vorbis as it was there for 360p & below videos only i.e MKV/VP8/Vorbis
    Thanxx for the infos.

    Any info on joining videos I mentioned in my first post?
    I downloaded 6 mp4 videos of same resolution, duration was same too, bitrate was different, bit rate was same, size was different, videos were of the same program in 6 parts as a playlist on Youtube.
    I joined them with MKVToolnix but the resulted video shows blue screen at few places in the video.
    I tried AVIDemux & the same blue screen here too.
     
    Last edited: Aug 30, 2014
  6. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    For joining, it is a requirement that the parts be the same frame rate, resolution, and encoded using the same codec etc. If they are not the software will give you an option to decompile and re-encode one of the parts to match the other one before joining. This is not recommended because re-encoding a lossy stream like H264 will reduce its quality.

    If the Youtube parts were split from the same source, they should be identical and all you have to do is to join them together. I have previously used AVIDemux on youtube videos successfully. Make sure in AviDemux, set the "audio output" and "video output" to "copy" and "output format" to mkv or mp4 muxer, depending on the original container of the parts. It should work unless the original uploader encoded each part of the file separately with different settings.
     
  7. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    I tried other Youtube videos & MKVToolnix worked fine.

    It worked fine on those videos too but dont know why there was blue screen at some places in the video.

    AVIDemux has MP4 & MP4V2 muxer.
    Is MP4V2 latest/advanced & better than MP4?

    I have reencoded few Youtube videos with Vidcoder & the quality was identical to the original, atleast to the naked eyes, no noticeable difference.

    You said H264 is a lossy stream.
    Which stream is lossless?
     
    Last edited: Aug 30, 2014
  8. guest

    guest Guest

    The question is do you want a 500MB video file size for one minute video? Not to mention the stress put into your system. Mrkvonic MKVToolnix should do the joining without re-encoding just fine. Your problem about blue screen, I have a strong feeling it's due to the downloader software. FWIW some video downloaders re-encode the downloaded videos. If you're using Firefox or its forks you can even download videos without additional addons (although limited to only 360p and 720p).
     
  9. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    Ok.

    Few more queries. Hope I am not troubling you.

    Every download managers, video downloaders I tried to download videos from Youtube gives MP4 file.
    Does Youtube provides only MP4 files & not MKV?
    If yes, then how video downloaders provide MKV files for Youtube videos? Is it coz, as you have mentioned in your previous post, "some downloaders re-encode videos?
    OR Youtube also provides MKV files too?
     
    Last edited: Aug 31, 2014
  10. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    OK, I tried 4kvideodownloader to download MKV files for Youtube videos.
    It seems it tries to remux MKV files coz after download completed it mentioned error to remux.
    So Youtube doesn't provide MKV files, right?
     
  11. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    MP4v2 is the latest update to MP4 container format. I believe the v2 can embed AC3 audio tracks inside it, where as v1 cannot do so. However, since they are both container formats any one of them will do fine. I generally use the MP4 muxer for Youtube videos and it works fine.

    There is always a quality drop if you re-encode an already encoded video. If yo do not notice the difference, then it is great. It varies from person to person. For example, I can always notice the quality drop, therefore I seldom re-encode any file from youtube, as they are already compressed and there is no benefit in re-encoding them.

    H264 can also be used to encode a lossless video, but the resultant video size will make this impractical. The original Bluerays discs typically use use either H262 or H264 for storing data on them, so with the encoder setting set to quality over file size, you can get near lossless compression from H264.

    I have never personally seen an MKV file uploaded on youtube. Youtube only uses either MP4 containers with H264/AAC stream for 720p and higher resolution files or FLV containers with H264/AAC stream for 480p and lower resolution files.

    If you are getting an MKV file from youtube then your download software is probably converting the files to MKV.
     
  12. guest

    guest Guest

    I really hate it when a video downloader software simply describes MP4 or MKV as "high quality". It is truly misleading.

    I just knew H.264 can be used for lossless encoding. Although everyone who uses it needs to compress videos as small as possible, so I don't think people are really using it for lossless encodings.
     
  13. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    Thanxx a lot for all the info.

    Regards
    Naren
     
  14. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    Yes, people do not use it for lossless encodings, but movie studios do, or more accurately, movie studios go as near to a lossless stream as possible. Encoding a lossless video is just not practical. H264 is one of the three codecs that all Blue Ray movies are encoded in on a Blue Ray disc. So even the original Blue Ray discs do not contain a lossless video, it is usually a compressed video stream. The same was true for DVDs, the mpeg-2 codec used to encode DVD video actually compresses the video stream somewhere between 10-20%.
     
  15. NGRhodes

    NGRhodes Registered Member

    Joined:
    Jun 23, 2003
    Posts:
    2,331
    Location:
    West Yorkshire, UK
    DVD has a maximum bitrate of around 10Mbit/s, raw PAL/NTSC is 160Mbits/s so you are compressing by a factor of 16 times minimum (ignoring studios using vastly higher resolutions).
     
  16. Raza0007

    Raza0007 Registered Member

    Joined:
    Mar 30, 2009
    Posts:
    1,425
    Location:
    USA
    You are right. I was just pointing out that even on DVDs and Blue Rays, they do not use uncompressed video. The video streams are always compressed and most of the codecs used in compression are lossy codecs. There are no practical uses of an uncompressed video feed in the real world.
     
  17. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    I use 4kvideodownloader to download videos, mostly from Youtube.
    4k now gives an option to download some videos in MKV.

    For MP4 & MKV, 4k mentions -
    MP4 - MP4/H264/AAC
    MKV - MKV/VP9/Vorbis
    Is there any quality difference or one better than the other between the above 2 formats/codecs?
    The reason I am asking this is coz video file size for MKV is quite smaller compared to MP4.
    For ex - I checked 3 videos (720p)
    MP4 file size for the videos were app 2GB, 900MB & 1.1GB
    MKV file size for the videos were app 1.2GB, 650MB & 750MB.
    You can see big difference in the file size for both.
    So due to big difference in the file size, I was wondering if there is any quality difference or one better than the other?
     
  18. guest

    guest Guest

    It's probably just me being screwed up again but, somehow I feel like I've seen this question from you before...

    Anyway, when viewing YT videos you usually get FLV and MP4. I am not sure how to put WebM here but there's that as well if I'm not being mistaken. They never provide MKV natively, so it is most likely that the downloader software was converting the downloaded videos, which might explains the smaller file size.

    EDIT: When trying to reserve videos from internet streaming sources, try to use methods that doesn't require re-encoding process. It might give undesirable results in the end. It happened to me before and that's why I tend to avoid using these kind of downloaders nowadays.
     
    Last edited by a moderator: Nov 20, 2014
  19. Wroll

    Wroll Registered Member

    Joined:
    Nov 29, 2011
    Posts:
    549
    Location:
    Italy
    mkv & mp4 are containers. A bigger sized file should have a better quality, but that's not always true due to human factors (people who don't know to encode a file). You can judge the quality with your own eyes and years.
     
  20. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    Yes, I have asked similar question here but couldn't find my thread.

    You mean Youtube provide MP4 but not MKV, so 4kdownloader can provide native MP4, but could be re-encoding to provide MKV, right?
     
  21. ronjor

    ronjor Global Moderator

    Joined:
    Jul 21, 2003
    Posts:
    57,779
    Location:
    Texas
    Threads merged.
     
  22. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    According to 4kvideodownloader, Youtube do provide native MKV but has reduced MKV maintenance so few videos are available in MKV especially high resolution.
    https://www.4kdownload.com/howto/howto-download-youtube-1080p-or-720p
    So it seems 4k doesn't re-encode but provides native MKV by Youtube.

    Also I didn't noticed any conversion/re-encode during download. I mean the download speed & time for MKV was the same as MP4 so it seems no re-encode during download & after download completion too no re-encode process & the file was available to play.
    So it seems 4k provides native MKV by Youtube & not re-encoded/converted ones.
     
  23. guest

    guest Guest

    So I'm not imagining things this time. Amazing! =V

    They could even re-encode the videos to MP4 as well. If you could get 480p or 1080p, it is most likely that the videos were re-encoded. Easy way to know whether the video was re-encoded or not is to check the file properties and see if there is a line that says "googlevideo.com".

    According to 4kdownloader, not YouTube/Google. YT does not provide streaming with MKV as the file container natively AFAIK.

    They do that in the cloud. As I said, check the video file properties. If it has a line that contains "googlevideo.com" in it, that means it was not re-encoded. Otherwise, the downloader program re-encoded them.

    EDIT: I don't know if MKV is natively available for anything higher than 1080p @30fps. I still don't believe YT provides MKV natively though.
     
    Last edited by a moderator: Nov 22, 2014
  24. Yash Khan

    Yash Khan Registered Member

    Joined:
    Apr 4, 2011
    Posts:
    1,837
    I checked video file properties with rightclick-properties-details & mediainfo software & there was no line that contains googlevideo.com.

    Download managers like Internet Download Manager that has media downloads function gives native or re-encoded videos?

    Any free media downloaders & download managers that gives native videos?
     
  25. guest

    guest Guest

    Some re-encode, others don't.

    I know for certain that Firefox and its forks can be used for that purpose, although your choice is limited only to 360p and 720p. In the old times it was possible to download all the common video resolutions available, it seems to be not possible anymore now ever since Google made some changes to YT a few while ago.