
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (61)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (9478)
-
FFmpeg 6.0 won't work because the header files can't connect or interact with each other. How do I fix the files ?
11 septembre 2023, par Señor TontoI am creating a win32 API C++ application with Microsoft Visual Studio 2022 in a .sln file. I've got quite far in basic functionalities & decided to try out video decoding & playing ; I've practiced this before but not with C++. So, I looked to see good libraries & found FFmpeg. Of course, I thought this would be quite straightforward - just import the headers & code, right ? No. Firstly, the FFmpeg I'm using is one of the pre-built binaries. The 'ffmpeg-master-latest-win64-gpl-shared.zip' From the BtbN Github repository. I decompressed it with WinRar & placed the files in Program Files (x86). Later on, I realised my mistake of placing it with 32-bit programs since it's a 64-bit build. So I transferred it to Program Files. Even after this though my issue persists. The issue being that the .h files of FFmpeg cannot communicate with each other. For some reason, they can't navigate to where the header files are. I am quite sure the reason for this may have something to do with where I save the files, the directory. Nowhere on the FFmpeg website can I see where you're expected to have the file directory at. I am sure there's a preset file path that is expected. Maybe I've named the FFmpeg folder incorrectly ? Or maybe it's not meant to go in Program Files ? The current directory for the FFmpeg folder for me is : C :\Program Files\FFmpeg. Below I will provide pictures of the errors I get where the code can't connect to other .h files as well as the file path. I'll also provide my code.


#include //imports the main win32 API library
#include //imports macros for handling Unicode & ASCII char sets
#include //defines the common control classes
#include //imports the standard C library
#include 
#include 
#include <iostream>
#include <fstream>
#include <string>

extern "C"
{
#include 
#include 
#include 
#include 
}

#pragma comment(lib, "Comctl32.lib") //tells the linker to include Comctl32.lib in the .exe
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avcodec.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avformat.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\avutil.lib")
#pragma comment(lib, "C:\\Program Files\\FFmpeg\\lib\\swscale.lib")

#define EDIT_CONTROL 1
#define OPEN_FILE_BTN 2
#define SAVE_FILE_BTN 3
#define EMBOLDEN_BTN 4
#define ITALICISE_BTN 5
#define SCROLL_CONTAINER 6
#define FILEMENU_OPEN_FILE_BTN 7
#define ADD_ROW_BTN 8
#define CELL_1_ID 9
#define CELL_2_ID 10
#define CELL_3_ID 11
#define SCROLL_CONTAINER_TBL 12
// 946 0759 0609 | 163 739

HINSTANCE g_hInstance;
HWND g_hWndMain, g_hWndTabs, openFileBtn, saveFileBtn, hOpenFileEdit, hScrollContainer, hEditControl, tabHandle, emboldenBtn, italiciseBtn, FilemenuOpenFileBtn, tableContainer, tblHeaderOne,
tblHeaderTwo, tblHeaderThree, addRowBtn, hAddRowDialogue, hWnd, hWndCell1Label, hWndCell1Edit, hWndCell2Label, hWndCell2Edit, hWndCell3Label, hWndCell3Edit, hWndOkButton, hWndCancelButton, hRow, hCell1, hCell2, hCell3,
hWMP, OpenMp4Btn, hWMPContainer, hPlayBtn;
HMENU hMenu, hSubMenu;
bool isBold = false, isItalic = false;


const int startX = 0;
const int startY = 60;
const int ROW_HEIGHT = 20;
const int CELL_WIDTH = 110;
static int numRows = 1;
static int numCols = 3;

LRESULT CALLBACK WindowProcessMessages(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK AddRowDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);

