
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (107)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
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 (...)
Sur d’autres sites (12394)
-
How to save srt file with a video to be part of the video ?
14 septembre 2023, par abdallah mostafaI've an application that generate srt file for a video with AI but I want to save the video to user's storage with the srt subtitle burned on the video not just embedded.


this is the response form the API


"fotmated_subtitle": [
 {
 "display_text": "You know those cat are memes that everybody uses in their videos and the TV movie clips that people use.",
 "interval": [
 "0:00:00.000",
 "0:00:04.000"
 ]
 },
 {
 "display_text": "Well, who are the four best free websites to find a move?",
 "interval": [
 "0:00:04.000",
 "0:00:06.240"
 ]
 }
 ]



I could add this as a widget over the video that would change accourding to intervals.
I want to know How to save that video with the subtitle


Future<void> saveSubtitle() async {
 emit(ExportSubtitleLoading());
 String subtitleFilter = "";
 for (var subtitle in subtitles!.fotmatedSubtitle!) {
 String startTime = subtitle.interval![0];
 String endTime = subtitle.interval![1];
 String text = subtitle.displayText!;
 subtitleFilter +=
 "drawtext=text='$text':enable='between(t,$startTime,$endTime)':x=(w-text_w)/2:y=h-30:fontsize=24:fontcolor=white,";
 }

 final dir = await getTemporaryDirectory();
 String outputPath = '${dir.path}/ex_vid.mp4';
 final arguments = [
 '-i',
 inputFile,
 '-vf',
 subtitleFilter,
 '-c:v',
 'libx264',
 '-c:a',
 'copy',
 outputPath
 ];
 (arguments.join(' ')).logger;
 '=============='.logger;
 await FFmpegKit.execute(arguments.join(' ')).then((session) async {
 final returnCode = await session.getReturnCode();

 if (ReturnCode.isSuccess(returnCode)) {
 ('The Converstion is Success').logger;
 emit(ExportSubtitleSuccess());
 } else if (ReturnCode.isCancel(returnCode)) {
 // CANCEL
 ('The Converstion is Cancelled').logger;
 } else {
 emit(ExportSubtitleerror());
 ('The Converstion Have an Error').logger;
 }
 });
 }
</void>


I've tested this method but still does not worked


here is the full command


String command =
 "-y -i /data/user/0/com.amaa.aistudio/cache/file_picker/Blink-96bdc94a-17df-4f64-b560-90811a44c4f8-Original.mp4 -vf \"drawtext=text='You know those cat are memes that everybody uses in their videos and the TV movie clips that people use.':enable='between(t,0,4.000)':x=(w-text_w)/2:y=h-30:fontsize=24:fontcolor=white,drawtext=text='Well, who are the four best free websites to find a move?':enable='between(t,4.000,6.240)':x=(w-text_w)/2:y=h-30:fontsize=24:fontcolor=white\" -c:v libx264 -c:a copy /data/user/0/com.amaa.aistudio/cache/ex_vid.mp4";



also here is the logs


FFmpegKit log message: isom
[log] FFmpegKit log message:
[log] FFmpegKit log message: minor_version :
[log] FFmpegKit log message: 512
[log] FFmpegKit log message:
[log] FFmpegKit log message: compatible_brands:
[log] FFmpegKit log message: isomiso2avc1mp41
[log] FFmpegKit log message:
[log] FFmpegKit log message: comment :
[log] FFmpegKit log message: vid:v0f044gc0000cj6mnmrc77u1oq5pn100
[log] FFmpegKit log message:
[log] FFmpegKit log message: aigc_info :
[log] FFmpegKit log message: {"aigc_label_type": 0}
[log] FFmpegKit log message:
[log] FFmpegKit log message: encoder :
[log] FFmpegKit log message: Lavf58.76.100
[log] FFmpegKit log message:
[log] FFmpegKit log message: Duration:
[log] FFmpegKit log message: 00:00:35.66
[log] FFmpegKit log message: , start:
[log] FFmpegKit log message: 0.000000
[log] FFmpegKit log message: , bitrate:
[log] FFmpegKit log message: 1239 kb/s
[log] FFmpegKit log message:
[log] FFmpegKit log message: Stream #0:0
[log] FFmpegKit log message: [0x1]
[log] FFmpegKit log message: (und)
[log] FFmpegKit log message: : Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 576x1024 [SAR 1:1 DAR 9:16], 1102 kb/s
[log] FFmpegKit log message: ,
[log] FFmpegKit log message: 47.78 fps,
[log] FFmpegKit log message: 50 tbr,
[log] FFmpegKit log message: 12800 tbn
[log] FFmpegKit log message: (default)
[log] FFmpegKit log message:
[log] FFmpegKit log message: Metadata:
[log] FFmpegKit log message: handler_name :
[log] FFmpegKit log message: VideoHandler
[log] FFmpegKit log message:
[log] FFmpegKit log message: vendor_id :
[log] FFmpegKit log message: [0][0][0][0]
[log] FFmpegKit log message:
[log] FFmpegKit log message: Stream #0:1
[log] FFmpegKit log message: [0x2]
[log] FFmpegKit log message: (und)
[log] FFmpegKit log message: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
[log] FFmpegKit log message: (default)
[log] FFmpegKit log message:
[log] FFmpegKit log message: Metadata:
[log] FFmpegKit log message: handler_name :
[log] FFmpegKit log message: SoundHandler
[log] FFmpegKit log message:
[log] FFmpegKit log message: vendor_id :
[log] FFmpegKit log message: [0][0][0][0]
[log] FFmpegKit log message:
FFmpegKit log message: [Parsed_drawtext_0 @ 0xb4000077140d5380] Cannot find a valid font for the family Sans
[log] FFmpegKit log message: [AVFilterGraph @ 0xb4000077a5e0afe0] Error initializing filters
[log] FFmpegKit log message: Error reinitializing filters!
[log] FFmpegKit log message: Failed to inject frame into filter network: No such file or directory
[log] FFmpegKit log message: Error while processing the decoded data for stream #0:0
[log] FFmpegKit log message: Conversion failed!



