
Recherche avancée
Autres articles (109)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (14942)
-
ffmpeg streaming via rtp reorders streams
19 juin 2023, par konovificationI'm streaming a video using
ffmpeg -i bbb.mp4 -c:v copy -c:a copy -f rtp_mpegts "rtp://239.1.1.1:8000"
. The command line output is :

ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 10 (Debian 10.2.1-6)
 configuration: --prefix=/usr --extra-version=0+deb11u1 --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-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --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-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 WARNING: library configuration mismatch
 avcodec configuration: --prefix=/usr --extra-version=0+deb11u1 --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-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --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-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 title : Big Buck Bunny, Sunflower version
 artist : Blender Foundation 2008, Janus Bager Kristensen 2013
 composer : Sacha Goedegebure
 encoder : Lavf58.45.100
 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 genre : Animation
 Duration: 00:10:34.64, start: 0.000000, bitrate: 4195 kb/s
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 4094 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
 Metadata:
 handler_name : GPAC ISO Video Handler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 96 kb/s (default)
 Metadata:
 handler_name : GPAC ISO Audio Handler
Output #0, rtp_mpegts, to 'rtp://239.1.1.1:8000':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 title : Big Buck Bunny, Sunflower version
 artist : Blender Foundation 2008, Janus Bager Kristensen 2013
 composer : Sacha Goedegebure
 genre : Animation
 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 encoder : Lavf58.45.100
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 4094 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc (default)
 Metadata:
 handler_name : GPAC ISO Video Handler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 96 kb/s (default)
 Metadata:
 handler_name : GPAC ISO Audio Handler
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help



When I run
ffprobe rtp://239.1.1.1:8000
(without restarting the stream), around one in ten times I get

Input #0, rtp, from 'rtp://239.1.1.1:8000':
 Duration: N/A, start: 411.533978, bitrate: N/A
 Program 1 
 Metadata:
 service_name : Service01
 service_provider: FFmpeg
 Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
 Stream #0:0: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 384 kb/s



Meaning that the video and audio streams swapped indices. I'm writing a program which uses
libav
where I rely on this to not happen. What is the reason for this and can it be fixed ?

-
Flutter ffmpeg_kit_flutter_new can't build Android app in any version
3 juillet, par user31929I can't build my project on Android ( on Ios it works and the project itself without ffmpeg_kit_flutter_new builds without problems )
This is the error i obtain :


/GeneratedPluginRegistrant.java:51: error: cannot find symbol
 com.antonkarpenko.ffmpegkit.MainActivity.registerWith(shimPluginRegistry.registrarFor("com.antonkarpenko.ffmpegkit.MainActivity"));
 ^
 symbol: class MainActivity
 location: package com.antonkarpenko.ffmpegkit



This is my flutter doctor :


[✓] Flutter (Channel stable, 3.19.4, on macOS 15.4.1 24E263 darwin-x64, locale it-IT)
 • Flutter version 3.19.4 on channel stable at ….
 • Upstream repository https://github.com/flutter/flutter.git
 • Framework revision 68bfaea224 (1 year, 2 months ago), 2024-03-20 15:36:31 -0700
 • Engine revision a5c24f538d
 • Dart version 3.3.2
 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
 • Android SDK at …..
 • Platform android-35, build-tools 34.0.0
 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
 • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
 • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
 • Xcode at /Applications/Xcode.app/Contents/Developer
 • Build 16E140
 • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
 • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
 • Android Studio at /Applications/Android Studio.app/Contents
 • Flutter plugin can be installed from:
 🔨 https://plugins.jetbrains.com/plugin/9212-flutter
 • Dart plugin can be installed from:
 🔨 https://plugins.jetbrains.com/plugin/6351-dart
 • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.99.3)
 • VS Code at /Applications/Visual Studio Code.app/Contents
 • Flutter extension version 3.110.0

[✓] Connected device (5 available)
 • SM A135F (mobile) • RF8T40TMS6Z • android-arm • Android 12 (API 31)
 • cri SE 128 (mobile) • 00008030-001268303E38402E • ios • iOS 18.4.1 22E252
 • iPhone di WacMini (mobile) • 00008030-00121D543CE8802E • ios • iOS 18.4.1 22E252
 • macOS (desktop) • macos • darwin-x64 • macOS 15.4.1 24E263 darwin-x64
 • Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.93