int WINAPI wWinMain(
 _In_ HINSTANCE currentInstance,
 _In_opt_ HINSTANCE previousInstance,
 _In_ LPWSTR cmdLine,
 _In_ int cmdCount)
{
 const wchar_t* CLASS_NAME = L"Windows App";
 WNDCLASS wc{};
 wc.hInstance = currentInstance;
 wc.lpszClassName = CLASS_NAME;
 wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
 wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
 wc.lpfnWndProc = WindowProcessMessages;
 RegisterClass(&wc);

 g_hWndMain = CreateWindow(CLASS_NAME, L"Windows App",
 WS_OVERLAPPEDWINDOW,
 CW_USEDEFAULT, CW_USEDEFAULT,
 800, 600,
 nullptr, nullptr, nullptr, nullptr);

 if (g_hWndMain == NULL) {
 return 0;
 }

 // Initialize common controls
 INITCOMMONCONTROLSEX icex;
 icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
 icex.dwICC = ICC_TAB_CLASSES;
 InitCommonControlsEx(&icex);

 // Create tab control
 g_hWndTabs = CreateWindow(WC_TABCONTROL, L"",
 WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | TCS_SINGLELINE,
 0, 0, 800, 600,
 g_hWndMain, nullptr, currentInstance, nullptr);

 if (g_hWndTabs == NULL) {
 return 0;
 }

 // Add tabs to tab control, seperate tab later
 TCITEM tcitem;
 tcitem.mask = TCIF_TEXT;

 wchar_t buf1[] = L"Table View";
 tcitem.pszText = buf1;
 TabCtrl_InsertItem(g_hWndTabs, 0, &tcitem);

 wchar_t buf2[] = L"Text Files";
 tcitem.pszText = buf2;
 TabCtrl_InsertItem(g_hWndTabs, 1, &tcitem);

 wchar_t buf3[] = L"mp4 Files";
 tcitem.pszText = buf3;
 TabCtrl_InsertItem(g_hWndTabs, 2, &tcitem);



 //original location of button intitialisation


 ShowWindow(g_hWndMain, SW_SHOWDEFAULT);
 UpdateWindow(g_hWndMain);

 MSG msg{};
 while (GetMessage(&msg, nullptr, 0, 0)) {
 TranslateMessage(&msg);
 DispatchMessage(&msg);
 }
 return 0;
}

</string></fstream></iostream>


I severely doubt my code has anything to do with the issue though. It's probably directory-based. I just placed wWinmain here to keep with the character limit.






-
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>


-
ffmpeg drops every frame except the first
3 juin 2021, par lpaseenI'm trying to make an app that currently works fine on ubuntu 16.04 to run on ubuntu 20.04.
The setup is that :


- 

- v4l2loopback is used to create 4 new video devices - video[2345]
- it's a webcamera on /dev/video0
- this camera is split to /dev/video2,3
with








gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! tee name=rec ! queue ! v4l2sink device=/dev/video2 rec. ! queue ! v4l2sink device=/dev/video3



- 

- next it's a ffmpeg command that takes the input and streams it to a websocket




ffmpeg -video_size 640x480 -framerate 30 -f video4linux2 -i /dev/video2 -f mpegts -codec:v mpeg1video -s 640x480 -b:v 800k -bf 0 -r 30 -vf scale=640:480 http://localhost:8016/thepassword/640/480/



This works fine under ubuntu 16.04 but with 20.04 it drops every frame after the first one, and the first frame is only sent out the stream once it exits.


root@lab16:~# ffmpeg -v 40 -video_size 640x480 -framerate 30 -f video4linux2 -i /dev/video2 -f mpegts -codec:v mpeg1video -s 640x480 -b:v 800k -bf 0 -r 30 -vf scale=640:480 http://localhost:8016/thepassword/640/480/
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
[video4linux2,v4l2 @ 0x556a62441940] fd:3 capabilities:85208003
[video4linux2,v4l2 @ 0x556a62441940] The driver does not permit changing the time per frame
Input #0, video4linux2,v4l2, from '/dev/video2':
 Duration: N/A, start: 45841.354189, bitrate: 147456 kb/s
 Stream #0:0: Video: rawvideo, 1 reference frame (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[tcp @ 0x556a6244c280] Starting connection attempt to 127.0.0.1 port 8016