-
flv reencode to mp4 for iphone/ipod via ffmpeg and x264 (quality issue)
3 octobre 2011, par zeroasteriskThere are a lot of questions on this topic, and I've read most of them and most of the google search results I could come up with.
When I use FFMPEG to convert a FLV to a iphone3 compatble MP4 file, it just doesn't preserver enough of the quality. Yes, I've worked the hell out of
-sameq
and-b
and-bt
settings, text just isn't readable.Next I tried to split the video out and process it directly, using these instructions :
https://sites.google.com/site/linuxencoding/x264-encoding-guideThe problem is myplayer (via ffmpeg) was not able to determine the duration of the FLV (even though the metadata was set).
(I assume) Because of that unknown duration, when I create the MP4 file, the resulting x264 file plays through super-fast while the audio plays at the normal rate.
user@server:/tmp# mplayer -nosound -benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing input.flv.
libavformat file format detected.
[flv @ 0x1202460]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (vp6f), -vid 0
[lavf] stream 1: audio (nellymoser), -aid 0
VIDEO: [VP6F] 1680x992 0bpp 1000.000 fps 33.4 kbps ( 4.1 kbyte/s)
Clip info:
audiocodecid: 6
audiodatarate: 86
audiosamplerate: 44100
audiosamplesize: 16
audiosize: 6097005
canSeekToEnd: true
datasize: 8609138
duration: 567
framerate: 2
hasAudio: true
hasCuePoints: false
hasKeyframes: true
hasMetadata: true
hasVideo: true
height: 992
lasttimestamp: 567
metadatacreator: flvtool++ (Facebook, Motion project, dweatherford)
stereo: false
totalframes: 1043
videocodecid: 4
videodatarate: 33
videosize: 2316256
width: 1680
Using (default) progressive frame mode.Opening video filter: [expand w=640 h=480]
Expand: 640 x 480, -1 ; -1, osd: 0, aspect: 0.000000, round: 1
Opening video filter: [scale w=0 h=0]
Opening video filter: [dsize=640:480:0]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x7f0c738b9620]Lanczos scaler, from yuv420p to yuv420p using MMX2
VO: [yuv4mpeg] 640x480 => 641x480 Planar YV12I have also tried specifying FPS, but no change in results
user@server:/tmp# mplayer -nosound -fps 25-benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --fps 25 --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
Can someone tell me how to either :
- fix my split A/V processing/timing/duration issues ?
- improve the
quality of the FFMPEG conversion of FLV to iphone3 compatible
format ?
-
flv reencode to mp4 for iphone/ipod via ffmpeg and x264 (quality issue)
3 octobre 2011, par zeroasteriskThere are a lot of questions on this topic, and I've read most of them and most of the google search results I could come up with.
When I use FFMPEG to convert a FLV to a iphone3 compatble MP4 file, it just doesn't preserver enough of the quality. Yes, I've worked the hell out of
-sameq
and-b
and-bt
settings, text just isn't readable.Next I tried to split the video out and process it directly, using these instructions :
https://sites.google.com/site/linuxencoding/x264-encoding-guideThe problem is myplayer (via ffmpeg) was not able to determine the duration of the FLV (even though the metadata was set).
(I assume) Because of that unknown duration, when I create the MP4 file, the resulting x264 file plays through super-fast while the audio plays at the normal rate.
user@server:/tmp# mplayer -nosound -benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing input.flv.
libavformat file format detected.
[flv @ 0x1202460]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (vp6f), -vid 0
[lavf] stream 1: audio (nellymoser), -aid 0
VIDEO: [VP6F] 1680x992 0bpp 1000.000 fps 33.4 kbps ( 4.1 kbyte/s)
Clip info:
audiocodecid: 6
audiodatarate: 86
audiosamplerate: 44100
audiosamplesize: 16
audiosize: 6097005
canSeekToEnd: true
datasize: 8609138
duration: 567
framerate: 2
hasAudio: true
hasCuePoints: false
hasKeyframes: true
hasMetadata: true
hasVideo: true
height: 992
lasttimestamp: 567
metadatacreator: flvtool++ (Facebook, Motion project, dweatherford)
stereo: false
totalframes: 1043
videocodecid: 4
videodatarate: 33
videosize: 2316256
width: 1680
Using (default) progressive frame mode.Opening video filter: [expand w=640 h=480]
Expand: 640 x 480, -1 ; -1, osd: 0, aspect: 0.000000, round: 1
Opening video filter: [scale w=0 h=0]
Opening video filter: [dsize=640:480:0]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x7f0c738b9620]Lanczos scaler, from yuv420p to yuv420p using MMX2
VO: [yuv4mpeg] 640x480 => 641x480 Planar YV12I have also tried specifying FPS, but no change in results
user@server:/tmp# mplayer -nosound -fps 25-benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --fps 25 --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
Can someone tell me how to either :
- fix my split A/V processing/timing/duration issues ?
- improve the
quality of the FFMPEG conversion of FLV to iphone3 compatible
format ?