
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (36)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (6519)
-
5 Top Google Optimize Alternatives to Consider
17 mars 2023, par Erin — Analytics Tips -
ffmpeg use gpu to encode mpeg4 to ts/m3u8 [closed]
14 novembre 2024, par danielRICADOusing ffmpeg I want to trim and transcode a mpeg4 from ts / m3u8


std::string ffmpeg_command = "ffmpeg -hwaccel drm -i " + output_dir + input_file +
 " -ss 00:00:00.00 -t 31 -c:v " + codec + " -b:v " + std::to_string(bitrate) +
 " -vf scale=" + std::to_string(width) + "x" + std::to_string(height) +
 " -hls_time " + std::to_string(30) + " -hls_list_size 0 -hls_segment_filename " +
 ts_file_pattern + " -f hls " + m3u8_file;



I wanted to choose between codecs based on the system, if gpu is avaiable I'd like to opt to use it, right now I just check if the codec is available


bool is_h264_v4l2m2m_available() {
 std::string result = exec_command("ffmpeg -encoders 2>&1");
 return result.find("h264_v4l2m2m") != std::string::npos;
}



if it is a I wanted to move that process over to the gpu, not just use libx264. Here is the error log. Studying hard on the solution but wold super apperciate any expert advice.


other considerations are - runs in a docker container on a pi5, pibian on the host apline on in the container, container runs in privledged mode


2024-11-14 15:18:41 [INFO]: assigned codec: h264_v4l2m2m
2024-11-14 15:18:41 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
2024-11-14 15:18:41 built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309
2024-11-14 15:18:41 configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl
2024-11-14 15:18:41 libavutil 58. 29.100 / 58. 29.100
2024-11-14 15:18:41 libavcodec 60. 31.102 / 60. 31.102
2024-11-14 15:18:41 libavformat 60. 16.100 / 60. 16.100
2024-11-14 15:18:41 libavdevice 60. 3.100 / 60. 3.100
2024-11-14 15:18:41 libavfilter 9. 12.100 / 9. 12.100
2024-11-14 15:18:41 libswscale 7. 5.100 / 7. 5.100
2024-11-14 15:18:41 libswresample 4. 12.100 / 4. 12.100
2024-11-14 15:18:41 libpostproc 57. 3.100 / 57. 3.100
2024-11-14 15:18:42 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/app/client-data/camera-output/7ea3cbef-4da0-11ed-bdcc-baf70a43c072/1731550687270.mp4':
2024-11-14 15:18:42 Metadata:
2024-11-14 15:18:42 major_brand : isom
2024-11-14 15:18:42 minor_version : 512
2024-11-14 15:18:42 compatible_brands: isomiso2avc1mp41
2024-11-14 15:18:42 encoder : Lavf60.16.100
2024-11-14 15:18:42 Duration: 00:00:31.33, start: 0.000000, bitrate: 678 kb/s
2024-11-14 15:18:42 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1024, 677 kb/s, 15 fps, 15 tbr, 15360 tbn (default)
2024-11-14 15:18:42 Metadata:
2024-11-14 15:18:42 handler_name : VideoHandler
2024-11-14 15:18:42 vendor_id : [0][0][0][0]
2024-11-14 15:18:42 [AVFormatContext @ 0x7f9254dcb4c0] Unable to choose an output format for '678000'; use a standard extension for the filename or specify the format manually.
2024-11-14 15:18:42 [out#0 @ 0x7f9254d70700] Error initializing the muxer for 678000: Invalid argument
2024-11-14 15:18:42 Error opening output file 678000.
2024-11-14 15:18:42 Error opening output files: Invalid argument
2024-11-14 15:18:42 [ERROR]: Failed to generate .ts file for: 1731550687270.mp4



-
FFMPEG update from 5.0 to 6.0 out_0_0 buffer queued [closed]
16 mai 2023, par KevittoI've been using ffmpeg 5.0 for some time, encoding an audio stream to an rtp server, but since I updated to ffmpeg 6.0 I get this :


[out_0_0 @ 0x55ac187b60] 100 buffers queued in out_0_0, something may be wrong.



Below is the ffmpeg call :


ffmpeg -re -f alsa -i default:CARD:card1 -ac 2 -af aresample=async=1 -acodec libopus -b:a 48000 -f rtp "rtp://127.0.0.1:5002"



And here is the full startup log :


ffmpeg version 549430e Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 10 (Debian 10.2.1-6)
 configuration: --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs='-lpthread -lm -latomic' --arch=arm64 --enable-gmp --enable-gpl --enable-libopus --enable-nonfree --enable-version3 --target-os=linux --enable-pthreads --enable-openssl --enable-hardcoded-tables
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'default:CARD=pisound':
 Duration: N/A, start: 1684250059.973334, bitrate: 1536 kb/s
 Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> opus (libopus))