[tcp @ 0x556a6244c280] Successfully connected to 127.0.0.1 port 8016
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x556a62457680] w:640 h:480 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x556a62458200] w:640 h:480 pixfmt:yuyv422 tb:1/1000000 fr:30/1 sar:0/1 sws_param:flags=2
[scaler_out_0_0 @ 0x556a62459580] w:640 h:480 flags:'bicubic' interl:0
[Parsed_scale_0 @ 0x556a62457680] w:640 h:480 fmt:yuyv422 sar:0/1 -> w:640 h:480 fmt:yuyv422 sar:0/1 flags:0x4
[scaler_out_0_0 @ 0x556a62459580] w:640 h:480 fmt:yuyv422 sar:0/1 -> w:640 h:480 fmt:yuv420p sar:0/1 flags:0x4
[mpegts @ 0x556a624454c0] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'http://localhost:8016/thepassword/640/480/':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: mpeg1video, 1 reference frame, yuv420p, 640x480, q=2-31, 800 kb/s, 30 fps, 90k tbn, 30 tbc
 Metadata:
 encoder : Lavc58.54.100 mpeg1video
 Side data:
 cpb: bitrate max/min/avg: 0/0/800000 buffer size: 0 vbv_delay: -1
*** dropping frame 1 from stream 0 at ts -1319706
*** dropping frame 1 from stream 0 at ts -1319705
*** dropping frame 1 from stream 0 at ts -1319704
*** dropping frame 1 from stream 0 at ts -1319703
*** dropping frame 1 from stream 0 at ts -1319702
*** dropping frame 1 from stream 0 at ts -1319701
*** dropping frame 1 from stream 0 at ts -1319700
*** dropping frame 1 from stream 0 at ts -1319699
*** dropping frame 1 from stream 0 at ts -1319698
*** dropping frame 1 from stream 0 at ts -1319697
*** dropping frame 1 from stream 0 at ts -1319696
*** dropping frame 1 from stream 0 at ts -1319695
*** dropping frame 1 from stream 0 at ts -1319694
*** dropping frame 1 from stream 0 at ts -1319693
*** dropping frame 1 from stream 0 at ts -1319692:00:00.00 bitrate=N/A dup=0 drop=14 speed= 0x
*** dropping frame 1 from stream 0 at ts -1319691
*** dropping frame 1 from stream 0 at ts -1319690
*** dropping frame 1 from stream 0 at ts -1319689
*** dropping frame 1 from stream 0 at ts -1319688
*** dropping frame 1 from stream 0 at ts -1319687
frame= 1 fps=0.0 q=3.4 Lsize= 11kB time=00:00:00.00 bitrate=7930181.8kbits/s dup=0 drop=21 speed=1.49e-05x
video:9kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.335412%
Input file #0 (/dev/video2):
 Input stream #0:0 (video): 22 packets read (13516800 bytes); 22 frames decoded;
 Total: 22 packets (13516800 bytes) demuxed
Output file #0 (http://localhost:8016/thepassword/640/480/):
 Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (9621 bytes);
 Total: 1 packets (9621 bytes) muxed
[AVIOContext @ 0x556a62454b80] Statistics: 0 seeks, 1 writeouts



(I hit "q" to end it)


If I stop gst-launch and use same command to read from the real device (/dev/video0) it all works.


If I run
DISPLAY=:0 ffplay /dev/video0
I get a streaming video on the screen

I tried reducing options in the ffmpeg command but even going down to what I guess is the minimum of


ffmpeg -f video4linux2 -i /dev/video2 -f mpeg1video http://localhost:8016/thepassword/640/480/



it still drops all frames.


I can get it all to work by using ffmpeg to split it instead of gst-launch so doing


ffmpeg -f video4linux2 -i /dev/video0 -codec copy -f v4l2 /dev/video3 -codec copy -f v4l2 /dev/video4



then all works except that I dunno how reliable that is on 16.04 and it requires a lot of code changes (ffmpeg output is very different from gst-launch)


I was hoping to just add a flag/plugin or something to the gst-launch/ffmpeg command to get it to work. Any chance that I can do that or is replacing gst-launch with ffmpeg the only option ?