Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg filter to rotate image around point
6 avril 2016, par SebSobDoes anyone know how to rotate an image to its start point (top-left corner) instead of the center point (default) with the FFmpeg -vf rotate?
In this example I try to rotate a red squared image (test_sq.png) 30 degrees from its start point on in.png placed at coord 423:259 resulting in out.png.
This is my command:
ffmpeg -y -i in.png -pix_fmt bgra -strict experimental -vf movie=test_sq.png scale=279:279 rotate=30*PI/180:c=none:oh=ow [sticker]; [in][sticker] overlay=423:259 [out] -s 1280x720 out.png
To visualize it:
As you can see it rotates from its center point and also clips the original image, not really good. Anyone have suggestions or ideas how to achieve what i need?
-
Node fluent-ffmpeg stream output error code 1
6 avril 2016, par HarangueFollowing the documentation exactly, I'm attempting to use a stream to write a video conversion to file.
var FFmpeg = require('fluent-ffmpeg'); var fs = require('fs'); var outStream = fs.createWriteStream('C:/Users/Jack/Videos/test.mp4'); new FFmpeg({ source: 'C:/Users/Jack/Videos/video.mp4' }) .withVideoCodec('libx264') .withAudioCodec('libmp3lame') .withSize('320x240') .on('error', function(err) { console.log('An error occurred: ' + err.message); }) .on('end', function() { console.log('Processing finished !'); }) .writeToStream(outStream, { end: true });
This conversion works perfectly when I use .saveToFile(), but returns
An error occurred: ffmpeg exited with code 1
When I run this code. I'm on Windows 8.1 64 bit using a 64 bit ffmpeg build from here.
-
Error ffmpeg and libvpx to convert to webm [closed]
6 avril 2016, par Olaf ErlandsenI have a problems with Ffmpeg and Libvpx on Centos6 Server.
Command:
ffmpeg -y -i /var/www/f1ccd3a27d36270492ce660da358b436.mp4 -t 99 acodec copy -vcodec libvpx -f webm /var/www/f1ccd3a27d36270492ce660da358b436.webm 2<&1
Output:
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 1 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/vhosts/f1ccd3a27d36270492ce660da358b436.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 108 kb/s Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc Unknown encoder 'libvpx'
Ffmpeg configuration:
--prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
Problem:
Unknown encoder 'libvpx'
-
How can I pipe a bitmap to ffmpeg's image2pipe, directly from C# ?
6 avril 2016, par EricIs it possible to pipe a bitmap to ffmpeg's image2pipe, directly from C#? I know this is possible with C++, but I'm not familiar with C#.
Thanks
-
Adding total duration information in mp4 audio stream file with FFMPEG
6 avril 2016, par lex82I'm trying to write an AAC audio stream into an mp4 file using the FFMPEG libraries. I am using a custom IO context that writes directly to a socket so I have to set
ioContext->seekable = 0
. To make this work I had to add the "movflags"empty_moov
andfrag_keyframe
when writing the header.After writing the output to a file on the other end of the socket, I can play the file in VLC or Windows Media Player. However, seeking to a specific position in the file is not working properly in both players. WMP also does not show the total duration and VLC only flashes it shortly when reaching the end of the audio.
Is there a way to add more metadata when muxing so the players are able to treat the file as if it was not written as a stream? Transfer via the socket is not interrupted abruptly, so I could write metadata at the end of the file. I also know the total duration in advance, so I could add it to the header of the file if it was possible. I cannot use the
faststart
flag because this would require output to a seekable file before writing to the socket.Update: Tried setting
nb_frames
andavg_frame_rate
on the stream but it didn't help.