
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (34)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (7924)
-
Trouble using ffmpeg in c# how to correctly format string to upscale videos ?
30 décembre 2020, par user14527374So I am writing an app in c# to upscale videos to a certain resolution. It uses ffmpeg to do this. What happens is after selecting the video file, and clicking 1080p it creates the directory folder but does not actually write the upscaled video to it.


I think I must have a string format issue :


private void HD_Click(object sender, EventArgs e)
 {
 if (textBox1.Text == null)
 {
 MessageBox.Show("You've not selected your video file yet. Please do so before continuing, cheers.");

 }
 else
 {
 
 var originFilePath = textBox1.Text;
 string name = Path.GetFileName(originFilePath);
 byte[] bytes = null;
 using (FileStream fileStream = new FileStream(originFilePath, FileMode.Open, FileAccess.Read))
 {
 using (MemoryStream ms = new MemoryStream())
 {
 fileStream.CopyTo(ms);
 bytes = ms.ToArray();
 }

 var localStoragePath = Path.Combine(Path.GetTempPath(), name);
 var directoryPath = Path.GetDirectoryName(localStoragePath);
 Directory.CreateDirectory(directoryPath);
 File.WriteAllBytes(localStoragePath, bytes);
 Console.WriteLine($"File copy successful: {File.Exists(localStoragePath)}");
 var readBack = File.ReadAllBytes(localStoragePath);
 Console.WriteLine($"Read file Back: {readBack.Length}, {localStoragePath}");
 var resizedFolderPath = @"C:\upscaledvideohere";
 Directory.CreateDirectory(resizedFolderPath);
 var resizedFiePath = Path.Combine(resizedFolderPath, Path.GetFileName(localStoragePath));

 var psi = new ProcessStartInfo();
 psi.FileName = @"C:\ffmpeg-2020-12-27-git-bff6fbead8-full_build\binffmpeg.exe";
 psi.Arguments = $"-i \"{localStoragePath}\" -vf scale=1080 \"{resizedFiePath}\"";
 psi.RedirectStandardOutput = false;
 psi.RedirectStandardError = false;
 psi.UseShellExecute = true;
 Console.WriteLine($"Args: {psi.Arguments}");

 try
 {
 using (Process exeProcess = Process.Start(psi))
 {
 Console.WriteLine($"process started with processId: {exeProcess.Id}");
 exeProcess.WaitForExit();
 Console.WriteLine($"Exit Code: {exeProcess.ExitCode}");
 }
 }
 catch (Exception ex)
 {
 Console.WriteLine(ex.StackTrace.ToString());
 Console.WriteLine(ex.Message.ToString());
 return;
 }
 Console.WriteLine($"process completed");
 Console.WriteLine($"Temp Out Exists: {File.Exists(resizedFiePath)}");
 }

 Console.ReadLine();
 }
 }
 
 



I am wondering where the string format error could be ? Thank you.


-
ffmpeg/ffprobe get HLS 'codecs' string for a video/audio stream
19 décembre 2020, par RichardI'm using ffmpeg to create HLS sub-playlists. I used ffmpeg to create them for the renditions. Now I need to create the master playlist .m3u8.


I need to do this manually, for a few reasons. I have everything I need except the 'CODECS' value.


How can I get this CODECS value for the video and audio streams within my file ?


I cannot see the relevant data when I use ffprobe to get all the metadata about the streams.


Example master manifest with CODECS :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=540863,RESOLUTION=640x360,CODECS="avc1.64001e,mp4a.40.2"
v0/prog_index.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2339363,RESOLUTION=960x540,CODECS="avc1.64001f,mp4a.40.2"
v1/prog_index.m3u8



Example of metadata I could get using ffprobe :


{'avg_frame_rate': '24000/1001',
 'bit_rate': '35956',
 'bits_per_raw_sample': '8',
 'chroma_location': 'left',
 'closed_captions': 0,
 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
 'codec_name': 'h264',
 'codec_tag': '0x31637661',
 'codec_tag_string': 'avc1',
 'codec_time_base': '1001/48000',
 'codec_type': 'video',
 'coded_height': 368,
 'coded_width': 640,
 'display_aspect_ratio': '16:9',
 'disposition': {'attached_pic': 0,
 'clean_effects': 0,
 'comment': 0,
 'default': 1,
 'dub': 0,
 'forced': 0,
 'hearing_impaired': 0,
 'karaoke': 0,
 'lyrics': 0,
 'original': 0,
 'timed_thumbnails': 0,
 'visual_impaired': 0},
 'duration': '5.005000',
 'duration_ts': 120120,
 'has_b_frames': 2,
 'height': 360,
 'index': 0,
 'is_avc': 'true',
 'level': 30,
 'nal_length_size': '4',
 'nb_frames': '120',
 'pix_fmt': 'yuv420p',
 'profile': 'High',
 'r_frame_rate': '24000/1001',
 'refs': 1,
 'sample_aspect_ratio': '1:1',
 'start_pts': 0,
 'start_time': '0.000000',
 'tags': {'handler_name': 'VideoHandler',
 'language': 'eng',
 'timecode': '01:00:00:00'},
 'time_base': '1/24000',
 'width': 640}



