
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (79)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)
Sur d’autres sites (6876)
-
How to recover video from H264 frames and timestamps [closed]
10 juin 2024, par kokosdaMy service receives H264 frames and some metadata related to them like Timestamp from MS Teams.


Observations :


- 

- Those frames are inter-frame compressed.
- Resolution of those frames can change.
- Timestamps are like this one 39264692280552704. That represents year 125 if fed to .NET consturctor
new DateTime(39264692280552704)
, so I need to add 1899 years to get a real date. - I can wrap the sequence to a playable
mp4
container withffmpeg -i input.h264 -c copy output.mp4
, however it is not what I want because the resulting video plays too fast, like on fast forward. Thus, I would like those timestamps would be considered to recover a real timeline.










I merged all the H264 frames in one file like
input.h264
and saved all the timestamps in another file likemetadata.json
. Inmetadata.json
, each object describes a single frame frominput.h264
.

My question is how to recover the source video from frames and timestamps that I received from Teams ? Particularly, using FFMPEG.


-
Flutter : How to use "ffmpeg_kit_flutter" to merge videos ?
28 mai 2024, par Hani Kanakrii am using "ffmpeg_kit_flutter" to merge two videos with code



import 'dart:io';

import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
import 'package:ffmpeg_kit_flutter/abstract_session.dart';
import 'package:ffmpeg_kit_flutter/return_code.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';

import '/features/merge_videos/cubit/merge_videos_state.dart';

class MergeVideosCubit extends Cubit<mergevideosstate> {
 MergeVideosCubit(this.originalFile) : super(InitialMergeVideos());
 final File? originalFile;

 Future<void> selectVideo(BuildContext context) async {
 final List<assetentity>? videos = await AssetPicker.pickAssets(
 context,
 pickerConfig: const AssetPickerConfig(requestType: RequestType.video),
 );

 if (videos != null && videos.isNotEmpty) {
 for (AssetEntity asset in videos) {
 File? videoFile = await asset.file;
 if (videoFile != null) {
 print('Selected Asset Path: ${videoFile.path}');
 mergeVideos(originalFile!.path, videoFile.path);
 }
 }
 }
 }

 Future<void> mergeVideos(String inputPath1, String inputPath2) async {
 final String outputPath = "/storage/emulated/0/merged_video_${now()}.mp4";
 // final String command =
 // '-i $inputPath1 -i $inputPath2 -filter_complex "[0:v][0:a][1:v][1:a] concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" -y $outputPath';
 final String command =
 '-i $inputPath1 -i $inputPath2 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y $outputPath';
 print("FFmpeg process starting with command: $command");
 print(command);
 print("LOADING LOADING LOADING LOADING LOADING LOADING LOADING MERGE");
 emit(LoadMergeVideos());
 await FFmpegKit.execute(command).then((value) async {
 await value.getDuration();
 var id = await value.getSessionId();

 print(value);
 print(id);
 print(await value.getDuration());
 });
 await FFmpegKit.executeAsync(command, (session) async {
 final returnCode = await session.getReturnCode();
 await session.getSessionId();
 print(await session.getSessionId());

 if (ReturnCode.isSuccess(returnCode)) {
 print("SUCCESS: Video merged successfully at $outputPath");
 print("SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS MERGE");
 emit(SuccessMergeVideos());

 } else if (ReturnCode.isCancel(returnCode)) {
 print("CANCELLED: Video merging was cancelled.");
 print("CANCEL CANCEL CANCEL CANCEL CANCEL CANCEL CANCEL MERGE");
 emit(CancelMergeVideos());

 } else {
 print("ERROR: Failed to merge videos.");
 print("ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR MERGE");
 emit(ErrorMergeVideos());

 final failLog = await session.getFailStackTrace();

 print("FFmpeg Failure Log: $failLog");
 }
 });
 }

 String now() {
 final DateTime now = DateTime.now();
 return "${now.year}${now.month}${now.day}_${now.hour}${now.minute}${now.second}";
 }
}
</void></assetentity></void></mergevideosstate>


The console when i run the code



D/EGL_emulation(23858): app_time_stats: avg=2379.66ms min=5.87ms max=23160.09ms count=10
I/PhotoManager(23858): uri: content://media/external/file
I/PhotoManager(23858): projection: _display_name, _data, _id, title, bucket_id, bucket_display_name, width, height, orientation, date_added, date_modified, mime_type, datetaken, duration, media_type, relative_path
I/PhotoManager(23858): selection: _id = ?
I/PhotoManager(23858): selectionArgs: 1000000039
I/PhotoManager(23858): sortOrder: null
I/PhotoManager(23858): sql: _id = 1000000039
I/PhotoManager(23858): cursor count: 1
I/flutter (23858): Selected Asset Path: /storage/emulated/0/Movies/VID_20240512_115116.mp4
I/flutter (23858): FFmpeg process starting with command: -i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4
I/flutter (23858): -i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4
I/flutter (23858): LOADING LOADING LOADING LOADING LOADING LOADING LOADING MERGE
I/flutter (23858): Instance of 'FFmpegSession'
I/flutter (23858): 1
I/flutter (23858): 246
I/flutter (23858): 2
I/flutter (23858): ERROR: Failed to merge videos.
I/flutter (23858): ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR MERGE
D/EGL_emulation(23858): app_time_stats: avg=87.27ms min=4.92ms max=319.92ms count=13
I/flutter (23858): FFmpeg Failure Log: null



