
Recherche avancée
Autres articles (49)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (5677)
-
Why does every encoded frame's size increase after I had use to set one frame to be key in intel qsv of ffmpeg
22 avril 2021, par TONYI used intel's qsv to encode h264 video in ffmpeg. My av codec context settings is like as below :


m_ctx->width = m_width;
 m_ctx->height = m_height;
 m_ctx->time_base = { 1, (int)fps };
 m_ctx->qmin = 10;
 m_ctx->qmax = 35;
 m_ctx->gop_size = 3000;
 m_ctx->max_b_frames = 0;
 m_ctx->has_b_frames = false;
 m_ctx->refs = 2;
 m_ctx->slices = 0;
 m_ctx->codec_id = m_encoder->id;
 m_ctx->codec_type = AVMEDIA_TYPE_VIDEO;
 m_ctx->pix_fmt = m_h264InputFormat;
 m_ctx->compression_level = 4;
 m_ctx->flags &= ~AV_CODEC_FLAG_CLOSED_GOP;
 AVDictionary *param = nullptr;
 av_dict_set(&param, "idr_interval", "0", 0);
 av_dict_set(&param, "async_depth", "1", 0);
 av_dict_set(&param, "forced_idr", "1", 0);



and in the encoding, I set the AVFrame to be AV_PICTURE_TYPE_I when key frame is needed :


if(key_frame){
 encodeFrame->pict_type = AV_PICTURE_TYPE_I;
 }else{
 encodeFrame->pict_type = AV_PICTURE_TYPE_NONE;
 }
 avcodec_send_frame(m_ctx, encodeFrame);
 avcodec_receive_packet(m_ctx, m_packet);
 std::cerr<<"packet size is "<size<<",is key frame "<code>


The strange phenomenon is that if I had set one frame to AV_PICTURE_TYPE_I, then every encoded frame's size after the key frame would increase. If I change the h264 encoder to x264, then it's ok.


The packet size is as below before I call "encodeFrame->pict_type = AV_PICTURE_TYPE_I" :


packet size is 26839
packet size is 2766
packet size is 2794
packet size is 2193
packet size is 1820
packet size is 2542
packet size is 2024
packet size is 1692
packet size is 2095
packet size is 2550
packet size is 1685
packet size is 1800
packet size is 2276
packet size is 1813
packet size is 2206
packet size is 2745
packet size is 2334
packet size is 2623
packet size is 2055



If I call "encodeFrame->pict_type = AV_PICTURE_TYPE_I", then the packet size is as below :


packet size is 23720,is key frame 1
packet size is 23771,is key frame 0
packet size is 23738,is key frame 0
packet size is 23752,is key frame 0
packet size is 23771,is key frame 0
packet size is 23763,is key frame 0
packet size is 23715,is key frame 0
packet size is 23686,is key frame 0
packet size is 23829,is key frame 0
packet size is 23774,is key frame 0
packet size is 23850,is key frame 0



-
ffmpeg : PNGs to mp4 video is strange scaled quicktime
15 mai 2024, par v_bI am trying to create a video from multiple PNG files.

The files contain an animation of a line.

However, the output MP4 video looks really strange, as if the content is stretched or scaled.

Below, you can see screenshots of one of the PNG files and the resulting video file.


Some additional information :

I am on a MacPro M3 w. latest MacOs updates.

The images have transparent backgrounds.

Command :


ffmpeg -framerate 30 -pattern_type glob -i "*.png" -s:v 1600x800 -pix_fmt yuv420p -c:v libx264 result.mp4









Video Info :


ffprobe ./result.mp4 
ffprobe version 7.0 Copyright (c) 2007-2024 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.3.9.4)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 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 './result.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf61.1.100
 Duration: 00:00:03.03, start: 0.000000, bitrate: 103 kb/s
 Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1600x800, 98 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc61.3.100 libx264



ffmpeg version


ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers
 built with Apple clang version 15.0.0 (clang-1500.3.9.4)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 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
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...



-
Output file does not show up after executing ffmpeg command [closed]
19 février 2024, par davaiI'm using ffmpeg to combine an MP3 + G file and produce an MP4 file. I've placed the source code / .exe file for 'ffmpeg' in the project folder, and the MP3 + G files are also in the project folder. I also set the MP4 output to show up in the project folder as well. The weird thing is that, initially, I was producing output files, and while trying to tweak the constant rate factor, the MP4 output just stopped showing up entirely. I'm also not receiving any errors while running the code, and it does print out that the file has been successfully created, despite nothing showing up in the project folder.



 String mp3FilePath = "C:/Users/exampleuser/pfolder/example.mp3";
 String gFilePath = "C:/Users/exampleuser/pfolder/example.cdg";
 String mp4OutputPath = "C:/Users/exampleuser/pfolder/example.mp4";

 try
 {
 String[] command = {
 "C:/Users/tonih/IdeaProjects/MP3GtoMP4Conversion/ffmpeg/ffmpeg-2024-02-19-git-0c8e64e268-full_build/bin/ffmpeg.exe",
 "-i", mp3FilePath, // Input MP3 file
 "-r", "25", // Frame rate
 "-loop", "1", // Loop input video
 "-i", gFilePath, // Input G file
 "-c:v", "libx264", // Video codec
 "-preset", "slow", // Encoding preset for quality (choose according to your requirement)
 "-crf", "18", // Constant Rate Factor (lower is higher quality, typical range 18-28)
 "-c:a", "aac", // Audio codec
 "-b:a", "320k", // Audio bitrate
 "-shortest", // Stop when the shortest stream ends
 mp4OutputPath // Output MP4 file
 };

 Process process = Runtime.getRuntime().exec(command);
 process.waitFor();
 System.out.println("MP4 file created successfully: " + mp4OutputPath);
 }
 catch (IOException | InterruptedException e)
 {
 e.printStackTrace();
 }