w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How to configure PhpMyAdmin on NGINX (Windows)
server { listen 80; server_name localhost; location / { root C:MHServerwww; index index.php index.html index.htm; } location = / { root C:MHServerwww; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root C:MHServerwww; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ .php$ { root C:MHServerwww; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; in

Categories : C#

How to configure nginx with multiple server
This should be a good lead for you towards the solution: upstream tornado { server 127.0.0.1:8000; server 127.0.0.1:8001; } upstream geoserver{ server 127.0.0.1:8080; server 127.0.0.1:8081; } server { server_name _; listen 80; location = /tornado { proxy_pass http://tornado; } location = /geoserver { proxy_pass http://geoserver; } } Hope it helps!

Categories : Nginx

Configure Nginx to use cherrypy framework
You can use uwsgi for serve the cherry application. check this link: http://nileshgr.com/2012/08/27/getting-cherrypy-working-with-uwsgi

Categories : Nginx

How to configure proxy servers with puppet nginx?
Use nginx::resource::vhost The source of the repo you are using gives a breakdown of the commands you will need to use: https://github.com/puppetlabs/puppetlabs-nginx/blob/master/manifests/resource/vhost.pp

Categories : Nginx

How to configure Phalcon in the Nginx config file
This is the link to the official phalcon nginx configurations. http://docs.phalconphp.com/en/latest/reference/nginx.html

Categories : PHP

How to correctly configure Nginx for PHP (Yii framework and Zurmo)
I don't think you need the if() statement in your *.php block. In my nginx setups that's all i ever needed: # Process PHP files location ~ .php$ { fastcgi_split_path_info ^(.+.php)(/.+)$; # Include the standard fastcgi_params file included with nginx include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; }

Categories : PHP

How to configure nginx + Unicorn to avoid timeout errors?
Is there a way to handle this kind of problems? Do the job in background. You should have a separate process that gets jobs from queue one by one and processes them. And since it doesn't work with user requests, it can do its job as long as needed. You don't need unicorn for this, just a separate daemon.

Categories : Ruby On Rails

How to configure nginx rules so that if one failed it serve the request using another
http://wiki.nginx.org/HttpCoreModule#try_files try_files is your friend, here you can do the order you want to try files and finaly have the proxypass upstream.

Categories : Nginx

Configure Nginx to serve "/" from a directory already inside root
server{ root /var/www; location = / { root /var/www/home; } location / { } } Reference: http://nginx.org/r/root http://nginx.org/r/location How nginx processes a request Understanding the Nginx Configuration Inheritance Model

Categories : Nginx

How to configure nginx to try_files first, if not exists follow the request_uri
I never tried this my self before but this is how I would write it location / { # or whatever location you see fit to your requirements try_files $uri.html $uri; # I don't know if the `.` needs to be escaped `$uri.html`, you can try both }

Categories : Nginx

Nginx - configure location regex for all static file in sub alias
try to add rewrite directive in sub location. Just like this: location /site1 { location ~* .(jpg|jpeg|gif|png|css|js|ico|xml|rss|txt)$ { rewrite "^/site1/(.*)$" /$1 break; root /path/to/anothersite1; } proxy_pass apache:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; }

Categories : File

How can I configure nginx and fcgi to call separate executables depending on request-uri
You can do it with nginx and fcgi. The simplest way to do this is, by using spawn-fcgi - First you will need to setup your nginx.conf. Add the following inside the server {} block - location /index { fastcgi_pass 127.0.0.1:9000; include fastcgi_params; } location /contact { fastcgi_pass 127.0.0.1:9001; include fastcgi_params; } location /view_post { fastcgi_pass 127.0.0.1:9002; include fastcgi_params; } Restart nginx and then run your apps listening same ports as declared in the nginx.conf. Assuming your programs are in ~/bin/ folder - ~ $ cd bin ~/bin $ spawn-fcgi -p 9000 ./index ~/bin $ spawn-fcgi -p 9001 ./contact ~/bin $ spawn-fcgi -p 9002 ./view_post Now the requests to localhost/index will forward to your index program and its output will go back to ngi

Categories : Nginx

configure nginx to get js and css directly from public folder of node.js express site
A 403 forbidden response may be related to the nginx process don't having permission to read the files. Check that the folder public is recursively readable by the user running nginx and change the permissions if needed: sudo chmod -R 744 /root/pathToNodeJsExpressSiteFolder/public

Categories : Node Js

Android FFMPEG: Could not execute the ffmpeg from Java code
Do you have root on the device? Mount '/data' and then enter your same 'ffmpeg' command in the shell and see whether the error is the same. Try using the shell to test out different command expressions. Try 'ffmpeg' alone and with just one input file. See whether those commands produce expected output. My wild guess would be that there is an issue with calling 'ffmpeg.main()' that relates to the details of your build.

Categories : Android

Where is my nginx being configured? Changing nginx.conf still brings me to the 'Welcome to nginx' page
when you rewrited the nginx.conf in the folder of source code of nginx and installed it firstly, it will be copied to /usr/local/nginx/conf/nginx.conf (without specially modification of the configure in the folder of source code). But when you do this secondly, the nginx.conf in the folder of source code will be copied to /usr/local/nginx/conf/nginx.conf.defualt,and it usually don't work unless you use nginx -c /usr/local/nginx/conf/nginx.conf.defualt to assign its configure file evertime. There is a line NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" in your script above,which indicates the configure file clearly. To handle this, I suggest rewrite /usr/local/nginx/conf/nginx.conf (not the one in the folder of source code) instead.

Categories : Nginx

Restarting nginx: nginx: [alert] Unable to start the Phusion Passenger watchdog because its executable
Passenger takes what you set in the file nginx.conf by passenger_ruby, for example: passenger_root /home/dev/.rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5; passenger_ruby /home/dev/.rvm/wrappers/ruby-1.9.3-p448/ruby;

Categories : Ruby

Can a server run Nginx for some sites and Apache Nginx Reverse Proxy for others?
server { server_name example.com; location / { # assuming apache is on port 81 for example proxy_pass http://127.0.0.1:81; # to make apache detect the host header proxy_set_header Host $host; } # if you have assets folders, you can let nginx serve them directly, # instead of passing them to apache location /images { # or /css or /js .. etc try_files $uri =404; } } Note: in the case of assets, sometimes some sites serve assets through rewrites, or even handled by the application it self, you can pass it to apache by adding that in the assets location as a fallback like this location /images { try_files $uri @apache; } location @apache { proxy_pass http://127.0.0.1:81; } In apache you create a virtual host <Virtua

Categories : Apache

Any way configure to configure visual studio mvc build views release mode
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

Categories : Asp Net Mvc

TFS 2012 Configure Features Error - Unable to configure Planning Tools
Try this: Rename your User Story to "Product Backlog Item". Set the Initial State of you "Bug" to "Active". Try the Upgrade Rename your User Story Type back to "User Story". Remove the "Active" Initial State. Export your Common Process Config and add in your "Proposed" State into the Bug Configuration (see below). Import your Common Process Config. Example BugWorkItems <BugWorkItems category="Microsoft.BugCategory"> <States> <State type="Proposed" value="Proposed" /> <!-- more --> </States> </BugWorkItems>

Categories : Tfs

ffmpeg get value from cropdetect
cropdetect outputs to the console, so you can parse the output and then use it as a variable: ffmpeg -i input -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1 This will result in something like: crop=640:480:0:50 Then run your actual crop command: ffmpeg -i input -vf $cropvalue,scale=240:-1 -vframes 1 -qscale:v 2 output.jpg -vcodec mjpeg, -an, and -f rawvideo are superfluous Use -qscale:v to control jpg output quality. A sane range is 2-5 (a lower value is a higher quality). Use the scale filter instead of -s; especially if you're already using filters. Also the scale filter will allow you to set a specific width or height and with -1 it will automatically provide the correct value to preserve aspect. Otherwise if you try to force a specific size

Categories : PHP

ffmpeg to convert all .jpg to mp4
I tried executing ffmpeg on Ubuntu 13.10 for doing exactly that but it started complaining with all sorts of errors. It seems ffmpeg is deprecated by avconv. Here is how I compiled my JPEGs into an .mp4 using avconv: avconv -r 30 -i line-%06d.jpg -qscale 2 -r 30 out.mp4 What I was trying to do is create a video of panning across a huge JPEG. If anyone's interested, details are here: Video panning across your family tree chart (.jpg to .mp4)

Categories : Bash

Remuxing mp4 on the fly with FFmpeg API
OK, another question researched and answered by self... Turns out, as I theorized in the question, mp4 file is not fully written until the end. During a direct disk write to a file, the producer would seek back to the start of the video and update all the pointers to various atoms. That is, the general structure of mp4 is ftyp -> mdat -> moov. Where moov contains all the meta about the contained tracks. Unfortunately, it is written last. However, its location is located in the header. That is why the seek is required: mdat is of varied length (because it contains raw encoded frames, there can be x number of them). Thus, the moov atom is offset by the length of mdat. When producer finishes writing the file, it will update the header with the proper location of moov. For additional referen

Categories : C

How to use FFMPEG commands
You should be able to spawn a process to run ffmpeg using ProcessBuilder: Process ffmpeg = new ProcessBuilder().command(args).start() if (ffmpeg.waitFor() != 0) { // handle failure case } (The above code blocks the current thread until ffmpeg finishes.) However, I think your bigger issue would be having to cross-compile and distribute versions of ffmpeg for every device you're targeting.

Categories : Android

How to decode mp3 to pcm by ffmpeg
One way to do this is to call the executable in the code: system("ffmpeg -i input.mp3 output.wav"); //assuming the executable name is ffmpeg and its location is in PATH environment variable Another way is to use the API. Example here, see the audio_decode_example() function in that file. Some tutorials: Linuxers' Tutorial "For Beginners": http://linuxers.org/tutorial/ffmpeg-tutorial-beginners Dranger: http://dranger.com/ffmpeg/ (slightly out of date) CodeProject: http://www.codeproject.com/Tips/111468/FFmpeg-Tutorial Mathew Bajoras's Tutorial: http://www.personal.psu.edu/mrb5282/tutorials/video_ffmpeg/

Categories : C

How to add album art with ffmpeg?
With Recent version, ffmpeg -i out.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3 Use -map to associate input stream to the output Use -c copy to directly demux/remux The -id3v2_version 3 is what is missing in your command line. Note that that wil write an IDV2.3 but you can ask for a 2.4 (-id3v2_version 4) with the -id3v2_version 3 option the -metadataoption will be well interpreted

Categories : PHP

ffmpeg + glfwGetTime()
You added the time the decoding needs to decode the Image to the 40ms you have to wait for displaying the next. This error is because you measure the time again at the end of your loop. instead of: } tiempo = glfwGetTime(); } write: } tiempo+=duraction; }

Categories : C++

Keep timecode in ffmpeg?
from man page: http://ffmpeg.org/ffmpeg.html ‘-copyts’ Do not process input timestamps, but keep their values without trying to sanitize them. In particular, do not remove the initial start time offset value. Note that, depending on the ‘vsync’ option or on specific muxer processing (e.g. in case the format option ‘avoid_negative_ts’ is enabled) the output timestamps may mismatch with the input timestamps even when this option is selected. ‘-copytb mode’ Specify how to set the encoder timebase when stream copying. mode is an integer numeric value, and can assume one of the following values: ‘1’ Use the demuxer timebase. The time base is copied to the output encoder from the corresponding input demuxer. This is sometimes required to avoid non monotonically increasin

Categories : Osx

FFmpeg package for php
Yes simple ffmpeg does work through PHP exec if you have necessary permissions. Sample command <?php /*** convert video to flash ***/ exec("ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv"); ?> Source

Categories : PHP

Qt C++ ffmpeg cannot find library
Configure PRO-file as shown below: INCLUDEPATH += C:programmingffmpeg-20130606-git--win32-devinclude LIBS += -LC:programmingffmpeg-20130606-git--win32-devlib LIBS += -lavcodec -lavformat -lavutil Then, build the project, copy the all dll libraries from C:programmingffmpeg-20130606-git--win32-sharedin to exe output path and run application. UPD Maybe you need to copy some of the following libraries from Qt5.0.2mingw47_32in: libgcc_s_sjlj-1.dll libstdc++-6.dll libwinpthread-1.dll

Categories : C++

ffmpeg set auto height
I dont know if it is possible via ffmpeg (but I dont think so, because I was using ffmpeg a while ago and dont remember there was something like this in api), but your goal would be to run one more ffpeg command to get informations about the file and then you can fit your height and width via php: $cmd = "ffmpeg -i /var/www/web1/bates.avi 2>&1"; if(preg_match('/Video: ((w+), (w+), (w+))/s', `$cmd`, $video)) { $video = $video[1]; print_r($video); //flv, yuv420p, 384x204 #or $video = $video[4]; print_r($video); //384x204 }

Categories : PHP

How to call ffmpeg from Activity?
You should follow basically this steps: Build ffmpeg for android (http://bambuser.com/opensource) Load the ffmpeg library (*.so) on your app Use native calls (JNI) to call ffmpeg APIs

Categories : Android

FFmpeg: HLS options cannot be set/get/find
Try passing in the priv_data field of AVFormatContext (ofmt->priv_data) instead of the struct itself. It will be NULL at this point in your code but it gets filled in after a call to avformat_write_header. av_opt_set_int(ofmt->priv_data, "hls_list_size", 10, AV_OPT_SEARCH_CHILDREN) should work at that point. If the options need to be set before calling avformat_write_header() like your options for Live Streaming, you should pass them as the AVDictionary** options argument to that function.

Categories : C++

ffmpeg process saying it is erroring
What you are experiencing is the standard practice across all *NIX tools: they send the "business value" data to stdout and separately send any diagnostic output to stderr. This is an important hallmark of tools written in the "small is beautiful" paradigm, which greatly values the concept of piping one tool's output into the next one's input, thereby creating an ad-hoc chain of information processing. The complete scheme would break down if the tool sent "Processing... 50% done" kind of output to stdout. Feel free to ignore such output on stderr, but make sure you consume it, as you are doing now, in order to avoid blocking due to overfull output buffers.

Categories : Java

Can ffmpeg be used to output to bytes
Yes, it is. You gotta learn how to use the other protocols FFmpeg has. Input/output to a file is just a particular protocol... but you can output, for example, to a socket, to a FTP/HTTP, and so on... It's very easy for anyone to create a new protocol (in C, of course) and register it with FFmpeg. I don't think FFmpeg has a built-in solution to write to a buffer, but for sure it's possible. I've done this once.

Categories : C#

FFmpeg error code 254
Error code 254 for FFprobe means: File not found. Thanks to blahdiblah for the tip removing -v quiet from the command. The TESTVIDEOPATH was given with " at the beginning and end to get spaces in the pathname to work. When executing it, Java excaped these " and put some extra around.

Categories : Java

Problems with executing FFMPEG through PHP
Any time you have an exec that doesn't work in php, you should switch to passthru for debugging. passthru('../../../../../../usr/bin/ffmpeg -ab 320k -i source.wav dest320.mp3 1 2>&1'); Appending 1 2>&1 to the end, pipes your stderr to stout, and returns any errors you have while running your exec.

Categories : PHP

FFMPEG compiling on heroku
I have forgotten to add all subpaths to the LD_LIBRARY_PATH So I changed my heroku variable from LD_LIBRARY_PATH: vendor/ffmpeg/lib:/usr/local/lib to LD_LIBRARY_PATH: vendor/x264/lib:vendor/mp3lame/lib:vendor/ffmpeg/lib:/usr/local/lib via heroku config:set LD_LIBRARY_PATH=vendor/x264/lib:vendor/mp3lame/lib:vendor/ffmpeg/lib:/usr/local/lib I have made a gist with detailed compiling instructions for FFMPEG on HEROKU https://gist.github.com/klangfeld/6009744

Categories : Ruby On Rails

Run FFmpeg executable from sdcard
You can issue permissions pragmatically to any files that resides on sd-card. Create a file object and try this file.setExecutable(boolean); – true, allows execute, false disallows it. I hope this works.

Categories : Java

How can I seek to frame No. X with ffmpeg?
av_seek_frame will only seek based on timestamp to the key-frame. Since it seeks to the keyframe, you may not get what you want. Hence it is recommended to seek to nearest keyframe and then read frame by frame util you reach the desired frame. However, if you are dealing with fixed FPS value, then you can easily map timestamp to frame index. Before seeking you will need to convert your time to AVStream.time_base units if you have specified stream. Read ffmpeg documentation of av_seek_frame in avformat.h. For example, if you want to seek to 1.23 seconds of clip: double m_out_start_time = 1.23; int flgs = AVSEEK_FLAG_ANY; int seek_ts = (m_out_start_time*(m_in_vid_strm->time_base.den))/(m_in_vid_strm->time_base.num); if(av_seek_frame(m_informat, m_in_vid_strm_idx,seek_ts, flgs)

Categories : C

Need help on ffmpeg batch script
This would be my suggestion. Looks like this was follow-up from your previous thread. #!/bin/bash [ -n "$BASH_VERSION" ] || { echo "You need Bash to run this script." exit } shopt -s extglob || { echo "Unable to enable exglob." exit 1 } until read -erp "Drop source folder: " SOURCE [[ -d $SOURCE ]] do echo "Drop source folder does not exist: $SOURCE" echo "You can abort this script by pressing CTRL-C." done until read -erp "Drop destination folder: " DES [[ -d $DES ]] do echo "Drop destination folder does not exist: $DES" echo "You can abort this script by pressing CTRL-C." done while IFS= read -r FILE; do BASE=${FILE##*/} NOEXT=${BASE%.???} echo ffmpeg -i "$FILE" -vcodec prores -profile:v 0 -an "$DES/${NOEXT}.mov" ## Remov

Categories : Bash



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.