In "mergeVideos" function the "returnCode" it return value "1" when i look in the package code


getState() async {
 try {
 return _platform
 .abstractSessionGetState(this.getSessionId())
 .then((state) {
 switch (state) {
 case 0:
 return SessionState.created;
 case 1:
 return SessionState.running;
 case 2:
 return SessionState.failed;
 case 3:
 default:
 return SessionState.completed;
 }
 });
 } on PlatformException catch (e, stack) {
 print("Plugin getState error: ${e.message}");
 return Future.error("getState failed.", stack);
 }
}



Which mean its keep running but in my code it does not wait until complete merging


how can i fix that ??!


but i think my problem is in command(concat)



-i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4



(This is my command when i run the code) ??


-
FFMpeg command line to create specific MPD Manifest
22 février 2024, par Seth HabermanI have tried to get an FFMpeg command to yield the below manifest. Right below is the FFmpeg command that I have tried to make but it has not created the same manifest file as what I am trying to replicate a stream from a third party system to add my own stream to their system so that it will actually play back.


"$ffmpeg_path" \
 -i "$input_file" \
 -r 30000/1001 \
 -vf "scale=3840:1080" \
 -c:v libx265 \
 -c:a aac -b:a 128k \
 -ar 48000 \
 -f dash \
 -use_timeline 1 \
 -use_template 1 \
 -init_seg_name "init-stream\$RepresentationID\$.m4s" \
 -media_seg_name "chunk-stream\$RepresentationID\$-\$Number%05d\$.m4s" \
 -seg_duration 3 \
 "$output_file"



The code above yields a manifest that is structured like below.


<?xml version="1.0" encoding="utf-8"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M35.1S" maxsegmentduration="PT3.0S" minbuffertime="PT16.8S">
 <programinformation>
 </programinformation>
 <servicedescription>
 </servicedescription>
 <period start="PT0.0S">
 <adaptationset contenttype="video" startwithsap="1" segmentalignment="true" bitstreamswitching="true" framerate="30000/1001" maxwidth="3840" maxheight="1080" par="32:9">
 <representation mimetype="video/mp4" codecs="hev1" bandwidth="2227590" width="3840" height="1080" sar="1:1">
 <segmenttemplate timescale="30000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 <segmenttimeline>
 <s t="0" d="247247"></s>
 <s d="250250" r="9"></s>
 <s d="104104"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" startwithsap="1" segmentalignment="true" bitstreamswitching="true">
 <representation mimetype="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audiosamplingrate="48000">
 <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"></audiochannelconfiguration>
 <segmenttemplate timescale="48000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startnumber="1">
 <segmenttimeline>
 <s t="0" d="143360"></s>
 <s d="144384" r="29"></s>
 <s d="93120"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>




The problem is that I I need it to create a stream where the manifest looks like the manifest below. If it doesn't look or function as below, it will not playback correctly on this third parties system.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediapresentationduration="PT1M35.7S" minbuffertime="PT5.9S">
 <programinformation></programinformation>
 <period start="PT0.0S">
 <adaptationset contenttype="video" segmentalignment="true" bitstreamswitching="true">
 <representation bandwidth="12000000" width="3840" height="1080" framerate="30000/1001" mimetype="video/mp4" codecs="hev1">
 <segmenttemplate media="chunk-stream$RepresentationID$-$Number%05d$.m4s" initialization="init-stream$RepresentationID$.m4s" startnumber="1" timescale="30000">
 <segmenttimeline>
 <s t="0" d="89089" r="31"></s>
 <s d="21021"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 <adaptationset contenttype="audio" segmentalignment="true" bitstreamswitching="true">
 <representation bandwidth="1536000" audiosamplingrate="48000" mimetype="audio/mp4" codecs="mp4a.40.2">
 <audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="16"></audiochannelconfiguration>
 <segmenttemplate media="chunk-stream$RepresentationID$-$Number%05d$.m4s" initialization="init-stream$RepresentationID$.m4s" startnumber="1" timescale="48000">
 <segmenttimeline>
 <s t="0" d="143360"></s>
 <s d="142336" r="2"></s>
 <s d="143360"></s>
 <s d="142336" r="3"></s>
 <s d="143360"></s>
 <s d="142336" r="3"></s>
 <s d="143360"></s>
 <s d="142336" r="3"></s>
 <s d="143360"></s>
 <s d="142336" r="3"></s>
 <s d="143360"></s>
 <s d="142336" r="3"></s>
 <s d="143360"></s>
 <s d="142336" r="1"></s>
 <s d="32768"></s>
 </segmenttimeline>
 </segmenttemplate>
 </representation>
 </adaptationset>
 </period>
</mpd>