
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (42)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (5096)
-
FFMPEG-PHP on Windows (not Linux as prev question) error Unknown encoder 'libfaac'
19 novembre 2020, par JonathanI am doing this on a Windows server and is not already answered as per the other question on here on a Linux server.


Im using FFMPEG on a project handling video uploads and I keep getting an issue with Videos with AAC audio encoding.


I tried using aac and other aac encoders, but the windows version of FFMPEG says unknown encoders. I tried without setting an AudioCode so it might convert to native. But still the same.


Please see the log output below :


<pre>object(FFMpeg\Exception\RuntimeException)#35 (7) {
 ["message":protected]=>
 string(15) "Encoding failed"
 ["string":"Exception":private]=>
 string(0) ""
 ["code":protected]=>
 int(0)
 ["file":protected]=>
 string(108) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php"
 ["line":protected]=>
 int(106)
 ["trace":"Exception":private]=>
 array(1) {
 [0]=>
 array(5) {
 ["file"]=>
 string(45) "C:\inetpub\wwwroot\dev\ffmpeg-lib\process.php"
 ["line"]=>
 int(35)
 ["function"]=>
 string(4) "save"
 ["class"]=>
 string(26) "FFMpeg\Media\AbstractVideo"
 ["type"]=>
 string(2) "->"
 }
 }
 ["previous":"Exception":private]=>
 object(Alchemy\BinaryDriver\Exception\ExecutionFailureException)#43 (9) {
 ["command":protected]=>
 string(397) "C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:17.00 -i "temp/temp_20201110-100656_1080p-220mb.mp4" -t 00:00:52.00 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile "W:/TempIIS\ffmpeg-passes5fabd88bb6b0912dmm/pass-5fabd88bb6c3b" "temp/20201111-122651.mp4""
 ["errorOutput":protected]=>
 string(2301) "ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.1 (GCC) 20200805
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 58.100 / 56. 58.100
 libavcodec 58.101.101 / 58.101.101
 libavformat 58. 51.101 / 58. 51.101
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/temp_20201110-100656_1080p-220mb.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 19529854
 compatible_brands: mp42isom
 creation_time : 2016-04-11T06:32:53.000000Z
 Duration: 00:02:25.98, start: 0.000000, bitrate: 13772 kb/s
 Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Sound Media Handler
 Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 13639 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Video Media Handler
 encoder : AVC Coding
Unknown encoder 'libfaac'
"
 ["message":protected]=>
 string(2750) "ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:17.00 -i "temp/temp_20201110-100656_1080p-220mb.mp4" -t 00:00:52.00 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile "W:/TempIIS\ffmpeg-passes5fabd88bb6b0912dmm/pass-5fabd88bb6c3b" "temp/20201111-122651.mp4":

Error Output:

 ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.1 (GCC) 20200805
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 58.100 / 56. 58.100
 libavcodec 58.101.101 / 58.101.101
 libavformat 58. 51.101 / 58. 51.101
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/temp_20201110-100656_1080p-220mb.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 19529854
 compatible_brands: mp42isom
 creation_time : 2016-04-11T06:32:53.000000Z
 Duration: 00:02:25.98, start: 0.000000, bitrate: 13772 kb/s
 Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Sound Media Handler
 Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 13639 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Video Media Handler
 encoder : AVC Coding
Unknown encoder 'libfaac'
"
 ["string":"Exception":private]=>
 string(0) ""
 ["code":protected]=>
 int(0)
 ["file":protected]=>
 string(116) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php"
 ["line":protected]=>
 int(95)
 ["trace":"Exception":private]=>
 array(5) {
 [0]=>
 array(5) {
 ["file"]=>
 string(116) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php"
 ["line"]=>
 int(73)
 ["function"]=>
 string(18) "doExecutionFailure"
 ["class"]=>
 string(34) "Alchemy\BinaryDriver\ProcessRunner"
 ["type"]=>
 string(2) "->"
 }
 [1]=>
 array(5) {
 ["file"]=>
 string(117) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php"
 ["line"]=>
 int(207)
 ["function"]=>
 string(3) "run"
 ["class"]=>
 string(34) "Alchemy\BinaryDriver\ProcessRunner"
 ["type"]=>
 string(2) "->"
 }
 [2]=>
 array(5) {
 ["file"]=>
 string(117) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php"
 ["line"]=>
 int(136)
 ["function"]=>
 string(3) "run"
 ["class"]=>
 string(35) "Alchemy\BinaryDriver\AbstractBinary"
 ["type"]=>
 string(2) "->"
 }
 [3]=>
 array(5) {
 ["file"]=>
 string(108) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php"
 ["line"]=>
 int(96)
 ["function"]=>
 string(7) "command"
 ["class"]=>
 string(35) "Alchemy\BinaryDriver\AbstractBinary"
 ["type"]=>
 string(2) "->"
 }
 [4]=>
 array(5) {
 ["file"]=>
 string(45) "C:\inetpub\wwwroot\dev\ffmpeg-lib\process.php"
 ["line"]=>
 int(35)
 ["function"]=>
 string(4) "save"
 ["class"]=>
 string(26) "FFMpeg\Media\AbstractVideo"
 ["type"]=>
 string(2) "->"
 }
 }
 ["previous":"Exception":private]=>
 NULL
 }
}
</pre>


