Quantcast
Channel: MediaSPIP
Viewing all 117762 articles
Browse latest View live

Executable 'ffmpeg' not found in python

$
0
0

I'm trying to compress a video using python but there is an error that I can't understand how to solve it, so can you help me please ? I have attached an image and the code enter image description here

import ffmpy input_name = input("Enter name of input file: ")
crf = int(input("Enter constant rate factor between 18 and 24: "))
output_name = input("Enter output file name: ")
inp = {input_name: None}
outp = {output_name: '-vcodec libx264 -crf %d'%crf} #video codec and compression rate
ff = ffmpy.FFmpeg(inputs=inp, outputs=outp) #creates an FFmpeg object
print(ff.cmd) #just to verify that it produces the correct ffmpeg command
ff.run() #does the compression
print("done!")

Running, I get

Enter name of input file: newproject.mp4
Enter constant rate factor between 18 and 24: 20
Enter output file name: "com.mp4"
ffmpeg -i newproject.mp4 -vcodec libx264 -crf 20 com.mp4
Traceback (most recent call last): File "E:/ahmed/Installed Programs/PyCharm/SelecedTopics/bonus2.py", line 10, in  ff.run() #does the compression File "E:\ahmed\Python\Anaconda\lib\site-packages\ffmpy.py", line 99, in run raise FFExecutableNotFoundError("Executable '{0}' not found".format(self.executable))
ffmpy.FFExecutableNotFoundError: Executable 'ffmpeg' not found Process finished with exit code 1
-- enter image description here

mdct15: simplify the fft15 x86 SIMD

$
0
0
mdct15: simplify the fft15 x86 SIMD Saves 1 gpr and 2 instructions and simplifies the macros a bit. Signed-off-by: Rostislav Pehlivanov 
  • [DH] libavcodec/x86/mdct15.asm

Merging 2 audios files with a video in ffmpeg

$
0
0

I'm trying to merge 2 audio file .WAV with 1 video file .MP4 to produce the output in .MP4 extension using CMD in Windows.

This is what i have tried :

ffmpeg -i V.MP4 -i A1.WAV -i A2.WAV -map 0:v -map 1:a -map 2:a -c:v copy -vcodec copy Output.MP4

The CMD output for that is :

enter image description here

This command will output the Output.MP4 file but it will merge the video with only 1 of the audio files which is A2.WAV and ignores the other audio file A1.WAV

Now i want to merge without re-encoding without any offset, just merge the 3 files like they are in a file .MP4 file.

I checked some topics here in stackoverflow like this and this but they didn't help.

-- enter image description here

mdct15: simplify x86 exptab permutation

$
0
0
mdct15: simplify x86 exptab permutation Removes an unneeded copy and does the 5-point permute in-place. Signed-off-by: Rostislav Pehlivanov 
  • [DH] libavcodec/x86/mdct15_init.c

How to have low buffer when capturing sound with FFmpeg

$
0
0

I'm capturing sound from the jack input of a computer and sending that to a Icecast server, using FFmpeg.

See the line :

/usr/bin/ffmpeg -f alsa -i plughw:1 -c:a libmp3lame -b:a 96k -ar 32000 -content_type audio/mpeg -f mp3 icecast://source:password@myserver.net:8000/live

On the Icecast side, I use default settings, and play the stream with mplayer.

But the bandwidth on both sides is quite low (3G connections), thus after a while, the delay goes up to a few minutes, so I have to restart ffmpeg.

I'm quiet sure now that ffmpeg keeps collecting data when frames are dropped by the network, but it keeps them until the connection comes back and then sends them to icecast.

How can I tell FFmpeg to stay synchronised with the sound card? Or have a maximum of 5 seconds delay ?

Thank you!

ffmpeg override output file if exists

$
0
0

I am creating a clip from an audio file .FLAC with a start and end time, here is my command.

ffmpeg -i /audio/191079007530_1_01.flac -t 51 -ss 69 /clips/44z274v23303t264y2z2s2s2746454t234_clip.mp3 2>&1 >> /ffmpegLogs.log

I use this command with my PHP code and my question is,

When i run this command on the console it asks me to override the output file if the output file already exists in the destination, what switch or extra command should I use to automatically override if the file exists.

Command line tool to get mediainfo on Android

$
0
0

I am looking for a command line tool to get media information on Android. I have tried compiling ffmpeg for Android but have not got much success to build the same from source for Android. Also the output of ffmpeg is not as simple and lucid as tool like mediainfo which is present on Ubuntu.

It would be helpful if someone could suggest a simple command line tool to get relevant media information on Android.

How to make ffmpeg automatically fill frames?

$
0
0

