T.me je super na posilani videa, a u MP4 se dokonce da streamovat, na misto toho
ze si ho uzivatel musi stahnout a potom prehrat.
MP4 v ffmpeg se nastavi pomoci (A timto prikazem se ty ATOMy presunou na zacatek souboru):
-f mp4 -movflags +faststart
a funguje to bezvadne, hlavne lidem co nemaji misto v telefonu na ulozeni 4K/8K videa a namisto
toho se to da v MP4 containeru streamovat (H.264/AVCHD a H.265/HEVC + HDR)
Tady je zajimy prispevek na tema MP4
https://superuser.com/questions/1753260/what-makes-a-mp4-streamableAs far as I know, MP4 container files may have their metadata (audio/video tracks, codec information) either at the beginning of the file before the actual data, or at the end. If the metadata is placed at the end, a player can't decode the video stream until it has downloaded the entire thing (unless it can seek through the file, which is e.g. possible using HTTP range requests).
Ale pro kontejner MKV se mi to nedari, ale vim ze to funguje, protoze na t.me dostavam
video v MKV kontejneru s (H.264/AVCHD a H.265/HEVC + HDR) ktere se da streamovat
bez zbytecneho stahovani.....
Z YT jsem si stahl 4K video v MP4 a MKV kontejnerech a video kodeku AV1 a WebM.
#Wonka | Trailer #2
#AV01 #av01.0.12M.08 #4K #mp4
yt-dlp -f 401+140 https://www.youtube.com/watch?v=wYmtRhKvmVE
401 mp4 3840x2160 24 │ 97.66MiB 5567k https │ av01.0.12M.08 5567k video only 2160p, mp4_dash
140 m4a audio only 2 │ 2.27MiB 130k https │ audio only mp4a.40.2 130k 44k medium, m4a_dash
#Wonka | Trailer #2
#WebM #vp09.00.50.08 #VP9 #4K #mp4
yt-dlp -f 625+140 https://www.youtube.com/watch?v=wYmtRhKvmVE
625 mp4 3840x2160 24 │ ~338.66MiB 18873k m3u8 │ vp09.00.50.08 18873k video only
140 m4a audio only 2 │ 2.27MiB 130k https │ audio only mp4a.40.2 130k 44k medium, m4a_dash
#Wonka | Trailer #2
#WebM #vp09.00.50.08 #VP9 #4K #mkv
yt-dlp -f 313+251 https://www.youtube.com/watch?v=wYmtRhKvmVE
313 webm 3840x2160 24 │ 195.03MiB 11118k https │ vp09.00.50.08 11118k video only 2160p, webm_dash
251 webm audio only 2 │ 2.22MiB 126k https │ audio only opus 126k 48k medium, webm_dash
Kontrola ze vsechny 3 videa maji flag "IsStreamable: Yes"
~/Videos$ mediainfo "--Inform=General;IsStreamable: %IsStreamable%" Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE].mkv
IsStreamable: Yes
~/Videos$ mediainfo "--Inform=General;IsStreamable: %IsStreamable%" Wonka.Trailer.#2.f625+140.[wYmtRhKvmVE].mp4
IsStreamable: Yes
~/Videos$ mediainfo "--Inform=General;IsStreamable: %IsStreamable%" Wonka.Trailer.#2.f401+140.[wYmtRhKvmVE].mp4
IsStreamable: Yes
Ale po uploadu na t.me se samozrejmne video v MKV kontejneru neda streamovat, ale pouze stahnout.
Hledal jsem a nasel tohle:
https://superuser.com/questions/1190153/make-mkv-file-suitable-for-streaming-with-ffmpeg-or-avconv-how-to-move-all-mmkclean
https://www.matroska.org/downloads/mkclean.htmlUsage: mkclean [options] <matroska_src> [matroska_dst]
~/Install/mkclean-0.9.0/mkclean/mkclean --keep-cues Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE].mkv Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE]--keep-cues.mkv
Zkousim i ffmpeg:
ffmpeg -hide_banner \
-i Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE].mkv \
-c copy -reserve_index_space 50k \
Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE]-reserve_index_space.mkv
Jeste pro jistotu zkousim alternativni verzi "mkclean-pragmatic"
https://github.com/XMB5/mkclean-pragmaticcd ~/git
git clone https://github.com/XMB5/mkclean-pragmatic.git
cd mkclean-pragmatic
mkdir build
cd build
cmake ..
make -j$(nproc)
~/git/mkclean-pragmatic/build/mkclean/mkclean Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE].mkv Wonka.Trailer.#2.f313+251.[wYmtRhKvmVE]-mkclean-pragmatic.mkv
A tady jsem se zasekl .....Protoze ani jeden vysledny soubor se neda streamovat na t.me, ale pouze stahnout
Nevi nekdo kde je chyba?