
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (42)
-
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 (...)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6857)
-
FFmpeg remuxing parts of an audio file
22 décembre 2022, par zorleoneI'm trying to remux individual tracks from a FLAC file using the FFmpeg libraries.
I get the starting timestamps from a Cue sheet, I seek to the timestamps using
avformat_seek_file
. However after writing the packets to output files, they only have data from the beginning of the input file.

This is the code snippet which opens the input FLAC and also creates an output
AVFormatContext
for each track. I'm guessing the issue isavformat_seek_file
, it doesn't seem to do anything, since even though I seek to the beginning of a track, the output file contains data from the beginning of the input.

for(int i = 0; i <= sheet.ntracks; i++) {
 sheet.avfmtctx = avformat_alloc_context();
 if(avformat_open_input(&sheet.avfmtctx, sheet.file, NULL, NULL) < 0) {
 fprintf(stderr,
 "avformat_open_input(): failed to open %s\n",
 sheet.file);
 return 1;
 }
 int audio_stream_idx = -1;
 for(int i = 0; i < sheet.avfmtctx->nb_streams; i++) {
 if(sheet.avfmtctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
 audio_stream_idx = i;
 break;
 }
 }
 avformat_find_stream_info(sheet.avfmtctx, NULL);
 AVFormatContext *output;
 char *filepath = title_to_filepath(&sheet.tracks[i], sheet.file);
 avformat_alloc_output_context2(&output, NULL, NULL, filepath);
 AVStream *out_audio_stream = avformat_new_stream(output, NULL);
 avcodec_parameters_copy(out_audio_stream->codecpar,
 sheet.avfmtctx->streams[audio_stream_idx]->codecpar);

 if(avio_open(&output->pb, filepath, AVIO_FLAG_WRITE) < 0) {
 fprintf(stderr, "Failed to open %s for writing\n", filepath);
 return 1;
 }
 if(avformat_write_header(output, NULL) < 0) {
 fprintf(stderr, "avformat_write_header() failed\n");
 return 1;
 }
 int64_t current_frame = sheet.tracks[i].index;
 int64_t next_track_index = (i < sheet.ntracks) ?
 sheet.tracks[i + 1].index :
 INT64_MAX;
 if(avformat_seek_file(sheet.avfmtctx,
 -1,
 INT64_MIN,
 current_frame,
 current_frame,
 0) < 0) {
 fprintf(stderr, "Failed to seek to the index of track %d\n", i);
 avformat_free_context(sheet.avfmtctx);
 sheet.avfmtctx = NULL;
 av_write_trailer(output);
 avio_closep(&output->pb);
 avformat_free_context(output);
 free(filepath);
 continue;
 }
 AVPacket *pkt = av_packet_alloc();
 int64_t pts_diff = AV_NOPTS_VALUE, dts_diff = AV_NOPTS_VALUE;
 while(current_frame < next_track_index && !avio_feof(output->pb)) {
 int ret;
 if((ret = av_read_frame(sheet.avfmtctx, pkt)) < 0) {
 if(ret != AVERROR_EOF)
 fprintf(stderr, "av_read_frame() failed: %s\n", av_err2str(ret));
 break;
 }
 if(pkt->stream_index != audio_stream_idx)
 continue;
 // runs only once
 if(pts_diff == AV_NOPTS_VALUE && dts_diff == AV_NOPTS_VALUE) {
 pts_diff = pkt->pts;
 dts_diff = pkt->dts;
 }

 pkt->stream_index = 0; // first and only stream
 pkt->pts -= pts_diff;
 pkt->dts -= dts_diff;
 pkt->pos = -1;
 av_interleaved_write_frame(output, pkt);

 current_frame++;
 }

 avformat_free_context(sheet.avfmtctx);
 sheet.avfmtctx = NULL;

 av_write_trailer(output);
 av_packet_free(&pkt);
 avio_closep(&output->pb);
 avformat_free_context(output);

 free(filepath);
 }




current_frame
andnext_track_index
are calculated from the INDEX lines in the Cue sheet :MM * 60 * 75 + SS * 75 + FF
.
Can someone tell me what I'm doing wrong, and how to get the data I need from the input ?