[✓] Network resources
 • All expected network resources are available.



My android/app/build.gradle


def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
 localPropertiesFile.withReader('UTF-8') { reader ->
 localProperties.load(reader)
 }
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
 flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
 flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'org.jetbrains.kotlin.android'


android {

 compileSdkVersion 35

 namespace = "com.app.app"
 sourceSets {
 main.java.srcDirs += 'src/main/kotlin'
 }

 defaultConfig {
 applicationId "com.appid.appid"
 minSdkVersion 24
 targetSdkVersion 35
 versionCode flutterVersionCode.toInteger()
 versionName flutterVersionName
 
 // insert this line of code in order to manage correct build abi configuration only on supported devices not supported tablet device emulator
 /* ndk {
 abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
 }*/
 }

 signingConfigs {
 release {
 keyAlias keystoreProperties['keyAlias']
 keyPassword keystoreProperties['keyPassword']
 storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
 storePassword keystoreProperties['storePassword']
 }
 }

 buildTypes {
 debug {
 debuggable true
 }

 release {
 signingConfig signingConfigs.release
 debuggable false
 shrinkResources true
 minifyEnabled true
 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
 }
 }

}

flutter {
 source '../..'
}

dependencies {
 implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.24"
}



My android/build.gradle


buildscript {
 ext.kotlin_version = '1.9.24'
 repositories {
 google()
 mavenCentral()
 jcenter()
 }

 dependencies {
 classpath 'com.android.tools.build:gradle:8.4.0'
 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
 classpath 'com.google.gms:google-services:4.3.14'
 classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
 }
}

allprojects {
 repositories {
 google()
 mavenCentral()
 jcenter()
 }

 
 subprojects {
 tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
 kotlinOptions.jvmTarget = "1.8"
 }
 afterEvaluate { project ->
 if (project.hasProperty('android')) {
 project.android {
 if (namespace == null) {
 namespace project.group
 }
 }
 }
 }
 }
 
}


ext {
 flutterFFmpegPackage = "min-gpl-lts"
}


rootProject.buildDir = '../build'
subprojects {
 project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
 project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
 delete rootProject.buildDir
}



My gradle.wrapper.properties


distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip



What i have already tried :


- 

- flutter clean/flutter pub get
- remove .gradle folder/flutter clean/flutter pub get
- remove GeneratedPluginRegistrant.java file then remove .gradle/flutter clean/flutter pub get








I have this issue in every version of the plugin. There is something wrong in my configurations or maybe this is a plugin issue ?


-
FFMPEG C Library : Encoding h264 stream into Matroska .mkv container creates corrupt files
16 mars 2024, par Marvin KillingI want to use the FFMPEG C Library to create a Matroska Video .mkv file with only an h264 stream, but the resulting .mkv file comes out corrupt.


The file cannot be played back with Windows Media Player, ffplay, or VLC, and when I try to
ffprobe
the resulting file, these are the error messages :

[h264 @ 0000015060d8f5c0] No start code is found.
 Last message repeated 1 times
[h264 @ 0000015060d8f5c0] non-existing PPS 0 referenced
 Last message repeated 1 times
[h264 @ 0000015060d8f5c0] decode_slice_header error
[h264 @ 0000015060d8f5c0] no frame!
[h264 @ 0000015060d8f5c0] non-existing PPS 0 referenced
 Last message repeated 1 times
[h264 @ 0000015060d8f5c0] decode_slice_header error
[h264 @ 0000015060d8f5c0] no frame!
[h264 @ 0000015060d8f5c0] non-existing PPS 0 referenced
 Last message repeated 1 times
# [...]
# this continues for a long time



I have followed the other troubleshooting steps for encoding h264 into Matroska, but none of them seemed to have done the trick for me :


- 

- Setting
AV_CODEC_FLAG_GLOBAL_HEADER
: Invalid data when creating mkv container with h264 stream because extradata is null - Allocating some space for extradata : Initializing an output file for muxing mkv with FFmpeg






This is my C code :


#include 
#include <libavutil></libavutil>opt.h>
#include <libavutil></libavutil>imgutils.h>
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>

