
Recherche avancée
Autres articles (51)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
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
Sur d’autres sites (4426)
-
FFMPEG convert .mpg video to .mp4 without lose quality
12 novembre 2015, par reteriusHow can i convert video .mpg to .mp4 wihtout love quality. My codes below :
$INCPATH = dirname(__FILE__).'/';
$id = 99999;
$ext = "MPG" ;
$input_dir = $INCPATH."../img/videos/".$id.".".$ext ;
$output_dir2 = $INCPATH."../img/videos/".$id.".mp4" ;
$q = '/usr/bin/ffmpeg -i '.$input_dir.' -c:v libx264 -c:a libfaac -r 30 '.$output_dir2." 2>&1" ;
$out = shell_exec($q) ;
$input_dir = $output_dir2 ;
echo var_dump($out);Response that :
string(5735) "ffmpeg version N-76539-g480bad7-syslint Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslint
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from '/home/imcajans/public_html/kzmk/../img/videos/99999.MPG':
Duration: 00:00:08.16, start: 0.116600, bitrate: 2955 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 9100 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
[libx264 @ 0x161e820] using SAR=64/45
[libx264 @ 0x161e820] using cpu capabilities: none!
[libx264 @ 0x161e820] profile High, level 3.1
[libx264 @ 0x161e820] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/home/imcajans/public_html/kzmk/../img/videos/99999.mp4':
Metadata:
encoder : Lavf57.14.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc57.15.100 libx264
Stream #0:1: Audio: aac (libfaac) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc57.15.100 libfaac
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfaac))
Press [q] to stop, [?] for help
frame= 48 fps=0.0 q=0.0 size= 0kB time=00:00:01.19 bitrate= 0.3kbits/s dup=8 drop=0
frame= 66 fps= 58 q=29.0 size= 20kB time=00:00:01.83 bitrate= 87.2kbits/s dup=11 drop=0
frame= 77 fps= 43 q=29.0 size= 51kB time=00:00:02.17 bitrate= 190.3kbits/s dup=13 drop=0
frame= 89 fps= 38 q=29.0 size= 86kB time=00:00:02.60 bitrate= 272.2kbits/s dup=15 drop=0
frame= 101 fps= 34 q=29.0 size= 124kB time=00:00:02.98 bitrate= 340.6kbits/s dup=17 drop=0
frame= 114 fps= 32 q=29.0 size= 166kB time=00:00:03.39 bitrate= 400.3kbits/s dup=19 drop=0
frame= 126 fps= 31 q=29.0 size= 201kB time=00:00:03.84 bitrate= 428.3kbits/s dup=21 drop=0
frame= 137 fps= 30 q=29.0 size= 236kB time=00:00:04.20 bitrate= 459.6kbits/s dup=23 drop=0
frame= 151 fps= 29 q=29.0 size= 275kB time=00:00:04.65 bitrate= 484.2kbits/s dup=25 drop=0
frame= 165 fps= 29 q=29.0 size= 316kB time=00:00:05.12 bitrate= 505.4kbits/s dup=27 drop=0
frame= 177 fps= 28 q=29.0 size= 350kB time=00:00:05.50 bitrate= 521.3kbits/s dup=29 drop=0
frame= 188 fps= 27 q=29.0 size= 387kB time=00:00:05.93 bitrate= 534.6kbits/s dup=31 drop=0
frame= 198 fps= 27 q=29.0 size= 419kB time=00:00:06.25 bitrate= 548.7kbits/s dup=33 drop=0
frame= 212 fps= 27 q=29.0 size= 461kB time=00:00:06.72 bitrate= 562.4kbits/s dup=35 drop=0
frame= 223 fps= 26 q=29.0 size= 495kB time=00:00:07.04 bitrate= 576.6kbits/s dup=37 drop=0
frame= 240 fps= 26 q=29.0 size= 574kB time=00:00:07.59 bitrate= 618.9kbits/s dup=40 drop=0
frame= 245 fps= 20 q=-1.0 Lsize= 834kB time=00:00:08.17 bitrate= 835.9kbits/s dup=41 drop=0
video:696kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.134396%
[libx264 @ 0x161e820] frame I:2 Avg QP:22.05 size: 10777
[libx264 @ 0x161e820] frame P:187 Avg QP:22.67 size: 3323
[libx264 @ 0x161e820] frame B:56 Avg QP:23.98 size: 1242
[libx264 @ 0x161e820] consecutive B-frames: 54.7% 44.1% 1.2% 0.0%
[libx264 @ 0x161e820] mb I I16..4: 33.5% 63.9% 2.5%
[libx264 @ 0x161e820] mb P I16..4: 1.9% 1.8% 0.0% P16..4: 46.9% 4.7% 6.4% 0.0% 0.0% skip:38.3%
[libx264 @ 0x161e820] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 34.4% 0.5% 0.0% direct: 3.1% skip:61.8% L0:41.1% L1:57.8% BI: 1.1%
[libx264 @ 0x161e820] 8x8 transform intra:51.1% inter:96.1%
[libx264 @ 0x161e820] coded y,uvDC,uvAC intra: 25.1% 86.2% 30.4% inter: 9.5% 38.5% 1.1%
[libx264 @ 0x161e820] i16 v,h,dc,p: 41% 5% 11% 43%
[libx264 @ 0x161e820] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 6% 48% 1% 1% 3% 1% 3% 1%
[libx264 @ 0x161e820] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 54% 10% 15% 3% 3% 8% 2% 5% 2%
[libx264 @ 0x161e820] i8c dc,h,v,p: 66% 12% 18% 3%
[libx264 @ 0x161e820] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x161e820] ref P L0: 66.7% 5.8% 17.5% 10.0%
[libx264 @ 0x161e820] ref B L0: 81.1% 18.9% 0.0%
[libx264 @ 0x161e820] ref B L1: 99.5% 0.5%
[libx264 @ 0x161e820] kb/s:697.87
"And my video which has .mpg extention its best quality : https://imcajans.com/img/videos/99999.mpg
And my video which coverted from .mpg to .mp4 its bad quality : https://imcajans.com/img/videos/99999.mp4
-
How to sell Piwik services without any confusion ?
10 octobre 2017, par InnoCraft — PluginsAs you may know, Piwik is a Free software under the GPL license which guarantees you :
- The freedom to run the program for any purpose.
- The freedom to study how it works and change it.
- The freedom to improve the program, and release your changes.
- The freedom to redistribute it under the GPL license, and to sell it if you wish.
In this article we will focus on the Free aspect of Piwik, which is how to rebrand Piwik, how to offer your clients a better experience, and possibly how to make a profit from it ?
How to sell Piwik services as an agency ?
As a web analytics software, Piwik is often installed by web agencies when it comes to designing a brand new website for a given customer.
Most of the time agencies are using Piwik for the following reasons :- free of charge
- data ownership
- user privacy compliance
- feature rich while easy to use
- open source
Most of the agencies are charging their customers for the installation process, tracking code implementation, analysing reports to get insights about users… but do you know that you could also sell the software as your own brand ? This is where the “White Label” plugin, developed by the InnoCraft company, comes into play.
White labelling for Piwik
Creating a “white label” plugin came into the mind of InnoCraft founders when they realized that on any modern Piwik installation, the following components were visible :
- Piwik branded widgets within the dashboards
- Piwik marketplace plugin teasers on the admin page
- Piwik help and support pages
- the “Piwik” word in general
- Piwik Mobile app banners
Example of Piwik branded widgets
In order to remove all those mentions of Piwik and to start selling this web analytics under your own name, you can either hack Piwik on your own (it is going to take you some precious time and money) or have a look at the White Label plugin on the marketplace where InnoCraft has solved all the challenges already for you.
The White Label plugin is straightforward. Once downloaded and installed, you will have access to a dedicated interface where you will be able to change the Piwik name by a new custom brand of your choice :
Piwik White Label settings
Once you click Save, all “Piwik” mentions will be substituted by your company name/service :
Here the Piwik version is changed by the name of the company
How to make your installation even more customized ?
Few Piwik users know about this trick, but since 2014 the Piwik templates can be customized through Themes. You are free to design your own template, installing existing ones, or even monetize them through the marketplace :
A simple example of how Piwik can be easily customized, here fonts and colours are changed
If you want to know how you can tweak your existing template and make it match your brand and image, just follow our theme documentation. A simple theme with your colors can be built in a few minutes simply by defining different color codes. You can also browse the public themes on the Marketplace.
Tell us your story
If you are an agency or any business related in selling Piwik services, we recommend having a look at our FAQ for rebranding, selling, reusing, re-licensing, and including Piwik in my offering. Are you interested or already re-selling Piwik services ? We would love to hear your story and write a blog post about it.
Do not hesitate to contact the Piwik core team, we’re looking forward to hearing from you.
-
Problem playing a sound with pydub Error : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1
28 mai 2020, par studioDKRI have a problem getting a file played in the browser with pydub. I think the function is working, but I just don't get the right file path to it, or something else is missing. Would love to get your help !