-
I cannot find any way to convert multiple jpg or png to gif in vb.net using ffmpeg
4 juillet 2017, par Silvia FonsecaIs there anyway i can get multiples png or jpg images to gif using ffmpeg in vb.net
I have start a new application to capture certain frames from a video but now i want to get all the frames extracted in gif image using ffmpeg.
This is my code so far :
I have in fact all ready try like this but not succeed
I have made some changes and i get the gif file but in empty state
This is my code so farImports System.Diagnostics
Imports System.ComponentModel
Imports System
Imports System.IO
Public Class Form1
Dim video = ""
Dim startInfo As New ProcessStartInfo("ffmpeg.exe")
Dim frame As Long 'individual frames
Dim tempdir As String = "C:\avitogifconverter\" ' images temp directory
Dim DestPath As String = "C:\avitogifconverter\"
Public Declare Auto Function FindWindowNullClassName Lib "user32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
Dim Counter As Integer = 0
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
My.Computer.FileSystem.CreateDirectory(tempdir)
TextBox1.Text = "exp:-->video.avi or webm or flv"
TextBox1.Clear()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim p As Process = Process.Start("cmd", "/k ffmpeg.exe -i " + TextBox1.Text + " -filter:v fps=1/15 C:\avitogifconverter\out%02d.jpg")
p.WaitForExit()
If p.HasExited Then
MsgBox("The Extraction Are Finish...")
End If
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Label3.Text = "cmd" + "/k ffmpeg.exe -i " + TextBox1.Text + " -filter:v fps=1/15 C:\avi to gif converter\out%02d.jpg"
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If (OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK) Then
'TextBox1.Text = OpenFileDialog1.FileName
TextBox1.Text = System.IO.Path.GetFileName(OpenFileDialog1.FileName)
End If
If TextBox1.Text = Nothing Then
Return
End If
If TextBox1.Text <> Nothing Then
'My.Computer.FileSystem.CopyFile(TextBox1.Text, DestPath)
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim args As String 'declare args
args = " -framerate 1/5 -i C:\avitogifconverter\out%02d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p C:\avitogifconverter\out.gif "
Dim proc As New Process
Dim proci As New ProcessStartInfo
proci.FileName = My.Application.Info.DirectoryPath & "\ffmpeg.exe"
proci.Arguments = args
proci.WindowStyle = ProcessWindowStyle.Hidden
proci.CreateNoWindow = True
proci.UseShellExecute = False
proc.StartInfo = proci
proc.Start()
Do Until proc.HasExited = True
Me.Text = "Saving"
Loop
Me.Text = "your video done"
MsgBox("Done")
'IO.Directory.Delete(tempdir, True)
End Sub
End Class -
arm : vp9itxfm : Skip empty slices in the first pass of idct_idct 16x16 and 32x32
9 janvier 2017, par Martin Storsjöarm : vp9itxfm : Skip empty slices in the first pass of idct_idct 16x16 and 32x32
This work is sponsored by, and copyright, Google.
Previously all subpartitions except the eob=1 (DC) case ran with
the same runtime :Cortex A7 A8 A9 A53
vp9_inv_dct_dct_16x16_sub16_add_neon : 3188.1 2435.4 2499.0 1969.0
vp9_inv_dct_dct_32x32_sub32_add_neon : 18531.7 16582.3 14207.6 12000.3By skipping individual 4x16 or 4x32 pixel slices in the first pass,
we reduce the runtime of these functions like this :vp9_inv_dct_dct_16x16_sub1_add_neon : 274.6 189.5 211.7 235.8
vp9_inv_dct_dct_16x16_sub2_add_neon : 2064.0 1534.8 1719.4 1248.7
vp9_inv_dct_dct_16x16_sub4_add_neon : 2135.0 1477.2 1736.3 1249.5
vp9_inv_dct_dct_16x16_sub8_add_neon : 2446.7 1828.7 1993.6 1494.7
vp9_inv_dct_dct_16x16_sub12_add_neon : 2832.4 2118.3 2266.5 1735.1
vp9_inv_dct_dct_16x16_sub16_add_neon : 3211.7 2475.3 2523.5 1983.1
vp9_inv_dct_dct_32x32_sub1_add_neon : 756.2 456.7 862.0 553.9
vp9_inv_dct_dct_32x32_sub2_add_neon : 10682.2 8190.4 8539.2 6762.5
vp9_inv_dct_dct_32x32_sub4_add_neon : 10813.5 8014.9 8518.3 6762.8
vp9_inv_dct_dct_32x32_sub8_add_neon : 11859.6 9313.0 9347.4 7514.5
vp9_inv_dct_dct_32x32_sub12_add_neon : 12946.6 10752.4 10192.2 8280.2
vp9_inv_dct_dct_32x32_sub16_add_neon : 14074.6 11946.5 11001.4 9008.6
vp9_inv_dct_dct_32x32_sub20_add_neon : 15269.9 13662.7 11816.1 9762.6
vp9_inv_dct_dct_32x32_sub24_add_neon : 16327.9 14940.1 12626.7 10516.0
vp9_inv_dct_dct_32x32_sub28_add_neon : 17462.7 15776.1 13446.2 11264.7
vp9_inv_dct_dct_32x32_sub32_add_neon : 18575.5 17157.0 14249.3 12015.1I.e. in general a very minor overhead for the full subpartition case due
to the additional loads and cmps, but a significant speedup for the cases
when we only need to process a small part of the actual input data.In common VP9 content in a few inspected clips, 70-90% of the non-dc-only
16x16 and 32x32 IDCTs only have nonzero coefficients in the upper left
8x8 or 16x16 subpartitions respectively.This is cherrypicked from libav commit
9c8bc74c2b40537b0997f646c87c008042d788c2.Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>