
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (59)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (6642)
-
Cut a video in between key frames without re-encoding the full video using ffpeg ?
1er septembre 2020, par bguizI would like to cut a video at the beginning at any particular timestamp, and it need to be precise, so the nearest key frame is not good enough.


Also, these videos are rather long - an hour or longer - so I would like to avoid re-encoding this altogether if possible, or otherwise only re-encode a minimal fraction of the total duration. Thus, would like to maximise the use of
-vcodec copy
.

How can I accomplish this using
ffmpeg
?

NOTE : See scenario, and my own rough idea for a possible solution below.



Scenario :


- 

- Original video

- 

- Length of 1:00:00
- Has a key frame every 10s






- Desired cut :

- 

- From 0:01:35 through till the end




- Attempt #1 :

- 

- Using
-ss 0:01:35 -i blah.mp4 -vcodec copy
, what results is a file where : - audio starts at 0:01:30
- video also starts at 0:01:30
- this starts both the audio and the video too early










- Using
- using
-i blah.mp4 -ss 0:01:35 -vcodec copy
, what results is a file where :
- 

- audio starts at 0:01:35,
- but the video is blank/ black for the first 5 seconds,

- 

- until 0:01:40, when the video starts




- this starts the audio on time,
but the video starts too late



















Rough idea


- 

- (1) cut 0:01:30 to 0:01:40

- 

- re-encode this to have new key frames,
including one at the target time of 0:01:35
- then cut this to get the 5 seconds from 0:01:35 through 0:01:40






- (2) cut 0:01:40 through till the end

- 

- without re-encoding, using
-vcodec copy




- without re-encoding, using
- (3)
ffmpeg concat
the first short clip (the 5 second one)
with the second long clip








I know/ can work out the commands for (2) and (3), but am unsure about what commands are needed for (1).


- Original video

-
ffmpeg trimming audio WAV files and setting timecode
14 juillet 2022, par user19551045I am currently trying to cut an audio file to match the length of a video (without combining the two...just looking at timecodes) and produce a trimmed audio file that has a timecode that will match up with the video, the video is considered the absolute truth.


Currently, the issue is that the timecodes from the original audio file do not get carried over into the new cropped audio file. So, the starting timecode is now 00:00:00:00 instead of say 07:20:02:14. Even using the -timecode commands and trying to hardcode the timecode that way doesn't seem to do the trick. I am wondering if there is any way around this ? I just want to do as minimal to the raw audio as possible...just change the audio file's length while setting the timecodes so the new audio will line up with the video. Any thoughts/suggestions welcome !


Currently I have tried two options that don't seem to work :
using ffmpeg cmds :



 cmd2 = r'{} -ss "{}" -i "{}" -codec copy -timecode "{}" "{}"'.format(
 FFMPEG_PATH,
 abs(tc_diff_in_seconds),
 audio_path,
 "17074647",
 out_path
 )



and also using pydub :


current_audio = AudioSegment.from_wav("{}".format(audio_path))
 start_time_in_milli = abs(tc_diff_in_seconds*1000)
 end_time_in_milli = start_time_in_milli + video_dur_in_seconds * 1000
 trimmed_audio = current_audio[start_time_in_milli:end_time_in_milli]
 trimmed_audio.export('{}'.format(out_path), format='WAV', parameters=["-timecode", "17:07:46:47"])



Any thoughts/suggestions welcome ! Thanks


-
Hardware Accelerated H264 Decode using DirectX11 in Unity Plugin for UWP
8 janvier 2019, par rohit nI’ve built an Unity plugin for my UWP app which converts raw h264 packets to RGB data and renders it to a texture. I’ve used FFMPEG to do this and it works fine.
int framefinished = avcodec_send_packet(m_pCodecCtx, &packet);
framefinished = avcodec_receive_frame(m_pCodecCtx, m_pFrame);
// YUV to RGB conversion and render to texture after thisNow, I’m trying to shift to hardware based decoding using DirectX11 DXVA2.0.
Using this : https://docs.microsoft.com/en-us/windows/desktop/medfound/supporting-direct3d-11-video-decoding-in-media-foundation
I was able to create a decoder(ID3D11VideoDecoder) but I don’t know how to supply it the raw H264 packets and get the YUV or NV12 data as output.
(Or if its possible to render the output directly to the texture since I can get the ID3D11Texture2D pointer)so my question is, How do you send the raw h264 packets to this decoder and get the output from it ?
Also, this is for real time operation so I’m trying to achieve minimal latency.
Thanks in advance !