
Recherche avancée
Autres articles (111)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (9055)
-
MoviePy Create Video that keeps audio on Twitter
26 janvier 2019, par SDSI’m exporting lots of videos and was planning to use them on Twitter.
When I read the documentation the first time I (foolishly) thought I only had to worry about the dimensions and the rest would take care of itself.
I have many files that look and play great on my PC but as soon as I load them into Twitter there is no audio.
Twitter’s Media Best Practices are located here :Recommended Video Codec: H264 High Profile
Recommended Frame Rates: 30 FPS, 60 FPS
Recommended Video Resolution: 1280x720 (landscape), 720x1280 (portrait), 720x720 (square)
Recommended Minimum Video Bitrate: 5,000 kbps
Recommended Minimum Audio Bitrate: 128 kbps
Recommended Audio Codec: AAC LC
Recommended Aspect Ratio: 16:9 (landscape or portrait), 1:1 (square)
Advanced:
Frame rate must be 60 FPS or less
Dimensions must be between 32x32 and 1280x1024
File size must not exceed 512 mb
Duration must be between 0.5 seconds and 140 seconds
Aspect ratio must be between 1:3 and 3:1
Must have 1:1 pixel aspect ratio
Only YUV 4:2:0 pixel format is supported
Audio must be AAC with Low Complexity profile. High-Efficiency AAC is not supported
Audio must be mono or stereo, not 5.1 or greater
Must not have open GOP
Must use progressive scanHere’s the specs on a specific video :
Video ----
Length: 00:00:12
Frame width 1280
Frame height 720
Data rate 238kbps
Total bitrate 368kbps
Frame rate 24.00 frames/second
Audio --
Bit rate 129 kbps
Channels 2 (stereo)
Audio sample rate 44.100 kHz
File --
Size 551 KB
Item type MP4 FileThe code is fairly straightforward. I grab an image and make a short intro frame with it, then add two short clips and put it all together as you can see here :
image_clip = ImageClip(my_image) image_clip.set_duration(seconds).write_videofile('F:/sm_Temp_Files/trash_%s.mp4' % fname,fps=24)
image_video_clip = mpy.VideoFileClip('F:/sm_Temp_Files/trash_%s.mp4' % fname)
video_path = (my_video_path)
video_clip = mpy.VideoFileClip(video_path, target_resolution = (h,w),audio=True)
outro_clip = mpy.VideoFileClip('Logo_Intro_w_Stinger_Large.mp4',target_resolution = (h,w),audio=True)
clips = [image_video_clip,video_clip,image_video_clip,video_clip,image_video_clip,outro_clip]
slided_clips = [CompositeVideoClip([clip.fx( transfx.crossfadein, transition_seconds)]) for clip in clips]
c = concatenate_videoclips(slided_clips)
c.write_videofile('F:/sm_Short_Video/sm_%s.mp4' % fname,fps=24)I’ll admit, I’m out of my league to know what to do next. When Googling it looks like others have had similar issues but show fixes in FFMpeg, like this example.
Yes, I know MoviePy is written on top of FFMpeg but for a novice like me it would be really nice if there was tweaks I could do inside of MoviePy to get the audio to work on Twitter.
Thank you in advance !
-
Creating a PowerShell Streamer Function w/youtube-dl, ffmpeg & ffplay
11 juillet 2017, par Adam ChilcottMy question is in regards to combining youtube-dl, ffmpeg, ffplay and PowerShell to handle video URLs.
Some examples I’ve seen have piped a binary stream from youtube-dl to an external player using the Windows Command Prompt as demonstrated :
youtube-dl --output - "https://youtube.com/mygroovycontent" | mpc-hc.exe /play /close -
This works fine in Command Prompt as it does not mangle the binary stream. If you try and run the same command in PowerShell it doesn’t handle the binary stream so well and modifies the output, making it unreadable to the external player.
In light of this I’ve written the following PowerShell function to get around this issue. It tries to mirror a similar function I’ve written in Bash (See : https://github.com/adamchilcott/.dotfiles/blob/master/.bash_functions.d/streamer.sh)
The reason I’ve handled youtube-dl, ffmpeg and ffplay seperately is that defining the ffmpeg binary location in youtube-dl as an external program creates some issues when passing it in PowerShell.
I was hoping that someone could take a look at my script and provide some feedback on what I have done here and if it can be improved upon or if a better implementation is already available ?
Best,
Adam.
BEGIN POWERSHELL
Function streamer
{
Param
(
[string] $streamURL
)
Begin
{
}
Process
{
$streamDir = "$env:TEMP\YTD.d"
$ytdBin = "Z:\PortableApps\CommandLineApps\youtube-dl\youtube-dl.exe"
$streamExtractor = &$ytdBin --no-warnings --get-url $streamURL
$ffmpegBin = "Z:\PortableApps\CommandLineApps\ffmpeg-20170702-c885356-win64-static\bin\ffmpeg.exe"
$ffplayBin = "Z:\PortableApps\CommandLineApps\ffmpeg-20170702-c885356-win64-static\bin\ffplay.exe"
if
(
-not (Test-Path -Path $streamDir -PathType Any)
)
{
New-Item $streamDir -type directory -ErrorAction SilentlyContinue
}
Start-Process -FilePath $ffmpegBin -ArgumentList "-loglevel quiet -i $streamExtractor -c copy $streamDir\streamContainer.m2ts" -NoNewWindow -ErrorAction SilentlyContinue
Do
{
Start-Sleep -Seconds 1
}
Until
(
(Get-Item $streamDir\streamContainer.m2ts -ErrorAction SilentlyContinue).Length -gt 256kb
)
&$ffplayBin -loglevel quiet $streamDir\streamContainer.m2ts
if
(
(Test-Path -Path $streamDir -PathType Any) -eq $true -and (Get-Process -Name ffplay -ErrorAction SilentlyContinue) -eq $null
)
{
Do
{
Stop-Process -Name ffmpeg -ErrorAction SilentlyContinue
}
Until
(
(Get-Process -Name ffmpeg -ErrorAction SilentlyContinue) -eq $null
)
Remove-Item $streamDir -Recurse -ErrorAction SilentlyContinue
}
}
End
{
}
}
streamer -streamURL https://www.youtube.com/watch?v=9uFXw7vKz14END POWERSHELL
-
5 perfect feature combinations to use with Heatmaps and Session Recordings
28 janvier 2020, par Jake Thornton — Uncategorized