hello,
I'm downloading a video from an available stream using the command/application:
or...Code:N_m3u8DL-RE -M format=mp4 --key [some_keys1:some_keys2] "http://link_to_manifest_file.mpd" --save-dir C:\Video --save-name videofilename
Which option is better: mkv or mp4 ?Code:N_m3u8DL-RE -M format=mkv --key [some_keys1:some_keys2] "http://link_to_manifest_file.mpd" --save-dir C:\Video --save-name videofilename
Is there any "practical" difference between these format ? ( file size is very similar), or does it not matter, I won't notice any difference? ( quality )
for some reason the streamfab app has this option
Regards ,
misiek
[Attachment 77060 - Click to enlarge]
+ Reply to Thread
Results 1 to 29 of 29
-
-
This only has an effect on the container used (i.e. how the data is organized inside the file) and the file extension. The actual video and audio streams will be exactly the same, no quality difference.
Other than that, MKV (matroska) is more suited to contain multiple streams than MP4. -
-
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
Now that you mention it, there's another important difference that might be relevant in some cases: MP4 still has more compatibility with older or bad setups. One example of bad setups is Samsung TVs reading from a file on the network: both MKV and MP4 can be reproduced of course, but there's a weird bug that makes it impossible to seek through (e.g.: jump forward or back) MKV files (this is actually unrelated to the container used, but depends just on the extension, more info here). To make it even more weirder, this problem does not occur if the file is read from a drive plugged directly into the TV.
-
Exactly!
So, when someone says "which is better" the answer would depend on "what is the point of getting the videos in the first place, what will they be played on" etc.
I have an LG TV that often has some weird bugs with MKV. When remuxed to MP4, no such problems. It could be also something else that ffmpeg does but... -
mp4 and mkv are just containers. They play no part in the actual quality of the contained video and audio streams (those are essentially identical).
Now in terms of filesize, I've just done a simple conversion of two different mp4 files using the generic:
ffmpeg -i input.mp4 -c:v copy -c:a copy output.mkv
Both have only one audio and one video stream in them with no extra metadata.
File#1: mp4: 790,050KB mkv: 789,839KB difference: 211KB = 0.024%
File#2: mp4: 2,526,474KB mkv: 2,525,252KB difference: 1222KB = 0.048%
So, mkv a tiny teensy weeny bit smaller. But not anything I would worry about.
In terms of compatibility, mp4 wins hands down. There are still many playback devices (particularly older ones like older TVs) that cannot handle mkv. But, even that's not as clear cut. I usually mux my subs into the container (either mp4 or mkv) since I hate having a separate folder for each file just to have a separate srt file. I have found some playback devices that can handle both mp4 and mkv, but whilst they recognise the subs in mkv, they will not in mp4.
So, there's plusses and minuses for both containers. I use both since I'm not really fussed about it.
At the end of the day, it's what works best for you.
Another big compatibility issue is AAC vs AC3 audio. Pretty much everything that you download from normal streaming sites is AAC. However, there are many downloads from (say) torrenting sites that use AC3. Many old playback devices cannot play AC3 codec.Last edited by deccavox; 18th Feb 2024 at 07:31.
-
-
-
Oh. New to me.
I have at least two older devices, that cannot play aac, but ac3, and I always have to convert before watching.
Must be the combination mp4+ac3 with your devices. And maybe my devices are "even older" devices. -
And another point to add to MKV small file-size:- at some stage in the decryption process we need to merge audio, video and subtitles. The alternatives are ffmpeg for mp4 or mkvmerge for mkv. Not that this will mean much to you if you just take what is given in a script, but mkvmerge is miles-ahead faster in use. So coders prefer it.
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
hello,
I previously wrote that the topic had been clarified, but a new questions appeared, maybe this is a good opportunity to ask it here and now
1) when I use :Code:N_m3u8DL-RE -M format=mp4 --key [KEY1:KEY2] "http://xxxxxxxxxxxxxxxxxxxxxxxxx/manifest.mpd" --save-dir C:\Video --save-name Movie.001
[Attachment 77151 - Click to enlarge]
then i must manually select Aud * CENC 3 with 128 and codec mp4a,
( ec-3 codec, may not be compatible with older devices (right?) and this video can be played on such devices,
that's why I decided it would be this format )
Is it possible to somehow set the default option for audio as "second" - > "CENC 3",
2) If "yes", for question 1 , Can we run it automatically (without confirmation = < enter > to accept ?
3) I noticed that during processing with audio CENC 4 - 160 ec-3 I have this "WARN"
[Attachment 77152 - Click to enlarge]
what codec "is missing" ? should I do something or can I ignore this error (video plays correctly with audio)
there is no such error for CENC 3 - 128 - mp4a options -
You need to use the -sv (--select-video) and -sa (--select-audio) flags to automatically select streams. Run:
Code:N_m3u8DL-RE --morehelp select-video
Code:N_m3u8DL-RE --morehelp select-audio
Yes, you can usually ignore those warnings. Muxing usually solves things. -
Can I ask for a hint? Unfortunately, this doesn't tell me much about
Code:Examples: # select all -sa all # select best eng audio -sa lang=en:for=best # select best 2, and language is ja or en -sa lang="ja|en":for=best2
[Attachment 77188 - Click to enlarge]
( Unfortunately, I noticed that sometimes it is CENC 3 and sometimes CENC 4 ) -
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
as I wrote sometimes is "4" somtimes "3" ( I do not know why )
[Attachment 77189 - Click to enlarge]
[Attachment 77190 - Click to enlarge]
for example
http://redirector.redefine.pl/vm2dash/30fa784262cbd1751dd7223fe87aa979a0e5073e/manifest.mpd
http://redirector.redefine.pl/vm2dash/1d66166e347b04f198a5abb7af50fe1cbeb089a8/manifest.mpd -
[Attachment 77192 - Click to enlarge] Works for me.Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
-
It doesn't. It picks the best audio ~160kbps where the codec is ec-3
The solution -sa all:for='best2' ensures a 128 Kbps download with a changing id
Maybe N_m3u8DL-RE isn't the best tool - have you looked at using yt-dlp that may have better selectors - I haven't looked recently.Last edited by A_n_g_e_l_a; 22nd Feb 2024 at 10:15.
Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
https://files.videohelp.com/u/301890/hellyes6.zip -
You're right, there's actually a small mistake on my part, it's "codecs", not "codec":
Code:-sa codecs="mp4a.40.2"
Code:<Representation audioSamplingRate="44100" bandwidth="128000" codecs="mp4a.40.2" id="3" mimeType="audio/mp4"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" /> <BaseURL>42276-audio-1871863-128kbps.mp4</BaseURL> <SegmentBase indexRange="2040-7267" timescale="44100"> <Initialization range="0-2039" /> </SegmentBase> </Representation>
-
ok, thank you for the tips, I will test it and let you know,
this idea came to me now...
We can look into the mpd file, read the 'id' for bitrate 128 and mp4a codec and then generate commands for N_m3u8DL-RE
but I will test your suggestions first
I didn't know what syntax to use (e.g.: 'best2' means "second best"? -
-
and ....
can this be done to automatically select a stream with a bitrate of 4499 (it seems to always be in second place)
-sv '2' ( ? )
[Attachment 77797 - Click to enlarge] -
-
I thought this way too, but I didn't know how to use "worst"
it works - thank you
Similar Threads
-
High Speed Avi to mkv and mp4 to mkv converter needed
By RBCC in forum Video ConversionReplies: 4Last Post: 8th May 2022, 18:25 -
MkvТоMp4 v0.224 - rapid tool for repack Mkv to Mp4
By oreons in forum Video ConversionReplies: 808Last Post: 7th Mar 2022, 01:43 -
MKV and MP4 issues
By deanfourie in forum EditingReplies: 1Last Post: 3rd Mar 2022, 14:42 -
How to convert an MKV to MP4 file and an MP4 to MKV file
By carlmart in forum Video ConversionReplies: 18Last Post: 25th Jun 2019, 09:02 -
FFMPEG Conversion from MKV to MP4 returns a empty MP4 file?
By lolmaisine in forum Video ConversionReplies: 4Last Post: 6th Mar 2019, 07:45