Output of ffmpeg -encoders


V..... a64multi Multicolor charset for Commodore 64 (codec a64_multi)
 V..... a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)
 V..... alias_pix Alias/Wavefront PIX image
 V..... amv AMV Video
 V..... apng APNG (Animated Portable Network Graphics) image
 V..... asv1 ASUS V1
 V..... asv2 ASUS V2
 V..... libaom-av1 libaom AV1 (codec av1)
 V..... librav1e librav1e AV1 (codec av1)
 V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)
 V..... avrp Avid 1:1 10-bit RGB Packer
 V..X.. avui Avid Meridien Uncompressed
 V..... ayuv Uncompressed packed MS 4:4:4:4
 V..... bmp BMP (Windows and OS/2 bitmap)
 VF.... cfhd GoPro CineForm HD
 V..... cinepak Cinepak
 V..... cljr Cirrus Logic AccuPak
 V.S... vc2 SMPTE VC-2 (codec dirac)
 VFS... dnxhd VC3/DNxHD
 V..... dpx DPX (Digital Picture Exchange) image
 VFS... dvvideo DV (Digital Video)
 V.S... ffv1 FFmpeg video codec #1
 VF.... ffvhuff Huffyuv FFmpeg variant
 V..... fits Flexible Image Transport System
 V..... flashsv Flash Screen Video
 V..... flashsv2 Flash Screen Video Version 2
 V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
 V..... gif GIF (Graphics Interchange Format)
 V..... h261 H.261
 V..... h263 H.263 / H.263-1996
 V.S... h263p H.263+ / H.263-1998 / H.263 version 2
 V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V..... h264_amf AMD AMF H.264 Encoder (codec h264)
 V..... h264_mf H264 via MediaFoundation (codec h264)
 V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
 V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
 V..... hap Vidvox Hap
 V..... libx265 libx265 H.265 / HEVC (codec hevc)
 V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_amf AMD AMF HEVC encoder (codec hevc)
 V..... hevc_mf HEVC via MediaFoundation (codec hevc)
 V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)
 VF.... huffyuv Huffyuv / HuffYUV
 V..... jpeg2000 JPEG 2000
 VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)
 VF.... jpegls JPEG-LS
 VF.... ljpeg Lossless JPEG
 VF.... magicyuv MagicYUV video
 VFS... mjpeg MJPEG (Motion JPEG)
 V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)
 V.S... mpeg1video MPEG-1 video
 V.S... mpeg2video MPEG-2 video
 V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)
 V.S... mpeg4 MPEG-4 part 2
 V..... libxvid libxvidcore MPEG-4 part 2 (codec mpeg4)
 V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
 V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
 V..... msvideo1 Microsoft Video-1
 V..... pam PAM (Portable AnyMap) image
 V..... pbm PBM (Portable BitMap) image
 V..... pcx PC Paintbrush PCX image
 V..... pgm PGM (Portable GrayMap) image
 V..... pgmyuv PGMYUV (Portable GrayMap YUV) image
 VF.... png PNG (Portable Network Graphics) image
 V..... ppm PPM (Portable PixelMap) image
 VF.... prores Apple ProRes
 VF.... prores_aw Apple ProRes (codec prores)
 VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)
 V..... qtrle QuickTime Animation (RLE) video
 V..... r10k AJA Kona 10-bit RGB Codec
 V..... r210 Uncompressed RGB 10-bit
 V..... rawvideo raw video
 V..... roqvideo id RoQ video (codec roq)
 V..... rpza QuickTime video (RPZA)
 V..... rv10 RealVideo 1.0
 V..... rv20 RealVideo 2.0
 V..... sgi SGI image
 V..... snow Snow
 V..... sunrast Sun Rasterfile image
 V..... svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
 V..... targa Truevision Targa image
 V..... libtheora libtheora Theora (codec theora)
 VF.... tiff TIFF image
 VF.... utvideo Ut Video
 V..... v210 Uncompressed 4:2:2 10-bit
 V..... v308 Uncompressed packed 4:4:4
 V..... v408 Uncompressed packed QT 4:4:4:4
 V..... v410 Uncompressed 4:4:4 10-bit
 V..... libvpx libvpx VP8 (codec vp8)
 V..... libvpx-vp9 libvpx VP9 (codec vp9)
 V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9)
 V..... libwebp_anim libwebp WebP image (codec webp)
 V..... libwebp libwebp WebP image (codec webp)
 V..... wmv1 Windows Media Video 7
 V..... wmv2 Windows Media Video 8
 V..... wrapped_avframe AVFrame to AVPacket passthrough
 V..... xbm XBM (X BitMap) image
 V..... xface X-face image
 V..... xwd XWD (X Window Dump) image
 V..... y41p Uncompressed YUV 4:1:1 12-bit
 V..... yuv4 Uncompressed packed 4:2:0
 VF.... zlib LCL (LossLess Codec Library) ZLIB
 V..... zmbv Zip Motion Blocks Video
 A..... aac AAC (Advanced Audio Coding)
 A..... aac_mf AAC via MediaFoundation (codec aac)
 A..... ac3 ATSC A/52A (AC-3)
 A..... ac3_fixed ATSC A/52A (AC-3) (codec ac3)
 A..... ac3_mf AC3 via MediaFoundation (codec ac3)
 A..... adpcm_adx SEGA CRI ADX ADPCM
 A..... adpcm_argo ADPCM Argonaut Games
 A..... g722 G.722 ADPCM (codec adpcm_g722)
 A..... g726 G.726 ADPCM (codec adpcm_g726)
 A..... g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)
 A..... adpcm_ima_apm ADPCM IMA Ubisoft APM
 A..... adpcm_ima_qt ADPCM IMA QuickTime
 A..... adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive
 A..... adpcm_ima_wav ADPCM IMA WAV
 A..... adpcm_ms ADPCM Microsoft
 A..... adpcm_swf ADPCM Shockwave Flash
 A..... adpcm_yamaha ADPCM Yamaha
 A..... alac ALAC (Apple Lossless Audio Codec)
 A..... libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb)
 A..... libvo_amrwbenc Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band) (codec amr_wb)
 A..... aptx aptX (Audio Processing Technology for Bluetooth)
 A..... aptx_hd aptX HD (Audio Processing Technology for Bluetooth)
 A..... comfortnoise RFC 3389 comfort noise generator
 A..X.. dca DCA (DTS Coherent Acoustics) (codec dts)
 A..... eac3 ATSC A/52 E-AC-3
 A..... flac FLAC (Free Lossless Audio Codec)
 A..... g723_1 G.723.1
 A..... libgsm libgsm GSM (codec gsm)
 A..... libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)
 A..X.. mlp MLP (Meridian Lossless Packing)
 A..... mp2 MP2 (MPEG audio layer 2)
 A..... mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)
 A..... libtwolame libtwolame MP2 (MPEG audio layer 2) (codec mp2)
 A..... libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)
 A..... libshine libshine MP3 (MPEG audio layer 3) (codec mp3)
 A..... mp3_mf MP3 via MediaFoundation (codec mp3)
 A..... nellymoser Nellymoser Asao
 A..X.. opus Opus
 A..... libopus libopus Opus (codec opus)
 A..... pcm_alaw PCM A-law / G.711 A-law
 A..... pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media
 A..... pcm_f32be PCM 32-bit floating point big-endian
 A..... pcm_f32le PCM 32-bit floating point little-endian
 A..... pcm_f64be PCM 64-bit floating point big-endian
 A..... pcm_f64le PCM 64-bit floating point little-endian
 A..... pcm_mulaw PCM mu-law / G.711 mu-law
 A..... pcm_s16be PCM signed 16-bit big-endian
 A..... pcm_s16be_planar PCM signed 16-bit big-endian planar
 A..... pcm_s16le PCM signed 16-bit little-endian
 A..... pcm_s16le_planar PCM signed 16-bit little-endian planar
 A..... pcm_s24be PCM signed 24-bit big-endian
 A..... pcm_s24daud PCM D-Cinema audio signed 24-bit
 A..... pcm_s24le PCM signed 24-bit little-endian
 A..... pcm_s24le_planar PCM signed 24-bit little-endian planar
 A..... pcm_s32be PCM signed 32-bit big-endian
 A..... pcm_s32le PCM signed 32-bit little-endian
 A..... pcm_s32le_planar PCM signed 32-bit little-endian planar
 A..... pcm_s64be PCM signed 64-bit big-endian
 A..... pcm_s64le PCM signed 64-bit little-endian
 A..... pcm_s8 PCM signed 8-bit
 A..... pcm_s8_planar PCM signed 8-bit planar
 A..... pcm_u16be PCM unsigned 16-bit big-endian
 A..... pcm_u16le PCM unsigned 16-bit little-endian
 A..... pcm_u24be PCM unsigned 24-bit big-endian
 A..... pcm_u24le PCM unsigned 24-bit little-endian
 A..... pcm_u32be PCM unsigned 32-bit big-endian
 A..... pcm_u32le PCM unsigned 32-bit little-endian
 A..... pcm_u8 PCM unsigned 8-bit
 A..... pcm_vidc PCM Archimedes VIDC
 A..... real_144 RealAudio 1.0 (14.4K) (codec ra_144)
 A..... roq_dpcm id RoQ DPCM
 A..X.. s302m SMPTE 302M
 A..... sbc SBC (low-complexity subband codec)
 A..X.. sonic Sonic
 A..X.. sonicls Sonic lossless
 A..... libspeex libspeex Speex (codec speex)
 A..X.. truehd TrueHD
 A..... tta TTA (True Audio)
 A..X.. vorbis Vorbis
 A..... libvorbis libvorbis (codec vorbis)
 A..... wavpack WavPack
 A..... libwavpack (codec wavpack)
 A..... wmav1 Windows Media Audio 1
 A..... wmav2 Windows Media Audio 2
 S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)
 S..... ass ASS (Advanced SubStation Alpha) subtitle
 S..... dvbsub DVB subtitles (codec dvb_subtitle)
 S..... dvdsub DVD subtitles (codec dvd_subtitle)
 S..... mov_text 3GPP Timed Text subtitle
 S..... srt SubRip subtitle (codec subrip)
 S..... subrip SubRip subtitle
 S..... text Raw text subtitle
 S..... webvtt WebVTT subtitle
 S..... xsub DivX subtitles (XSUB)