int main(void) {
 char *out_file_path = "./video.mkv";
 AVFormatContext *format_context;
 AVStream *video_stream;
 AVCodecContext *codec_context;

 avformat_alloc_output_context2(&format_context, NULL, NULL, out_file_path);

 const AVCodec *codec = avcodec_find_encoder(AV_CODEC_ID_H264);
 video_stream = avformat_new_stream(format_context, NULL);

 codec_context = avcodec_alloc_context3(codec);
 av_opt_set(codec_context->priv_data, "preset", "superfast", 0);
 av_opt_set(codec_context->priv_data, "crf", "22", 0);

 codec_context->width = 1920;
 codec_context->height = 1080;
 codec_context->time_base = av_make_q(1, 30);
 codec_context->pix_fmt = AV_PIX_FMT_YUV420P;

 if (strncmp("./video.mkv", out_file_path, 11) == 0) {
 printf("Writing .mkv...\n");
 codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
 codec_context->extradata = (uint8_t*)av_mallocz(1024 * 1024);
 codec_context->extradata_size = 1024 * 1024;
 } else {
 printf("Writing .mp4...\n");
 }

 // XXX avcodec_parameters_from_context is potentially superfluous (?)
 int ret = avcodec_parameters_from_context(video_stream->codecpar, codec_context);

 ret = avcodec_open2(codec_context, codec, NULL);

 avio_open(&format_context->pb, out_file_path, AVIO_FLAG_WRITE);

 ret = avformat_write_header(format_context, NULL);

 // create a black input frame
 AVFrame *input_frame = av_frame_alloc();
 input_frame->width = 1920;
 input_frame->height = 1080;
 input_frame->format = AV_PIX_FMT_YUV420P;
 ret = av_image_alloc(input_frame->data, input_frame->linesize, input_frame->width, input_frame->height, input_frame->format, 32);
 ptrdiff_t linesize[4] = { input_frame->linesize[0], input_frame->linesize[1], input_frame->linesize[2], input_frame->linesize[3] };
 ret = av_image_fill_black(input_frame->data, linesize, input_frame->format, 0, 1920, 1080);

 // write 2 seconds of video, all black
 for (size_t current_pts = 0; current_pts < 60; current_pts++) {
 input_frame->pts = av_rescale_q(current_pts, av_make_q(1, 30), codec_context->time_base);;

 ret = avcodec_send_frame(codec_context, input_frame);

 AVPacket* packet = av_packet_alloc();

 while (1) {
 ret = avcodec_receive_packet(codec_context, packet);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
 break;
 } else if (ret < 0) {
 printf("avcodec_receive_packet failed");
 } else {
 av_packet_rescale_ts(packet, codec_context->time_base, video_stream->time_base);
 ret = av_interleaved_write_frame(format_context, packet);
 }
 }

 av_packet_free(&packet);
 }

 av_frame_free(&input_frame);

 // flush encoder
 avcodec_send_frame(codec_context, NULL);
 AVPacket *flush_packet = av_packet_alloc();
 while (avcodec_receive_packet(codec_context, flush_packet) != AVERROR_EOF) {
 //int ret = av_interleaved_write_frame(format_context_, packet);
 av_packet_rescale_ts(flush_packet, codec_context->time_base, video_stream->time_base);
 ret = av_write_frame(format_context, flush_packet);
 }
 av_packet_free(&flush_packet);

 ret = av_write_trailer(format_context);
 ret = avio_close(format_context->pb);

 return 0;
}



The error handling is stripped out, but it does not raise any errors.


This code works when I write into an mp4 file, but creates a corrupt file when writing into .mkv. You can change the output container format to mp4 by setting

char *out_file_path = "./video.mp4";


You can compile this by running


clang -I$(FFMPEG_DIR)/include -L$(FFMPEG_DIR)/lib -lavformat -lavcodec -lavutil main.c -o makemkv



The output I’m getting while the above code is running :


Writing .mkv...
[libx264 @ 0x139804c40] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x139804c40] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 0x139804c40] 264 - core 164 r3108 31e19f9 - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=15 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00



When I use the ffmpeg CLI, I can create a working .mkv from my working .mp4 like this :


ffmpeg -i video.mp4 -c:v copy created-with-ffmpeg-cli.mkv



I have uploaded the resulting video files here : https://drive.google.com/drive/folders/1FS-0fBAwKBbO-tyxC0VrFqcCyyqd0BR_?usp=sharing


- Setting