
Recherche avancée
Autres articles (67)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (6596)
-
Paperclip autoconvert GIF to MP4
2 décembre 2014, par Mark BoulderI’m trying to autoconvert animated GIFs to MP4 using paperclip-ffmpeg — but why are the newly created
.flv
files empty ?app/models/photo.rb
class Photo < ActiveRecord::Base
has_attached_file :attachment, :styles => {
medium: {format: "flv"},
thumbnail: {format: "png"}
}, :processors => [:ffmpeg]
belongs_to :post, class_name: "Forem::Post"
validates_attachment :attachment, presence: true, content_type: { content_type: ["image/jpg", "image/jpeg", "image/png", "image/gif"] }
endconfig/environments/development.rb
Paperclip.options[:command_path] = "/usr/bin/"Please try with this live app : http://runnable.com/VF91dsT_ufU_OLLG/rails-paperclip-gif-to-mp4
Login :
admin@example.com
Password :
admin1234
Example GIF :
ffmpeg
# ffmpeg
ffmpeg version 0.8.7-6:0.8.7-1ubuntu2
# which ffmpeg
/usr/bin/ffmpegLog
# tail log/development.log
Started POST "/default/topics" at 2014-12-02 06:47:58 +0000
Processing by Forem::TopicsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"8W8wk42e28JOUnUNvPjgfslVNV//aAmj4nxz/8dfqM0=", "topic"=>{"subject"=>"dfhfhdfhdfhdf", "posts_attribute
s"=>{"0"=>{"text"=>"sdfsdfsdfsdf", "photos_attributes"=>{"0"=>{"attachment"=>#RackMultipart20141202-40-hqit2u>, @original_filename="gif.gif", @content_type="image/gif", @headers="Content-Disposition: form-data; name=\"topic[posts
_attributes][0][photos_attributes][0][attachment]\"; filename=\"gif.gif\"\r\nContent-Type: image/gif\r\n">}}}}}, "commit"=>"Create Topic", "forum_id"=>"
default"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Forem::Forum Load (0.2ms) SELECT "forem_forums".* FROM "forem_forums" WHERE "forem_forums"."slug" = 'default' ORDER BY "forem_forums"."name" ASC L
IMIT 1
Forem::Category Load (0.1ms) SELECT "forem_categories".* FROM "forem_categories" WHERE "forem_categories"."id" = ? LIMIT 1 [["id", 1]]
Command :: file -b --mime '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-17gal7n.gif'
[paperclip] [ffmpeg] ffprobe "/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1.gif" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'd38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1' + 'flv'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -i :source -y :dest
Command :: ffmpeg -i '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1.gif' -y '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg120141202
-40-t4mbua.flv'
Command :: file -b --mime '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg120141202-40-t4mbua.flv'
[paperclip] [ffmpeg] ffprobe "/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1.gif" 2>&1
[paperclip] [ffmpeg] Command Success
[paperclip] [ffmpeg] Making...
[paperclip] [ffmpeg] Building Destination File: 'd38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1' + 'png'
[paperclip] [ffmpeg] Destination File Built
[paperclip] [ffmpeg] Adding Geometry
[paperclip] [ffmpeg] Adding Format
[paperclip] [ffmpeg] Adding Source
[paperclip] [ffmpeg] Building Parameters
[paperclip] [ffmpeg] -ss 3 -i :source -vframes 1 -f image2 -y :dest
Command :: ffmpeg -ss 3 -i '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-16dhhg1.gif' -vframes 1 -f image2 -y '/tmp/d38252762d3d4fd229faae637fd13f4e
20141202-40-16dhhg120141202-40-1d5qljm.png'
(0.2ms) begin transaction
Forem::Topic Exists (0.3ms) SELECT 1 AS one FROM "forem_topics" WHERE ("forem_topics"."id" IS NOT NULL) AND "forem_topics"."slug" = 'dfhfhdfhdfhdf'
LIMIT 1
Command :: file -b --mime '/tmp/d38252762d3d4fd229faae637fd13f4e20141202-40-zc9uyd.gif'
SQL (0.7ms) INSERT INTO "forem_topics" ("created_at", "forum_id", "slug", "subject", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?) [["created_a
t", "2014-12-02 06:47:59.655386"], ["forum_id", 1], ["slug", "dfhfhdfhdfhdf"], ["subject", "dfhfhdfhdfhdf"], ["updated_at", "2014-12-02 06:47:59.655386"
], ["user_id", 1]]
SQL (0.3ms) INSERT INTO "forem_posts" ("created_at", "text", "topic_id", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-12-02
06:47:59.658316"], ["text", "sdfsdfsdfsdf"], ["topic_id", 24], ["updated_at", "2014-12-02 06:47:59.658316"], ["user_id", 1]]
Forem::Topic Load (0.1ms) SELECT "forem_topics".* FROM "forem_topics" WHERE "forem_topics"."id" = ? LIMIT 1 [["id", 24]]
SQL (5.9ms) UPDATE "forem_topics" SET "last_post_at" = '2014-12-02 06:47:59.658316' WHERE "forem_topics"."id" = 24
Forem::Subscription Load (0.1ms) SELECT "forem_subscriptions".* FROM "forem_subscriptions" WHERE "forem_subscriptions"."topic_id" = ? ORDER BY "fo
rem_subscriptions"."id" ASC LIMIT 1000 [["topic_id", 24]]
SQL (0.1ms) UPDATE "forem_posts" SET "notified" = 't' WHERE "forem_posts"."id" = 24
SQL (0.1ms) UPDATE "forem_posts" SET "state" = 'approved' WHERE "forem_posts"."id" = 24
Binary data inserted for `string` type on column `attachment_content_type`
SQL (0.2ms) INSERT INTO "photos" ("attachment_content_type", "attachment_file_name", "attachment_file_size", "attachment_updated_at", "created_at", "
post_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["attachment_content_type", "image/gif"], ["attachment_file_name", "gif.gif"], ["attachment_file_
size", 1660134], ["attachment_updated_at", "2014-12-02 06:47:58.645579"], ["created_at", "2014-12-02 06:47:59.676633"], ["post_id", 24], ["updated_at",
"2014-12-02 06:47:59.676633"]]
(0.1ms) SELECT COUNT(*) FROM "forem_subscriptions" WHERE "forem_subscriptions"."topic_id" = ? AND "forem_subscriptions"."subscriber_id" = 1 [["top
ic_id", 24]]
SQL (0.1ms) INSERT INTO "forem_subscriptions" ("subscriber_id", "topic_id") VALUES (?, ?) [["subscriber_id", 1], ["topic_id", 24]]
SQL (0.2ms) UPDATE "forem_topics" SET "state" = 'approved' WHERE "forem_topics"."id" = 24
(16.3ms) commit transaction
Redirected to http://web-fdf7b3ef-c097-41fe-ac7a-1cf06815fcbc.runnable.com/default/topics/dfhfhdfhdfhdf
Completed 302 Found in 1114ms (ActiveRecord: 25.7ms) -
VB.Net Stream Bitmap/Image TO FFMpeg is not working :(
6 février 2015, par Zakir_SZHI m trying to port images to FFMpeg using StandardInput. It’s not working somehow ? :(
it’s throwing me bellow error :(
Here is the code i tried :
Dim objBitmap As System.Drawing.Bitmap
Dim objFProcess As System.Diagnostics.Process
Dim objStream As System.IO.BinaryWriter
Dim strFiles() As String
Dim strEachFile As String
Dim intFile As Integer
Dim intFrame As Integer
Dim intFLoop As Integer
objFProcess = New System.Diagnostics.Process
objFProcess.StartInfo.FileName = "c:\ffmpeg.exe"
objFProcess.StartInfo.Arguments = "-r 1 -f image2pipe -i pipe:.bmp -pix_fmt yuv420p -crf 35.0 -vcodec libx264 -an -coder 1 -rc_lookahead 50 -threads 0 D:\test.mp4"
objFProcess.StartInfo.UseShellExecute = False
objFProcess.StartInfo.RedirectStandardInput = True
objFProcess.StartInfo.RedirectStandardOutput = True
objFProcess.StartInfo.RedirectStandardError = True
rem objFProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
rem objFProcess.StartInfo.CreateNoWindow = True
objFProcess.Start()
objStream = New System.IO.BinaryWriter(objFProcess.StandardInput.BaseStream)
strFiles = My.Computer.Clipboard.GetText().Split({System.Environment.NewLine}, StringSplitOptions.None)
intFrame = 0
intFile = 0
For Each strEachFile In strFiles
rem MessageBox.Show(strEachFile)
intFile = intFile + 1
objBitmap = New System.Drawing.Bitmap(strEachFile)
For intFLoop = 0 To 24
intFrame = intFrame + 1
cmd1.Text = intFile.ToString & "-" & intFrame.ToString
My.Application.DoEvents()
objBitmap.Save(objStream.BaseStream, System.Drawing.Imaging.ImageFormat.Bmp) Rem this line give me above (attached) error :(
Next
objBitmap.Dispose()
Next
System.Threading.Thread.Sleep(3000)
objStream.Close()
MessageBox.Show("Done!")
rem objFProcess.Kill()any help would be highly appreciated
thanks in advance...
Edit-1 :
As asked by some one :) here is :View Detail Result : (Sorry, the image is very large in width/height)
And here is the Copy Details Result :
System.Runtime.InteropServices.ExternalException was unhandled
ErrorCode=-2147467259
Message=A generic error occurred in GDI+.
Source=System.Drawing
StackTrace:
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at FFMpeg_Stream.Form1.cmd1_Click(Object sender, EventArgs e) in g:\My Documents\FFMpeg Stream\FFMpeg Stream\Form1.vb:line 40
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at FFMpeg_Stream.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:that’s all i can give as information :(
-
bash script to install / update ffmpeg static builds
1er mars 2017, par JoakimHi I’m trying to make my first "real" bash script to do some real work than can be executed both manually and through cron jobs.
The script should download and install the ffmpeg-static-build from https://johnvansickle.com/ffmpeg
Here is what I’ve got so far :
#!/bin/bash
# Still to come, see if the script runs with root privileges else exit
#Download FFMPEG static daily build and it's md5
cd ~
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | tar -xf
#wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5
curl -L https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5 | tar -xf | tee -a https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | cut -d\ -f1 | md5sum > md5sum.txt
#Chech the md5 is currect
#md5sum -c MD5SUMS
file1="md5sum.txt"
file2="ffmpeg-git-64bit-static.tar.xz.md5"
if ! cmp --silent "$file1" "$file2"; then
echo "md5sum doesn't match...\n exit" >&2
exit 1
fi
#tar -xf ffmpeg-*.tar.xz
cp ffmpeg-*-static/ff* /usr/bin/
cp ffmpeg-*-static/ff* /usr/local/bin/
cp ffmpeg-*-static/qt-faststart /usr/bin/
cp ffmpeg-*-static/qt-faststart /usr/local/bin/
# Consider change second location to use ln -s
# Remove downloads and do some clean up
rm -fr ffmpeg-*
#EOFAs you can see in the script i would like to add the md5sum check but it fails (got the md5sum check part from Compare md5 sums in bash script)
If i remove the md5sum part the script is working, but right now the script fails at the | tar -xf | part with this code
2017-02-28 00:10:24 (617 KB/s) - ‘ffmpeg-git-64bit-static.tar.xz’ saved [17564756/17564756]
tar: option requires an argument -- 'f'
Try 'tar --help' or 'tar --usage' for more information.
tee: 'https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz': No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 65 100 65 0 0 87 0 --:--:-- --:--:-- --:--:-- 87
(23) Failed writing body
md5sum doesn't match...
exitAs this is my first, I would appreciate any "I’m 4 years old" advices and why
update
Have made some changes to the script based on the suggestions in this thread, but my problem is I have no output what so ever at this state :( So I think it’s time to ask for the next clue
#!/bin/bash
# version 0.3z
## Download FFMPEG static daily build and it's md5
##
## To make this script working you might need to change the below values
## based on whether you are using a 32bit or 64 bit OS
## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
## and then change those below
##
## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
## point 5.
# a "~" means running users home folder :) and should be different from destination dir
download_dir=~
# as this can change if the ffmpeg is to be stored on ex. shared server
dest_dir=/usr/bin/
# The version it equal the filename from above link
version=ffmpeg-git-64bit-static.tar.xz
## Do not change anything below here!!
source_url=https://johnvansickle.com/ffmpeg/builds/${version}
md5_url=https://johnvansickle.com/ffmpeg/builds/${version}.md5
# Still to come, see if the script runs with write privileges else exit
# 1. Can we enter download directory else exit
cd ${download_dir} ||
printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&2
exit 1
# 2. Check the md5 is correct or have changed from last check
## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
## regardless if it is new or not, I recommend only downloading it
## if the md5 does not match. Would save John some bandwidth at least
## thx for the idea to @LordNeckbeard
## So somehow i'll guess some sed or grep only first part is nessesary :(
## This is getting more advance than expected for a first time script :/
if ! diff <(md5sum ${version}) <(curl -s ${md5_url})
then
printf "%s\n" "md5sum doesn't match...\n
Downloading new version" >&2
rm -f ${version} >&2
curl ${source_url} -o ${download_dir}/${version} >&2
#exit 2
elif
diff <(md5sum ${version}) <(curl -s ${md5_url})
printf "%s\n" "Nothing new to download" >&2
exit 3
fi
# 3. untar
tar -xf ffmpeg-git-*-static.tar.xz
# 4. Move builds to destination directories
mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/
# 5. Make soft links to static builds
ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver
# Remove unzipped folder to do some clean up
rm -fr ffmpeg-git-*-static/
#EOFnote : do to some more in depth answering of why not compile from source :
1. This precompiled is usable on all Linux variations, despite distro and version
2. It usable on shared hosting servers with ssh accessUPDATE 2
#!/bin/bash
# version 0.4z
## Download FFMPEG static daily build and it's md5
##
## To make this script working you might need to change the below values
## based on whether you are using a 32bit or 64 bit OS
## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
## and then change those below
##
## Finished and working script should be distributed under GPLv3: free as in freedom
##
## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
## point 5.
# a "~" means running users home folder :) and should be different from destination dir
download_dir=~
# as this can change if the ffmpeg is to be stored on ex. shared server
dest_dir=/usr/bin/
# The version it equal the filename from above link
version=ffmpeg-git-64bit-static.tar.xz
## Do not change anything below here!!
source_url=https://johnvansickle.com/ffmpeg/builds/${version}
md5="curl -s https://johnvansickle.com/ffmpeg/builds/${version}.md5"
# Still to come, see if the script runs with write privileges else exit
# 1. Can we enter download directory else exit
cd ${download_dir} ||
printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&2
exit 1
# 2. Check the md5 is correct or have changed from last check
## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
## regardless if it is new or not, I recommend only downloading it
## if the md5 does not match. Would save John some bandwidth at least
## thx for the idea to @LordNeckbeard
## This is getting more advance than expected for a first time script :/
if diff <(md5sum ${version}) <(${md5})
then
printf "%s\n" "No new version availeble" >&2
exit 1
elif ! diff <(md5sum ${version}) <(${md5})
then
rm -f ${version}
curl ${source_url} > ${version}
exit 0
#only proceed if downloaded version match it's md5
if ! diff <(md5sum ${version}) <(${md5})
then
rm -f ${version}
printf "%s\n" "Downloaded version is damaged, try later\ndamaged version have been deleted" >&2
exit 1
fi
# 3. untar
tar -xf ffmpeg-git-*-static.tar.xz
# 4. Move builds to destination directories
mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/
# 5. Make soft links to static builds
ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver
# Remove unzipped folder to do some clean up
rm -fr ffmpeg-git-*-static/
printf "%s\n" "Going to install new version" >&2
exit 1
fi
#EOFBut still having some issues :(
- Running this script returns : a blanc shell, but I’ve expected one of the printf statements
- When I’m trying to narrow down the problem and going back to basic and trying to run the script with only the "if" part it fails with 44 : Syntax error : "(" unexpected
-
running the very same "if" part typed directly into the shell/terminal itself it’s all happy !!
if diff <(md5sum ffmpeg-git-64bit-static.tar.xz) <(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then printf "%s\n" "No new version availeble" >&2; elif ! diff <(md5sum ffmpeg-git-64bit-static.tar.xz) <(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then rm -f ffmpeg-git-64bit-static.tar.xz; curl https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz > ffmpeg-git-64bit-static.tar.xz; printf "%s\n" "Going to install new version" >&2; fi
-
I’m confused