
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (57)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 (...)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6780)
-
How to extract the first frame from a video ?
10 août 2024, par AndrewI am trying to extract the first frame from a video to save it as a preview.


Here's an almost working solution using ffmpeg :


func extractFirstFrame(videoBytes []byte) ([]byte, error) {
 input := bytes.NewReader(videoBytes)

 var output bytes.Buffer

 err := ffmpeg.Input("pipe:0").
 Filter("select", ffmpeg.Args{"gte(n,1)"}).
 Output(
 "pipe:1",
 ffmpeg.KwArgs{
 "vframes": 1,
 "format": "image2",
 "vcodec": "mjpeg",
 }).
 WithInput(input).
 WithOutput(&output).
 Run()

 if err != nil {
 return nil, fmt.Errorf("error extracting frame: %v", err)
 }

 return output.Bytes(), nil
}



The problem with this is that it can only process horizontal videos. For some reason it will throw a
0xbebbb1b7
error for a vertical videos. I don't understand why is that, probably because this is my very first time with ffmpeg.

Also, I am concerned if this solution is optimal. My assumption is that the whole video will be loaded into the memory first, which is kinda bad and I would like to avoid that


I use
https://github.com/u2takey/ffmpeg-go
, but errors are the same even if I run it usingexec
:

cmd := exec.Command(
 "ffmpeg",
 "-i", "pipe:0",
 "-vf", "select=eq(n\\,0)",
 "-q:v", "3",
 "-f", "image2",
 "pipe:1",
 )



Interestingly enough, I noticed that running command in the terminal will work as expected with any type of video
ffmpeg -i .\video_2024-08-10_00-03-00.mp4 -vf "select=eq(n\,0)" -q:v 3 output_image.jpg
, so the problem may be on how I send those videos to my server. I useFiber and send videos asmultipart/form-data
and then read it like this :

form_data, err := c.FormFile("image")
 file, err := form_data.Open()
 bytes, err := io.ReadAll(file)
 ....
 preview, err := extractFirstFrame(bytes)




I also managed to find logs for the failed attempt :