I want to use ffmpeg to convert a sequence of images to a video, the images are got in realtime, the interval of getting image is changeable, maybe i get next image in 1 second or even 1 millisecond. I want the target video in a special fps(like 100), now my implement is creating a loop, which fade ffmpeg last image then sleep(like 10ms).

Do you guys know some options could let ffmpeg fill frames automatically?

If that option do exist, i wonder is that possible to make video real fps is half of it is claimed.

My ffmpeg command likes follow:

ffmpeg -f image2pipe -r 100 -i pipe:0 -f flv -r 100 pipe:1

lavfi/nlmeans: add SIMD-friendly assumptions for compute_safe_ssd_integral_image

$
0
0
lavfi/nlmeans: add SIMD-friendly assumptions for compute_safe_ssd_integral_image SIMD code will not have to deal with padding itself. Overwriting in that
function may have been possible but involve large overreading of the
sources. Instead, we simply make sure the width to process is always a
multiple of 16. Additionally, there must be some actual area to process
so the SIMD code can have its boundary checks after processing the first
pixels.
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: use ptrdiff_t for linesizes

$
0
0
lavfi/nlmeans: use ptrdiff_t for linesizes Similarly to previous commit, this will help writing SIMD code by not
having manual zero-extension in SIMD code
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_image

$
0
0
lavfi/nlmeans: add AArch64 SIMD for compute_safe_ssd_integral_image ssd_integral_image_c: 49204.6
ssd_integral_image_neon: 28346.8
  • [DH] libavfilter/aarch64/Makefile
  • [DH] libavfilter/aarch64/vf_nlmeans_init.c
  • [DH] libavfilter/aarch64/vf_nlmeans_neon.S
  • [DH] libavfilter/tests/integral.c
  • [DH] libavfilter/vf_nlmeans.c
  • [DH] libavfilter/vf_nlmeans.h

checkasm: add vf_nlmeans test for ssd_integral_image

$
0
0
checkasm: add vf_nlmeans test for ssd_integral_image
  • [DH] tests/checkasm/Makefile
  • [DH] tests/checkasm/checkasm.c
  • [DH] tests/checkasm/checkasm.h
  • [DH] tests/checkasm/vf_nlmeans.c

lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster

$
0
0
lavfi/nlmeans: make compute_safe_ssd_integral_image_c faster before: ssd_integral_image_c: 49204.6
after: ssd_integral_image_c: 44272.8 Unrolling by 4 made the biggest difference on odroid-c2 (aarch64);
unrolling by 2 or 8 both raised 46k cycles vs 44k for 4. Additionally, this is a much better reference when writing SIMD (SIMD
vectorization will just target 16 instead of 4).
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: switch from double to float

$
0
0
lavfi/nlmeans: switch from double to float Overall speed appears to be 1.1x faster with no noticeable quality
impact.
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: move final weighted averaging out of nlmeans_plane

$
0
0
lavfi/nlmeans: move final weighted averaging out of nlmeans_plane This helps figuring out where the filter is slow: 70.53% ffmpeg_g ffmpeg_g [.] nlmeans_slice 25.73% ffmpeg_g ffmpeg_g [.] compute_safe_ssd_integral_image_c 1.74% ffmpeg_g ffmpeg_g [.] compute_unsafe_ssd_integral_image 0.82% ffmpeg_g ffmpeg_g [.] ff_mjpeg_decode_sos 0.51% ffmpeg_g [unknown] [k] 0xffffffff91800a80 0.24% ffmpeg_g ffmpeg_g [.] weight_averages (Tested with a large image that takes several seconds to process) Since this function is irrelevant speed wise, the file's TODO is
updated.
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: reorder memory accesses in get_integral_patch_value

$
0
0
lavfi/nlmeans: reorder memory accesses in get_integral_patch_value This doesn't seem to make much of a difference but it can't hurt.
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: use unsigned for the integral patch value

$
0
0
lavfi/nlmeans: use unsigned for the integral patch value This value can not be negative.
  • [DH] libavfilter/vf_nlmeans.c

lavfi/nlmeans: inline integral patch value function

$
0
0
lavfi/nlmeans: inline integral patch value function This prevents redundant position computation and make the code faster
(1.1x faster overall).
  • [DH] libavfilter/vf_nlmeans.c

fate/hapenc : remove tests due to inconsistent result

$
0
0
fate/hapenc : remove tests due to inconsistent result
  • [DH] tests/fate/hap.mak

Install ffmpeg on centos server

$
0
0

while installing ffmpeg on my centos server.I get this error while running ./configure: checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option

cd /usr/local/src wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc tar -xjf ffmpeg-php-0.6.0.tbz2 phpize ./configure make make install
Viewing all 117762 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>