Press [q] to stop, [?] for help
Output #0, rtp, to 'rtp://127.0.0.1:5002':
 Metadata:
 encoder : Lavf60.3.100
 Stream #0:0: Audio: opus, 48000 Hz, stereo, s16, 48 kb/s
 Metadata:
 encoder : Lavc60.3.100 libopus
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 60.3.100
m=audio 5002 RTP/AVP 97
b=AS:48
a=rtpmap:97 opus/48000/2
a=fmtp:97 sprop-stereo=1

size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
[out_0_0 @ 0x559f530c60] 100 buffers queued in out_0_0, something may be wrong.
size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
size= 0kB time=-00:00:00.00 bitrate= -0.0kbits/s speed=N/A 
size= 0kB time=-00:00:00.00 bitrate= -0.0kbits/s speed=N/A 
[alsa @ 0x559f4db460] ALSA buffer xrun.
size= 6kB time=00:00:02.81 bitrate= 16.7kbits/s speed=0.93x 
size= 6kB time=00:00:02.81 bitrate= 16.7kbits/s speed=0.797x 
size= 6kB time=00:00:02.83 bitrate= 16.6kbits/s speed=0.703x 
size= 6kB time=00:00:02.83 bitrate= 16.6kbits/s speed=0.624x 
size= 6kB time=00:00:02.83 bitrate= 16.6kbits/s speed=0.562x 
size= 6kB time=00:00:02.83 bitrate= 16.6kbits/s speed=0.511x 
[alsa @ 0x559f4db460] ALSA buffer xrun.
size= 10kB time=00:00:05.67 bitrate= 14.8kbits/s speed=0.939x 
size= 10kB time=00:00:05.67 bitrate= 14.8kbits/s speed=0.866x 
size= 10kB time=00:00:05.67 bitrate= 14.8kbits/s speed=0.805x 
size= 10kB time=00:00:05.67 bitrate= 14.8kbits/s speed=0.751x 
size= 10kB time=00:00:05.69 bitrate= 14.8kbits/s speed=0.707x 
[alsa @ 0x559f4db460] ALSA buffer xrun.
size= 13kB time=00:00:05.95 bitrate= 17.8kbits/s speed=0.696x 
size= 16kB time=00:00:08.51 bitrate= 15.2kbits/s speed=0.939x 
size= 16kB time=00:00:08.51 bitrate= 15.2kbits/s speed=0.89x 
size= 16kB time=00:00:08.53 bitrate= 15.2kbits/s speed=0.847x 
size= 16kB time=00:00:08.53 bitrate= 15.2kbits/s speed=0.806x 
size= 16kB time=00:00:08.53 bitrate= 15.2kbits/s speed=0.77x 
[alsa @ 0x559f4db460] ALSA buffer xrun.
size= 21kB time=00:00:11.37 bitrate= 14.8kbits/s speed=0.981x 



I tried changing the output to
-f null /dev/null
to see if the rtp was the issue, but I get the same thing. I made sure the user running it was a member to the "audio" group andarecord -l
andaplay -l
both show the card with the right name and information. I even tried to use its hw code instead of the default name, and same issue.