Log output if i try using AAC encoder


<pre>object(FFMpeg\Exception\RuntimeException)#35 (7) {
 ["message":protected]=>
 string(15) "Encoding failed"
 ["string":"Exception":private]=>
 string(0) ""
 ["code":protected]=>
 int(0)
 ["file":protected]=>
 string(108) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php"
 ["line":protected]=>
 int(106)
 ["trace":"Exception":private]=>
 array(1) {
 [0]=>
 array(5) {
 ["file"]=>
 string(45) "C:\inetpub\wwwroot\dev\ffmpeg-lib\process.php"
 ["line"]=>
 int(35)
 ["function"]=>
 string(4) "save"
 ["class"]=>
 string(26) "FFMpeg\Media\AbstractVideo"
 ["type"]=>
 string(2) "->"
 }
 }
 ["previous":"Exception":private]=>
 object(Alchemy\BinaryDriver\Exception\ExecutionFailureException)#43 (9) {
 ["command":protected]=>
 string(393) "C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:17.00 -i "temp/temp_20201110-100656_1080p-220mb.mp4" -t 00:00:52.00 -threads 12 -vcodec libx264 -acodec aac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile "W:/TempIIS\ffmpeg-passes5fabd8bdf3612uvd6b/pass-5fabd8bdf378b" "temp/20201111-122741.mp4""
 ["errorOutput":protected]=>
 string(830102) "ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 10.2.1 (GCC) 20200805
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
 libavutil 56. 58.100 / 56. 58.100
 libavcodec 58.101.101 / 58.101.101
 libavformat 58. 51.101 / 58. 51.101
 libavdevice 58. 11.101 / 58. 11.101
 libavfilter 7. 87.100 / 7. 87.100
 libswscale 5. 8.100 / 5. 8.100
 libswresample 3. 8.100 / 3. 8.100
 libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/temp_20201110-100656_1080p-220mb.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 19529854
 compatible_brands: mp42isom
 creation_time : 2016-04-11T06:32:53.000000Z
 Duration: 00:02:25.98, start: 0.000000, bitrate: 13772 kb/s
 Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Sound Media Handler
 Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 13639 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2016-04-11T06:32:53.000000Z
 handler_name : Video Media Handler
 encoder : AVC Coding
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 000001fc5a9ce8c0] Sample rate index in program config element does not match the sample rate index configured by the container.
[h264 @ 000001fc5a3dac80] Invalid NAL unit size (-360624822 > 108076).
[h264 @ 000001fc5a3dac80] Error splitting the input into NAL units.
[aac @ 000001fc5a9ce8c0] Inconsistent channel configuration.
[aac @ 000001fc5a9ce8c0] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[aac @ 000001fc5a9ce8c0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 000001fc5a9ce8c0] Inconsistent channel configuration.
[aac @ 000001fc5a9ce8c0] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[aac @ 000001fc5a9ce8c0] channel element 2.15 is not allocated
Error while decoding stream #0:0: Invalid data found when processing input
[aac @ 000001fc5a9ce8c0] Sample rate index in program config element does not match the sample rate index configured by the container.
[aac @ 000001fc5a9ce8c0] Inconsistent channel configuration.
[aac @ 000001fc5a9ce8c0] get_buffer() failed
Error while decoding stream #0:0: Invalid argument
[h264 @ 000001fc5a3be480] Invalid NAL unit size (1926587749 > 39711).
[h264 @ 000001fc5a3be480] Error splitting the input into NAL units.
[h264 @ 000001fc5a3e4540] Invalid NAL unit size (-1483385910 > 21666).
[h264 @ 000001fc5a3e4540] Error splitting the input into NAL units.
[h264 @ 000001fc5ad06500] Invalid NAL unit size (1060193647 > 41388).
[h264 @ 000001fc5ad06500] Error splitting the input into NAL units.
Error while decoding stream #0:1: Invalid data found when processing input
[h264 @ 000001fc5ad22e80] Invalid NAL unit size (1499431567 > 26513).
</pre>