I get the pydob error message : pydub.exceptions.CouldntDecodeError : Decoding failed. ffmpeg returned error code : 1



Here is the error I get :



[2020-05-28 16:04:33,023] ERROR in app: Exception on /overview [POST]
Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
 response = self.full_dispatch_request()
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
 rv = self.handle_user_exception(e)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
 reraise(exc_type, exc_value, tb)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
 raise value
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
 rv = self.dispatch_request()
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
 return self.view_functions[rule.endpoint](**req.view_args)
 File "/Users/Micha/Documents/GitHub/podprod/app.py", line 109, in overview
 sound = AudioSegment.from_file(filepath)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pydub/audio_segment.py", line 723, in from_file
 raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

b'ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers\n built with Apple clang version 11.0.3 (clang-1103.0.32.59)\n configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack\n libavutil 56. 31.100 / 56. 31.100\n libavcodec 58. 54.100 / 58. 54.100\n libavformat 58. 29.100 / 58. 29.100\n libavdevice 58. 8.100 / 58. 8.100\n libavfilter 7. 57.100 / 7. 57.100\n libavresample 4. 0. 0 / 4. 0. 0\n libswscale 5. 5.100 / 5. 5.100\n libswresample 3. 5.100 / 3. 5.100\n libpostproc 55. 5.100 / 55. 5.100\n/Users/Micha/documents/github/podprod/uploads/test2.wav: Invalid data found when processing input\n'




This is the Flask route with the function I am writing.



@app.route("/overview", methods=["GET", "POST"])
def overview():

 entries = []

 # Open a file
 path = app.config["FILE_UPLOADS"]

 with os.scandir(path) as dirs:
 for entry in dirs:
 entries.append(entry.name)

 if request.method == "POST":
 filename = request.form['filename']

 filepath = os.path.join(app.config["FILE_UPLOADS"], filename)

 # Play the sound
 sound = AudioSegment.from_file(filepath)
 play(sound)

 return render_template('overview.html', entries=entries)




Here is the HTML template :



{% extends 'main_template.html' %}

 {% block title %}PodProd Podcast Overview{% endblock %}

 {% block main %}

 <div class="container">

 <h1>Here is an overview of your files</h1>

 <table class="table table-striped">
 <tr>
 <th>Filename</th>
 <th>Action</th>
 </tr>
 {% for result in entries %}
 {% if ".wav" in result %}
 <tr>
 <td>{{ result }}</td>
 <td><form action="" method="POST"> <button type="submit" class="btn btn-primary" value="{{" result="result">Play</button></form>
 </td></tr>
 {% endif %}
 {% endfor %}
 </table>

 </div>

 {% endblock %}