ffmpeg version 7.0.2-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
 built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 59. 8.100 / 59. 8.100
 libavcodec 61. 3.100 / 61. 3.100
 libavformat 61. 1.100 / 61. 1.100
 libavdevice 61. 1.100 / 61. 1.100
 libavfilter 10. 1.100 / 10. 1.100
 libswscale 8. 1.100 / 8. 1.100
 libswresample 5. 1.100 / 5. 1.100
 libpostproc 58. 1.100 / 58. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002a562ff0e80] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002a562ff0e80] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), none, 720x1280, 3093 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 2024-08-09T20:00:29.000000Z
 Duration: 00:00:06.80, start: 0.000000, bitrate: N/A
 Stream #0:0[0x1](eng): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 74 kb/s (default)
 Metadata:
 creation_time : 2024-08-09T20:00:23.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Video: h264 (avc1 / 0x31637661), none, 720x1280, 3093 kb/s, 30 fps, 30 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2024-08-09T20:00:23.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native))
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002a562ff0e80] stream 1, offset 0x5d: partial file
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000002a562fda2c0] Error during demuxing: Invalid data found when processing input
Cannot determine format of input 0:1 after EOF
[vf#0:0 @ 000002a5636c0ec0] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000002a5636c0ec0] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[vost#0:0/mjpeg @ 000002a5636c0400] Could not open encoder before EOF
[vost#0:0/mjpeg @ 000002a5636c0400] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 000002a5636c0400] Terminating thread with return code -22 (Invalid argument)
[out#0/image2 @ 000002a562ff5640] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A
Conversion failed!



Logs for the same video, but ran via terminal :


ffmpeg version 7.0.2-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
 built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 59. 8.100 / 59. 8.100
 libavcodec 61. 3.100 / 61. 3.100
 libavformat 61. 1.100 / 61. 1.100
 libavdevice 61. 1.100 / 61. 1.100
 libavfilter 10. 1.100 / 10. 1.100
 libswscale 8. 1.100 / 8. 1.100
 libswresample 5. 1.100 / 5. 1.100
 libpostproc 58. 1.100 / 58. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\video_2024-08-10_00-03-00.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 2024-08-09T20:00:29.000000Z
 Duration: 00:00:06.80, start: 0.000000, bitrate: 3175 kb/s
 Stream #0:0[0x1](eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 74 kb/s (default)
 Metadata:
 creation_time : 2024-08-09T20:00:23.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x1280, 3093 kb/s, 30 fps, 30 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2024-08-09T20:00:23.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:1 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 00000219eb4d0c00] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'output_image.jpg':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf61.1.100
 Stream #0:0(eng): Video: mjpeg, yuvj420p(pc, unknown/bt709/bt709, progressive), 720x1280, q=2-31, 200 kb/s, 30 fps, 30 tbn (default)
 Metadata:
 creation_time : 2024-08-09T20:00:23.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 encoder : Lavc61.3.100 mjpeg
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[image2 @ 00000219e7aa51c0] The specified filename 'output_image.jpg' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 00000219e7aa51c0] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[out#0/image2 @ 00000219e7b5e400] video:49KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame= 1 fps=0.0 q=3.0 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=0.322x



I also realized that the problem was not related to the video orientation, but to to the video from a specific source uploaded specifically on my server 🤡 Such a weird coincidence that I decided to test my video upload with those files, but anyway. And those are.... Downloaded instagram reels lol. But again, ffmpeg works just fine when ran in terminal


-
VideoJS for HLS streaming not working on iOS
13 février 2024, par AamesI have a website where I stream audio using HLS (m3u8 playlist + ts files).
I use VideoJS 8.3.0 to handle the stream in the frontend side.
The streaming works in all devices (PC, Android, Mac) except in iOS where it works intermittently and often it blocks.


Here is my videojs initialization :


player = videojs('stream-id', {
 controls: false, autoplay: true, preload: 'auto',
 html5: {
 vhs: {overrideNative: false},
 nativeAudioTracks: true
 }
 });

...

player.src({ type: 'application/x-mpegURL', src: 'https://.../master.m3u8' });




And these are the headers of the m3u8 file :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-PROGRAM-DATE-TIME:2024-02-13T09:00:00Z
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXTINF:10.007800,
master0.ts
#EXTINF:7.214989,
master1.ts
....



I use ffmpeg to create the playlist from mp3 files :


ffmpeg -i inputFileName -c:a aac -b:a 128k -ac 2 -f hls -hls_time 10 -preset ultrafast -map 0:a -flags -global_header -hls_list_size 0 -hls_flags append_list outputFileName




Am I doing something wrong ? Any help would be appreciated
Thanks


I tried this solution : Videojs HLS m3u8 files are not playing in iOS devices and safari browser but it does not work for me


-
How to copy video duration to the output file with ffmpeg ? [closed]
5 novembre 2024, par user28147375I want to copy the input's duration to the output. Is there even a way in ffmpeg to achieve this ?
There is nothing about this in the docs.


I'm currently using these flags :


const ffmpegProcess = cp.spawn(ffmpegPath, [
 '-i', `pipe:3`,
 '-i', `pipe:4`,
 '-map', '0:v:0',
 '-map', '1:a:0',
 '-c:v', 'copy',
 '-c:a', 'aac',
 '-crf', '27',
 '-pix_fmt', 'yuv420p',
 '-preset', 'veryfast',
 '-movflags', 'frag_keyframe+empty_moov',
 '-f', 'mp4',
 '-shortest',
 '-'
 ], {
 windowsHide: true,
 stdio: [
 'pipe', 'pipe', 'inherit', 'pipe', 'pipe'
 ],
 });



The problem :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:3':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6avc1mp41
 creation_time : 2024-10-05T10:39:09.000000Z
 Duration: 00:02:18.14, start: 0.000000, bitrate: N/A
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 1 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)



Output #0, mp4, to 'pipe:':
 Metadata:
 major_brand : dash
 minor_version : 0
 compatible_brands: iso6avc1mp41
 encoder : Lavf60.3.100
 ---> (DURATION MISSING) <---
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)