-
The use cases for a element in HTML
1er janvier 2014, par silviaThe W3C HTML WG and the WHATWG are currently discussing the introduction of a <main> element into HTML.
The <main> element has been proposed by Steve Faulkner and is specified in a draft extension spec which is about to be accepted as a FPWD (first public working draft) by the W3C HTML WG. This implies that the W3C HTML WG will be looking for implementations and for feedback by implementers on this spec.
I am supportive of the introduction of a <main> element into HTML. However, I believe that the current spec and use case list don’t make a good enough case for its introduction. Here are my thoughts.
Main use case : accessibility
In my opinion, the main use case for the introduction of <main> is accessibility.
Like any other users, when blind users want to perceive a Web page/application, they need to have a quick means of grasping the content of a page. Since they cannot visually scan the layout and thus determine where the main content is, they use accessibility technology (AT) to find what is known as “landmarks”.
“Landmarks” tell the user what semantic content is on a page : a header (such as a banner), a search box, a navigation menu, some asides (also called complementary content), a footer, …. and the most important part : the main content of the page. It is this main content that a blind user most often wants to skip to directly.
In the days of HTML4, a hidden “skip to content” link at the beginning of the Web page was used as a means to help blind users access the main content.
In the days of ARIA, the aria @role=main enables authors to avoid a hidden link and instead mark the element where the main content begins to allow direct access to the main content. This attribute is supported by AT – in particular screen readers – by making it part of the landmarks that AT can directly skip to.
Both the hidden link and the ARIA @role=main approaches are, however, band aids : they are being used by those of us that make “finished” Web pages accessible by adding specific extra markup.
A world where ARIA is not necessary and where accessibility developers would be out of a job because the normal markup that everyone writes already creates accessible Web sites/applications would be much preferable over the current world of band-aids.
Therefore, to me, the primary use case for a <main> element is to achieve exactly this better world and not require specialized markup to tell a user (or a tool) where the main content on a page starts.
An immediate effect would be that pages that have a <main> element will expose a “main” landmark to blind and vision-impaired users that will enable them to directly access that main content on the page without having to wade through other text on the page. Without a <main> element, this functionality can currently only be provided using heuristics to skip other semantic and structural elements and is for this reason not typically implemented in AT.
Other use cases
The <main> element is a semantic element not unlike other new semantic elements such as <header>, <footer>, <aside>, <article>, <nav>, or <section>. Thus, it can also serve other uses where the main content on a Web page/Web application needs to be identified.
Data mining
For data mining of Web content, the identification of the main content is one of the key challenges. Many scholarly articles have been published on this topic. This stackoverflow article references and suggests a multitude of approaches, but the accepted answer says “there’s no way to do this that’s guaranteed to work”. This is because Web pages are inherently complex and many <div>, <p>, <iframe> and other elements are used to provide markup for styling, notifications, ads, analytics and other use cases that are necessary to make a Web page complete, but don’t contribute to what a user consumes as semantically rich content. A <main> element will allow authors to pro-actively direct data mining tools to the main content.
Search engines
One particularly important “data mining” tool are search engines. They, too, have a hard time to identify which sections of a Web page are more important than others and employ many heuristics to do so, see e.g. this ACM article. Yet, they still disappoint with poor results pointing to findings of keywords in little relevant sections of a page rather than ranking Web pages higher where the keywords turn up in the main content area. A <main> element would be able to help search engines give text in main content areas a higher weight and prefer them over other areas of the Web page. It would be able to rank different Web pages depending on where on the page the search words are found. The <main> element will be an additional hint that search engines will digest.
Visual focus
On small devices, the display of Web pages designed for Desktop often causes confusion as to where the main content can be found and read, in particular when the text ends up being too small to be readable. It would be nice if browsers on small devices had a functionality (maybe a default setting) where Web pages would start being displayed as zoomed in on the main content. This could alleviate some of the headaches of responsive Web design, where the recommendation is to show high priority content as the first content. Right now this problem is addressed through stylesheets that re-layout the page differently depending on device, but again this is a band-aid solution. Explicit semantic markup of the main content can solve this problem more elegantly.
Styling
Finally, naturally, <main> would also be used to style the main content differently from others. You can e.g. replace a semantically meaningless <div id=”main”> with a semantically meaningful <main> where their position is identical. My analysis below shows, that this is not always the case, since oftentimes <div id=”main”> is used to group everything together that is not the header – in particular where there are multiple columns. Thus, the ease of styling a <main> element is only a positive side effect and not actually a real use case. It does make it easier, however, to adapt the style of the main content e.g. with media queries.
Proposed alternative solutions
It has been proposed that existing markup serves to satisfy the use cases that <main> has been proposed for. Let’s analyse these on some of the most popular Web sites. First let’s list the propsed algorithms.
Proposed solution No 1 : Scooby-Doo
On Sat, Nov 17, 2012 at 11:01 AM, Ian Hickson <ian@hixie.ch> wrote : | The main content is whatever content isn’t | marked up as not being main content (anything not marked up with <header>, | <aside>, <nav>, etc).
This implies that the first element that is not a <header>, <aside>, <nav>, or <footer> will be the element that we want to give to a blind user as the location where they should start reading. The algorithm is implemented in https://gist.github.com/4032962.
Proposed solution No 2 : First article element
On Sat, Nov 17, 2012 at 8:01 AM, Ian Hickson wrote : | On Thu, 15 Nov 2012, Ian Yang wrote : | > | > That’s a good idea. We really need an element to wrap all the <p>s, | > <ul>s, <ol>s, <figure>s, <table>s ... etc of a blog post. | | That’s called <article>.
This approach identifies the first <article> element on the page as containing the main content. Here’s the algorithm for this approach.
Proposed solution No 3 : An example heuristic approach
The readability plugin has been developed to make Web pages readable by essentially removing all the non-main content from a page. An early source of readability is available. This demonstrates what a heuristic approach can perform.
Analysing alternative solutions
Comparison
I’ve picked 4 typical Websites (top on Alexa) to analyse how these three different approaches fare. Ideally, I’d like to simply apply the above three scripts and compare pictures. However, since the semantic HTML5 elements <header>, <aside>, <nav>, and <footer> are not actually used by any of these Web sites, I don’t actually have this choice.
So, instead, I decided to make some assumptions of where these semantic elements would be used and what the outcome of applying the first two algorithms would be. I can then compare it to the third, which is a product so we can take screenshots.
Google.com
http://google.com – search for “Scooby Doo”.
The search results page would likely be built with :
- a <nav> menu for the Google bar
- a <header> for the search bar
- another <header> for the login section
- another <nav> menu for the search types
- a <div> to contain the rest of the page
- a <div> for the app bar with the search number
- a few <aside>s for the left and right column
- a set of <article>s for the search results
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element before the app bar in this case. Interestingly, there is a <div @id=main> already in the current Google results page, which “Scooby Doo” would likely also pick. However, there are a nav bar and two asides in this div, which clearly should not be part of the “main content”. Google actually placed a @role=main on a different element, namely the one that encapsulates all the search results.“First Article” would find the first search result as the “main content”. While not quite the same as what Google intended – namely all search results – it is close enough to be useful.
The “readability” result is interesting, since it is not able to identify the main text on the page. It is actually aware of this problem and brings a warning before displaying this page :
Facebook.com
A user page would likely be built with :
- a <header> bar for the search and login bar
- a <div> to contain the rest of the page
- an <aside> for the left column
- a <div> to contain the center and right column
- an <aside> for the right column
- a <header> to contain the center column “megaphone”
- a <div> for the status posting
- a set of <article>s for the home stream
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains all three columns. It’s actually a <div @id=content> already in the current Facebook user page, which “Scooby Doo” would likely also pick. However, Facebook selected a different element to place the @role=main : the center column.“First Article” would find the first news item in the home stream. This is clearly not what Facebook intended, since they placed the @role=main on the center column, above the first blog post’s title. “First Article” would miss that title and the status posting.
The “readability” result again disappoints but warns that it failed :
YouTube.com
A video page would likely be built with :
- a <header> bar for the search and login bar
- a <nav> for the menu
- a <div> to contain the rest of the page
- a <header> for the video title and channel links
- a <div> to contain the video with controls
- a <div> to contain the center and right column
- an <aside> for the right column with an <article> per related video
- an <aside> for the information below the video
- a <article> per comment below the video
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains the rest of the page. It’s actually a <div @id=content> already in the current YouTube video page, which “Scooby Doo” would likely also pick. However, YouTube’s related videos and comments are unlikely to be what the user would regard as “main content” – it’s the video they are after, which generously has a <div id=watch-player>.“First Article” would find the first related video or comment in the home stream. This is clearly not what YouTube intends.
The “readability” result is not quite as unusable, but still very bare :
Wikipedia.com
http://wikipedia.com (“Overscan” page)
A Wikipedia page would likely be built with :
- a <header> bar for the search, login and menu items
- a <div> to contain the rest of the page
- an &ls ; article> with title and lots of text
- <article> an <aside> with the table of contents
- several <aside>s for the left column
Good news : “Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains the rest of the page. It’s actually a <div id=”content” role=”main”> element on Wikipedia, which “Scooby Doo” would likely also pick.“First Article” would find the title and text of the main element on the page, but it would also include an <aside>.
The “readability” result is also in agreement.
Results
In the following table we have summarised the results for the experiments :
Site Scooby-Doo First article Readability Google.com FAIL SUCCESS FAIL Facebook.com FAIL FAIL FAIL YouTube.com FAIL FAIL FAIL Wikipedia.com SUCCESS SUCCESS SUCCESS Clearly, Wikipedia is the prime example of a site where even the simple approaches find it easy to determine the main content on the page. WordPress blogs are similarly successful. Almost any other site, including news sites, social networks and search engine sites are petty hopeless with the proposed approaches, because there are too many elements that are used for layout or other purposes (notifications, hidden areas) such that the pre-determined list of semantic elements that are available simply don’t suffice to mark up a Web page/application completely.
Conclusion
It seems that in general it is impossible to determine which element(s) on a Web page should be the “main” piece of content that accessibility tools jump to when requested, that a search engine should put their focus on, or that should be highlighted to a general user to read. It would be very useful if the author of the Web page would provide a hint through a <main> element where that main content is to be found.
I think that the <main> element becomes particularly useful when combined with a default keyboard shortcut in browsers as proposed by Steve : we may actually find that non-accessibility users will also start making use of this shortcut, e.g. to get to videos on YouTube pages directly without having to tab over search boxes and other interactive elements, etc. Worthwhile markup indeed.
-
The use cases for a element in HTML
1er janvier 2014, par silviaThe W3C HTML WG and the WHATWG are currently discussing the introduction of a <main> element into HTML.
The <main> element has been proposed by Steve Faulkner and is specified in a draft extension spec which is about to be accepted as a FPWD (first public working draft) by the W3C HTML WG. This implies that the W3C HTML WG will be looking for implementations and for feedback by implementers on this spec.
I am supportive of the introduction of a <main> element into HTML. However, I believe that the current spec and use case list don’t make a good enough case for its introduction. Here are my thoughts.
Main use case : accessibility
In my opinion, the main use case for the introduction of <main> is accessibility.
Like any other users, when blind users want to perceive a Web page/application, they need to have a quick means of grasping the content of a page. Since they cannot visually scan the layout and thus determine where the main content is, they use accessibility technology (AT) to find what is known as “landmarks”.
“Landmarks” tell the user what semantic content is on a page : a header (such as a banner), a search box, a navigation menu, some asides (also called complementary content), a footer, …. and the most important part : the main content of the page. It is this main content that a blind user most often wants to skip to directly.
In the days of HTML4, a hidden “skip to content” link at the beginning of the Web page was used as a means to help blind users access the main content.
In the days of ARIA, the aria @role=main enables authors to avoid a hidden link and instead mark the element where the main content begins to allow direct access to the main content. This attribute is supported by AT – in particular screen readers – by making it part of the landmarks that AT can directly skip to.
Both the hidden link and the ARIA @role=main approaches are, however, band aids : they are being used by those of us that make “finished” Web pages accessible by adding specific extra markup.
A world where ARIA is not necessary and where accessibility developers would be out of a job because the normal markup that everyone writes already creates accessible Web sites/applications would be much preferable over the current world of band-aids.
Therefore, to me, the primary use case for a <main> element is to achieve exactly this better world and not require specialized markup to tell a user (or a tool) where the main content on a page starts.
An immediate effect would be that pages that have a <main> element will expose a “main” landmark to blind and vision-impaired users that will enable them to directly access that main content on the page without having to wade through other text on the page. Without a <main> element, this functionality can currently only be provided using heuristics to skip other semantic and structural elements and is for this reason not typically implemented in AT.
Other use cases
The <main> element is a semantic element not unlike other new semantic elements such as <header>, <footer>, <aside>, <article>, <nav>, or <section>. Thus, it can also serve other uses where the main content on a Web page/Web application needs to be identified.
Data mining
For data mining of Web content, the identification of the main content is one of the key challenges. Many scholarly articles have been published on this topic. This stackoverflow article references and suggests a multitude of approaches, but the accepted answer says “there’s no way to do this that’s guaranteed to work”. This is because Web pages are inherently complex and many <div>, <p>, <iframe> and other elements are used to provide markup for styling, notifications, ads, analytics and other use cases that are necessary to make a Web page complete, but don’t contribute to what a user consumes as semantically rich content. A <main> element will allow authors to pro-actively direct data mining tools to the main content.
Search engines
One particularly important “data mining” tool are search engines. They, too, have a hard time to identify which sections of a Web page are more important than others and employ many heuristics to do so, see e.g. this ACM article. Yet, they still disappoint with poor results pointing to findings of keywords in little relevant sections of a page rather than ranking Web pages higher where the keywords turn up in the main content area. A <main> element would be able to help search engines give text in main content areas a higher weight and prefer them over other areas of the Web page. It would be able to rank different Web pages depending on where on the page the search words are found. The <main> element will be an additional hint that search engines will digest.
Visual focus
On small devices, the display of Web pages designed for Desktop often causes confusion as to where the main content can be found and read, in particular when the text ends up being too small to be readable. It would be nice if browsers on small devices had a functionality (maybe a default setting) where Web pages would start being displayed as zoomed in on the main content. This could alleviate some of the headaches of responsive Web design, where the recommendation is to show high priority content as the first content. Right now this problem is addressed through stylesheets that re-layout the page differently depending on device, but again this is a band-aid solution. Explicit semantic markup of the main content can solve this problem more elegantly.
Styling
Finally, naturally, <main> would also be used to style the main content differently from others. You can e.g. replace a semantically meaningless <div id=”main”> with a semantically meaningful <main> where their position is identical. My analysis below shows, that this is not always the case, since oftentimes <div id=”main”> is used to group everything together that is not the header – in particular where there are multiple columns. Thus, the ease of styling a <main> element is only a positive side effect and not actually a real use case. It does make it easier, however, to adapt the style of the main content e.g. with media queries.
Proposed alternative solutions
It has been proposed that existing markup serves to satisfy the use cases that <main> has been proposed for. Let’s analyse these on some of the most popular Web sites. First let’s list the propsed algorithms.
Proposed solution No 1 : Scooby-Doo
On Sat, Nov 17, 2012 at 11:01 AM, Ian Hickson <ian@hixie.ch> wrote : | The main content is whatever content isn’t | marked up as not being main content (anything not marked up with <header>, | <aside>, <nav>, etc).
This implies that the first element that is not a <header>, <aside>, <nav>, or <footer> will be the element that we want to give to a blind user as the location where they should start reading. The algorithm is implemented in https://gist.github.com/4032962.
Proposed solution No 2 : First article element
On Sat, Nov 17, 2012 at 8:01 AM, Ian Hickson wrote : | On Thu, 15 Nov 2012, Ian Yang wrote : | > | > That’s a good idea. We really need an element to wrap all the <p>s, | > <ul>s, <ol>s, <figure>s, <table>s ... etc of a blog post. | | That’s called <article>.
This approach identifies the first <article> element on the page as containing the main content. Here’s the algorithm for this approach.
Proposed solution No 3 : An example heuristic approach
The readability plugin has been developed to make Web pages readable by essentially removing all the non-main content from a page. An early source of readability is available. This demonstrates what a heuristic approach can perform.
Analysing alternative solutions
Comparison
I’ve picked 4 typical Websites (top on Alexa) to analyse how these three different approaches fare. Ideally, I’d like to simply apply the above three scripts and compare pictures. However, since the semantic HTML5 elements <header>, <aside>, <nav>, and <footer> are not actually used by any of these Web sites, I don’t actually have this choice.
So, instead, I decided to make some assumptions of where these semantic elements would be used and what the outcome of applying the first two algorithms would be. I can then compare it to the third, which is a product so we can take screenshots.
Google.com
http://google.com – search for “Scooby Doo”.
The search results page would likely be built with :
- a <nav> menu for the Google bar
- a <header> for the search bar
- another <header> for the login section
- another <nav> menu for the search types
- a <div> to contain the rest of the page
- a <div> for the app bar with the search number
- a few <aside>s for the left and right column
- a set of <article>s for the search results
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element before the app bar in this case. Interestingly, there is a <div @id=main> already in the current Google results page, which “Scooby Doo” would likely also pick. However, there are a nav bar and two asides in this div, which clearly should not be part of the “main content”. Google actually placed a @role=main on a different element, namely the one that encapsulates all the search results.“First Article” would find the first search result as the “main content”. While not quite the same as what Google intended – namely all search results – it is close enough to be useful.
The “readability” result is interesting, since it is not able to identify the main text on the page. It is actually aware of this problem and brings a warning before displaying this page :
Facebook.com
A user page would likely be built with :
- a <header> bar for the search and login bar
- a <div> to contain the rest of the page
- an <aside> for the left column
- a <div> to contain the center and right column
- an <aside> for the right column
- a <header> to contain the center column “megaphone”
- a <div> for the status posting
- a set of <article>s for the home stream
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains all three columns. It’s actually a <div @id=content> already in the current Facebook user page, which “Scooby Doo” would likely also pick. However, Facebook selected a different element to place the @role=main : the center column.“First Article” would find the first news item in the home stream. This is clearly not what Facebook intended, since they placed the @role=main on the center column, above the first blog post’s title. “First Article” would miss that title and the status posting.
The “readability” result again disappoints but warns that it failed :
YouTube.com
A video page would likely be built with :
- a <header> bar for the search and login bar
- a <nav> for the menu
- a <div> to contain the rest of the page
- a <header> for the video title and channel links
- a <div> to contain the video with controls
- a <div> to contain the center and right column
- an <aside> for the right column with an <article> per related video
- an <aside> for the information below the video
- a <article> per comment below the video
“Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains the rest of the page. It’s actually a <div @id=content> already in the current YouTube video page, which “Scooby Doo” would likely also pick. However, YouTube’s related videos and comments are unlikely to be what the user would regard as “main content” – it’s the video they are after, which generously has a <div id=watch-player>.“First Article” would find the first related video or comment in the home stream. This is clearly not what YouTube intends.
The “readability” result is not quite as unusable, but still very bare :
Wikipedia.com
http://wikipedia.com (“Overscan” page)
A Wikipedia page would likely be built with :
- a <header> bar for the search, login and menu items
- a <div> to contain the rest of the page
- an &ls ; article> with title and lots of text
- <article> an <aside> with the table of contents
- several <aside>s for the left column
Good news : “Scooby Doo” would find the first element after the headers as the “main content”. This is the element that contains the rest of the page. It’s actually a <div id=”content” role=”main”> element on Wikipedia, which “Scooby Doo” would likely also pick.“First Article” would find the title and text of the main element on the page, but it would also include an <aside>.
The “readability” result is also in agreement.
Results
In the following table we have summarised the results for the experiments :
Site Scooby-Doo First article Readability Google.com FAIL SUCCESS FAIL Facebook.com FAIL FAIL FAIL YouTube.com FAIL FAIL FAIL Wikipedia.com SUCCESS SUCCESS SUCCESS Clearly, Wikipedia is the prime example of a site where even the simple approaches find it easy to determine the main content on the page. WordPress blogs are similarly successful. Almost any other site, including news sites, social networks and search engine sites are petty hopeless with the proposed approaches, because there are too many elements that are used for layout or other purposes (notifications, hidden areas) such that the pre-determined list of semantic elements that are available simply don’t suffice to mark up a Web page/application completely.
Conclusion
It seems that in general it is impossible to determine which element(s) on a Web page should be the “main” piece of content that accessibility tools jump to when requested, that a search engine should put their focus on, or that should be highlighted to a general user to read. It would be very useful if the author of the Web page would provide a hint through a <main> element where that main content is to be found.
I think that the <main> element becomes particularly useful when combined with a default keyboard shortcut in browsers as proposed by Steve : we may actually find that non-accessibility users will also start making use of this shortcut, e.g. to get to videos on YouTube pages directly without having to tab over search boxes and other interactive elements, etc. Worthwhile markup indeed.