Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to Add PulseAudio Server to quay.io/browser/google-chrome-stable Docker Image for Audio Support with Screen Recording ?
17 avril, par Ahmed Seddik BouchibaI’m trying to set up an environment for recording the screen of a Chrome browser running in a Docker container, and I need to enable audio support. I’m using the quay.io/browser/google-chrome-stable:133.0.6943.98-6 image for the browser and quay.io/aerokube/xvfb:21.1 for the virtual framebuffer to capture the screen.
However, I’m facing an issue where audio is not supported in the Chrome Docker image, which I need for recording. The setup involves using FFmpeg in a separate container to stream the recorded video, but without audio from the browser, this setup isn’t complete.
I’m looking for guidance on how to add a PulseAudio server to the Chrome image to enable audio support. Specifically:
How can I configure the Docker image quay.io/browser/google-chrome-stable:133.0.6943.98-6 to support PulseAudio? Are there any considerations or best practices when adding PulseAudio to a headless browser Docker container? Is it possible to run the PulseAudio server in a separate container and link it to the Chrome container, or should it be included directly in the Chrome container?
Any help on adding PulseAudio support to this Chrome Docker image would be greatly appreciated!
Additional Context:
The goal is to run a headless Chrome browser with audio support to record the browser’s activities (both video and audio) and stream it using FFmpeg. I’m using Docker Compose to orchestrate the containers but haven’t figured out how to integrate PulseAudio into the setup effectively.
Thanks in advance!
-
flutter integration with ffmpeg package for video stream recording using rtsp url
16 avril, par Brijesh GangwarLaunching lib\main.dart on SM X115 in debug mode... C:\Users\hp\AppData\Local\Pub\Cache\hosted\pub.dev\ffmpeg_kit_flutter_full_gpl-6.0.3\android\src\main\java\com\arthenica\ffmpegkit\flutter\FFmpegKitFlutterPlugin.java:157: error: cannot find symbol public static void registerWith(final io.flutter.plugin.common.PluginRegistry.Registrar registrar) { ^ symbol: class Registrar location: interface PluginRegistry C:\Users\hp\AppData\Local\Pub\Cache\hosted\pub.dev\ffmpeg_kit_flutter_full_gpl-6.0.3\android\src\main\java\com\arthenica\ffmpegkit\flutter\FFmpegKitFlutterPlugin.java:651: error: cannot find symbol protected void init(final BinaryMessenger messenger, final Context context, final Activity activity, final io.flutter.plugin.common.PluginRegistry.Registrar registrar, final ActivityPluginBinding activityBinding) { ^ symbol: class Registrar location: interface PluginRegistry 2 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':ffmpeg_kit_flutter_full_gpl:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. * Try: > Run with --info option to get more log output. > Run with --scan to get full insights. BUILD FAILED in 15s ┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────┐ │ [!] Consult the error logs above to identify any broken plugins, specifically those containing │ │ "error: cannot find symbol..." │ │ This issue is likely caused by v1 embedding removal and the plugin's continued usage of removed │ │ references to the v1 embedding. │ │ To fix this error, please upgrade your current package's dependencies to latest versions by │ │ running `flutter pub upgrade`. │ │ If that does not work, please file an issue for the problematic plugin(s) here: │ │ https://github.com/flutter/flutter/issues │ └─────────────────────────────────────────────────────────────────────────────────────────────────┘ Error: Gradle task assembleDebug failed with exit code 1 Exited (1).
how to solve this
I tried to use
widget_record_video
package instead but it is still depended on flutter ffmpeg package. I have already tried to install app on real device. Help me out to solve this error -
FFMPEG with D3D11 hw acceleration : How to copy DirectX texture to OpenGL ?
16 avril, par imikboxI'm decoding a video using FFMPEG with the D3D11 video acceleration. I want to display the decoded frames in my GUI, for which I use OpenGL for rendering. I want to avoid copying the decoded frame back to system memory. So my goal is to copy/map the ID3D11Texture2D which I get from FFMPEG directly to an OpenGL texture. There exists an OpenGL extension for this purpose (WGL_NV_DX_interop and WGL_NV_DX_interop2).
However, I don't get it running. Here is my code so far (stripped down):
// create texture, to be used later in DirectX GLuint texture_opengl; glGenTextures(1, &texture_opengl); // .. and set the usual parameters for it // setup WGL_NV_DX_interop extension AVBufferRef* hw_device_ctx_buffer = decoder_ctx->hw_device_ctx; AVHWDeviceContext* hw_device_ctx = (AVHWDeviceContext*)hw_device_ctx_buffer->data; AVD3D11VADeviceContext* hw_d3d11_dev_ctx = (AVD3D11VADeviceContext*)hw_device_ctx->hwctx; HANDLE device_handle = wglDXOpenDeviceNV(hw_d3d11_dev_ctx->device); // create intermediate texture D3D11_TEXTURE2D_DESC pDes{}; ZeroMemory(&pDes, sizeof(pDes)); pDes.Width = frame->width; pDes.Height = frame->height; pDes.ArraySize = 1; pDes.MipLevels = 1; pDes.Format = DXGI_FORMAT_NV12; pDes.SampleDesc.Count = 1; pDes.SampleDesc.Quality = 0; pDes.Usage = D3D11_USAGE_DEFAULT; pDes.BindFlags = D3D11_BIND_UNORDERED_ACCESS; pDes.CPUAccessFlags = 0; pDes.MiscFlags = 0; ID3D11Texture2D* texture_D3D11; hw_d3d11_dev_ctx->device->CreateTexture2D(&pDes, NULL, &texture_D3D11); // connect opengl and directx textures HANDLE hRegisterObject = wglDXRegisterObjectNV( device_handle, texture_D3D11, texture_opengl, GL_TEXTURE_2D, WGL_ACCESS_READ_WRITE_NV ); // run loop and display video while(..) { // read packets from video file and send it to decoder // receive frame from decoder avcodec_receive_frame(decoder_ctx, frame); // get DirectX objects from frame ID3D11Texture2D* hwTexture = (ID3D11Texture2D*)frame->data[0]; intptr_t texture_array_index = (intptr_t)frame->data[1]; // copy frame texture to intermediate texture hw_d3d11_dev_ctx->device_context->CopySubresourceRegion( texture_D3D11, 0, 0, 0, 0, hwTexture, texture_array_index, NULL ); }
After copying the contents from the FFMPEG frame to my intermediate texture
texture_directx
, I expect that I can display the data with the OpenGL texturetexture_opengl
. However, this texture is empty. I also don`t see any copy activity in the resource monitor of the GPU.Anyone out there who has done this or might see an error in my approach?
I left out any consideration of handling the NV12 format. For now, it's sufficient for me to just copy the luminance part of the frame.
-
ffmpeg gets the wrong color_range [closed]
16 avril, par RemsI have videos with incorrect color_range information. Their mediainfo is like this:
Color range : Limited
color_range_Original : FullThe video is indeed limited, and one of our editing tools, for unknown reasons, adds this color_range_Original tag. The problem is that when ffmpeg processes these videos, it sees the color range as Full. It retrieves the wrong information, which can lead to problems and color loss later on. I know it's possible to specify to ffmpeg the input range with the scale filter, but in this workflow I don't re-encode the videos, so I can't use filters.
Is there another way to specify the input range to ffmpeg? Thanks
-
ffmpeg extensionless ts file [closed]
15 avril, par Erv00I want to download a video file that is streamed with HLS.
Unfortunately, the .m3u8 file references the segments that have no extension, and thus the HLS demuxer throws the following error:detected format mpegts extension none mismatches allowed extensions in url
The url is like
https://example.com/segment3
I have tried to allow all extensions with
-allowed_extensions ALL,none
, but this does not work.
My question is, how can I make this work, without having to download all segments by hand?