{'avg_frame_rate': '0/0',
 'bit_rate': '138375',
 'bits_per_sample': 0,
 'channel_layout': 'stereo',
 'channels': 2,
 'codec_long_name': 'AAC (Advanced Audio Coding)',
 'codec_name': 'aac',
 'codec_tag': '0x6134706d',
 'codec_tag_string': 'mp4a',
 'codec_time_base': '1/48000',
 'codec_type': 'audio',
 'disposition': {'attached_pic': 0,
 'clean_effects': 0,
 'comment': 0,
 'default': 1,
 'dub': 0,
 'forced': 0,
 'hearing_impaired': 0,
 'karaoke': 0,
 'lyrics': 0,
 'original': 0,
 'timed_thumbnails': 0,
 'visual_impaired': 0},
 'duration': '5.005000',
 'duration_ts': 240240,
 'index': 1,
 'max_bit_rate': '138375',
 'nb_frames': '236',
 'profile': 'LC',
 'r_frame_rate': '0/0',
 'sample_fmt': 'fltp',
 'sample_rate': '48000',
 'start_pts': 0,
 'start_time': '0.000000',
 'tags': {'handler_name': 'SoundHandler', 'language': 'eng'},
 'time_base': '1/48000'}



-
ffmpeg/ffprobe get 'codecs' string for a video/audio stream
18 décembre 2020, par RichardI'm using ffmpeg to create HLS playlists. I used ffmpeg to create them for the renditions. Now I need to create the master playlist .m3u8.


I need to do this manually, for a few reasons. I have everything I need except the 'CODECS' value.


How can I get this CODECS value for the video and audio streams within my file ?


I cannot see the relevant data when I use ffprobe to get all the metadata about the streams.


Example master manifest with CODECS :


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=540863,RESOLUTION=640x360,CODECS="avc1.64001e,mp4a.40.2"
v0/prog_index.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2339363,RESOLUTION=960x540,CODECS="avc1.64001f,mp4a.40.2"
v1/prog_index.m3u8



Example of metadata I could get using ffprobe :


{'avg_frame_rate': '24000/1001',
 'bit_rate': '35956',
 'bits_per_raw_sample': '8',
 'chroma_location': 'left',
 'closed_captions': 0,
 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
 'codec_name': 'h264',
 'codec_tag': '0x31637661',
 'codec_tag_string': 'avc1',
 'codec_time_base': '1001/48000',
 'codec_type': 'video',
 'coded_height': 368,
 'coded_width': 640,
 'display_aspect_ratio': '16:9',
 'disposition': {'attached_pic': 0,
 'clean_effects': 0,
 'comment': 0,
 'default': 1,
 'dub': 0,
 'forced': 0,
 'hearing_impaired': 0,
 'karaoke': 0,
 'lyrics': 0,
 'original': 0,
 'timed_thumbnails': 0,
 'visual_impaired': 0},
 'duration': '5.005000',
 'duration_ts': 120120,
 'has_b_frames': 2,
 'height': 360,
 'index': 0,
 'is_avc': 'true',
 'level': 30,
 'nal_length_size': '4',
 'nb_frames': '120',
 'pix_fmt': 'yuv420p',
 'profile': 'High',
 'r_frame_rate': '24000/1001',
 'refs': 1,
 'sample_aspect_ratio': '1:1',
 'start_pts': 0,
 'start_time': '0.000000',
 'tags': {'handler_name': 'VideoHandler',
 'language': 'eng',
 'timecode': '01:00:00:00'},
 'time_base': '1/24000',
 'width': 640}



{'avg_frame_rate': '0/0',
 'bit_rate': '138375',
 'bits_per_sample': 0,
 'channel_layout': 'stereo',
 'channels': 2,
 'codec_long_name': 'AAC (Advanced Audio Coding)',
 'codec_name': 'aac',
 'codec_tag': '0x6134706d',
 'codec_tag_string': 'mp4a',
 'codec_time_base': '1/48000',
 'codec_type': 'audio',
 'disposition': {'attached_pic': 0,
 'clean_effects': 0,
 'comment': 0,
 'default': 1,
 'dub': 0,
 'forced': 0,
 'hearing_impaired': 0,
 'karaoke': 0,
 'lyrics': 0,
 'original': 0,
 'timed_thumbnails': 0,
 'visual_impaired': 0},
 'duration': '5.005000',
 'duration_ts': 240240,
 'index': 1,
 'max_bit_rate': '138375',
 'nb_frames': '236',
 'profile': 'LC',
 'r_frame_rate': '0/0',
 'sample_fmt': 'fltp',
 'sample_rate': '48000',
 'start_pts': 0,
 'start_time': '0.000000',
 'tags': {'handler_name': 'SoundHandler', 'language': 'eng'},
 'time_base': '1/48000'}