Durch die ffmpeg-Kodierung in VP9 wird bei Google Chrome ein nicht abspielbares Video erzeugt, während es in VP8 funktioniert

1107
TranslucentCloud

Es ist viel Zeit vergangen, seit ich auf das im Betreff angegebene Problem gestoßen bin.

Ich habe mehrere ffmpegstatische Builds ausprobiert, habe es aus Git-Repository selbst mit verschiedenen Flags und auf allen gängigen Betriebssystemen erstellt, sogar gebaut libvpx, aber das Problem bleibt bestehen. Ich kann ffmpeg nicht dazu bekommen, ein VP9Video zu kodieren, was Google Chrome nicht zum Absturz bringt.

Ich habe einen Intel Core 2 Quad Q9550mit 4 Kernen und verwende beispielsweise brew-built ffmpegmit den folgenden Optionen:

ffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.1_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 

Das fragliche Video ist:

General  Complete name : OneSecondTestYUV422.mov Format : MPEG-4 Format profile : QuickTime Codec ID : qt File size : 13.0 MiB Duration : 1s 0ms Overall bit rate mode : Variable Overall bit rate : 109 Mbps Movie name : Untitled Project Description : This video is about Untitled Project Encoded date : UTC 2015-10-17 16:43:21 Tagged date : UTC 2015-10-17 16:43:22 Writing library : Apple QuickTime com.apple.quicktime.keywords : ProRes Samples com.apple.quicktime.author : No Name com.apple.quicktime.title : Untitled Project  Video  ID : 1 Format : ProRes Format version : Version 0 Format profile : 422 Codec ID : apcn Duration : 1s 0ms Bit rate mode : Variable Bit rate : 106 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 24.000 fps Color space : YUV Chroma subsampling : 4:2:2 Scan type : Progressive Bits/(Pixel*Frame) : 2.138 Stream size : 12.7 MiB (98%) Title : Core Media Video Writing library : Apple Encoded date : UTC 2015-10-17 16:43:21 Tagged date : UTC 2015-10-17 16:43:22 Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709  Audio  ID : 2 Format : PCM Format settings, Endianness : Little Format settings, Sign : Signed Codec ID : lpcm Duration : 1s 0ms Bit rate mode : Constant Bit rate : 2 304 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 24 bits Stream size : 281 KiB (2%) Title : Core Media Audio Encoded date : UTC 2015-10-17 16:43:21 Tagged date : UTC 2015-10-17 16:43:22  Other  ID : 3 Type : Time code Format : QuickTime TC Duration : 1s 0ms Time code of first frame : 00:00:00:00 Time code, striped : Yes Title : Core Media Time Code Encoded date : UTC 2015-10-17 16:43:22 Tagged date : UTC 2015-10-17 16:43:22 

und der Befehl, den ich übergebe, ffmpegist:

ffmpeg -i OneSecondTestYUV422.mov -map 0:0 -map 0:1 -c:a libvorbis -async 1 -c:v libvpx-vp9 -b:v 17418.24k -maxrate 34836.48k -bufsize 34836.48k -r 24 -s 1920x1080 -aspect 16:9 -trellis 0 -subq 6 -me_range 16 -b_strategy 1 -refs 3 -sws_flags fast_bilinear -direct-pred 1 -sc_threshold 40 -qmin 2 -qmax 51 -copyts -threads 4 -sn -y UnplayableResult.webm 

Ich habe viel im Internet gesucht, diese Seiten eingeschlossen, aber ohne Erfolg.

2
-trellis 0-subq 6 -me_range 16 -b_strategy 1 -refs 3 -direct-pred 1 -sc_threshold 40 '. Diese sehen alle aus wie libx264-Optionen (die aufgrund der x264-Voreinstellungen ohnehin nicht in 99,9% der Fälle benötigt werden sollten). Diese Optionen werden von `libvpx-vp9` ignoriert. LordNeckbeard vor 8 Jahren 1
Danke, ich habe eigentlich Tests mit `iFFmpeg` gemacht, daher werden diese überflüssigen Parameter standardmäßig eingefügt. Meine eigentliche Codierungszeile lautet: ffmpeg -i OneSecondTestYUV422.mov -c: v libvpx-vp9 -b: v 4M -pix_fmt yuv420p -speed 4 -frame-parallel 0 -threads 4 -c: a libopus -b: a 320K PlayableResult. webm` TranslucentCloud vor 8 Jahren 0
Das sieht vernünftiger aus. Ich habe noch nie von iFFmpeg gehört. LordNeckbeard vor 8 Jahren 0
iFFmpeg ist nur eine weitere bezahlte ffmpeg-Benutzeroberfläche. Ich habe es nur für Tests benutzt und meine eigentliche Arbeit von der Kommandozeile gemacht. TranslucentCloud vor 8 Jahren 0

2 Antworten auf die Frage

3
TranslucentCloud

Anscheinend habe ich es herausgefunden (lustig genug, ich hatte tagelang ein Problem und löste es schließlich, sobald die Frage veröffentlicht wurde).

ffmpegstellt fest, dass das Originalvideo ein Pixelformat hat, YUV 4:2:2und codiert es entsprechend in dasselbe Format. Anscheinend funktioniert Google Chrome jedoch nicht mit diesem Pixelformat und erwartet dies auch YUV 4:2:0.

Also, ich bin an -pix_fmt yuv420pdie Kommandozeile gegangen und voilà, ich habe ein von Google Chrome abspielbares Video!

Ich bin neugierig: Können Sie die Zeile "Unterstützte Pixelformate" von: "ffmpeg -h encoder = libvpx-vp9" anzeigen? LordNeckbeard vor 8 Jahren 0
Sicher, los geht's: `Unterstützte Pixelformate: yuv420p yuv422p yuv440p yuv444p` TranslucentCloud vor 8 Jahren 0
0
Draussenduscher

Ich hatte ein ähnliches Problem: Einige der WebM-VP9-Videos, die ich im letzten Jahr codiert hatte, konnten in Firefox abgespielt werden, andere nicht (Firefox 44, 45, Mac OS X). Firefox 39 könnte jedoch alle spielen !?

Dank des Hinweises von TranslucentCloud habe ich schließlich einige Dateien mit ffprobe überprüft. Sie unterschieden sich nur in yuv422p (tv) und yuv420p (tv) .

Das Hinzufügen der -pix_fmt:v yuv420pOption zum zweiten Durchlauf der Codierung beendete meine Probleme. Schöne, abspielbare Videos in allen Firefox-Versionen.