ffmpeg encode image sequence - encoding

I have been using ffmpeg to convert a sequence of jpegs to a video using the following syntax:
ffmpeg.exe -f image2 -i image_%05d.png -vcodec mpeg4 -b 800k video.mpg
It doesn't work:
C:\Documents and Settings\Atelier\Mes documents\dev\projets\emptycanvas\testresu
lt\objets\starbuck.tests.TestAnimationSphereInterieur>"c:\Documents and Settings
\Atelier\Mes documents\Téléchargements\ffmpeg-20120608-git-718607b-win32-static\
bin\ffmpeg.exe" -f image2 -i image_%05d.png -vcodec mpeg4 -b 800k video.mpg
ffmpeg version N-41416-g718607b Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 8 2012 12:46:19 with gcc 4.6.3
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass
--enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libope
njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libth
eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --ena libavutil 51. 56.100 / 51. 56.100
libavcodec 54. 25.100 / 54. 25.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 78.101 / 2. 78.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
image_%05d.png: No such file or directory
On Windows XP...

been using ffmpeg to convert a sequence of jpegs
...
-i image_%05d.png
...
image_%05d.png: No such file or directory
You might have better luck with -i image_%05.jpg. That will input images named image_00001.jpg, image_00002.jpg, image_00003.jpg, etc.

Problem is that the window shell expands the %05d. You can prevent that by doubling the %
ffmpeg.exe -f image2 -i image_%%05d.png -vcodec mpeg4 -b 800k video.mpg

Related

Unable to find a suitable output format for 'pipe:' - pipe:: Invalid argument

I'm working on a project to potentially simplify some of the process to send video to something like Facebook Live.
Right now I'm using this example with a FB Live API RTMP endpoint (neither of these are production or real development commands - by using this example I think I can figure out the limitations of what I'm doing in others):
-i - -map 0 -c:v libx264 -c:a aac -muxrate 1000k -bufsize 2000k -g 50 -f tee "rtmp://rtmp-api.facebook.com:80/rtmp/10104590177564330?ds=1&s_e=4&s_l=1&a=ATgko8JiGpXC0WGf"
Here's the original example:
$ ffmpeg -i input -map 0 -c:v libx264 -c:a aac -bufsize 2000k -g 50 -f tee \ "[f=flv:onfail=ignore]rtmp://facebook|[f=flv:onfail=ignore]r‌​tmp://youtube|local_‌​file.mkv"
However, despite using that example I'm getting:
[NULL # 0xffd840] Unable to find a suitable output format for 'pipe:'
pipe:: Invalid argument
I understand that sometimes this error arises due to spacing issues or incorrect syntax. I've looked around to try to resolve this problem and using many combinations does not change the result.
Thanks!
Edit - Log added:
configuration: --cc=emcc --prefix=/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist --extra-cflags='-I/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/include -v' --enable-cross-compile --target-os=none --arch=x86_32 --cpu=generic --disable-ffplay --disable-ffprobe --disable-ffserver --disable-asm --disable-doc --disable-devices --disable-pthreads --disable-w32threads --disable-network --disable-hwaccels --disable-parsers --disable-bsfs --disable-debug --disable-protocols --disable-indevs --disable-outdevs --enable-protocol=file --enable-libvpx --enable-gpl --extra-libs='/Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libx264.a /Users/bgrinstead/Sites/videoconverter.js/build/ffmpeg/../dist/lib/libvpx.a'
It specifically fails here:
.../
libavutil 52. 66.100 / 52. 66.100

ffmpeg won't recognize x265 options [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I am trying to use ffmpeg's built-in x265 library to process .VOB files through h.265codec.
What I understood from the ffmpeg documentation was that:
-c:v libx265 tells ffmpeg to use the h.265 codec for video streams
-x265-params passes options to x265 encoder instead of ffmpeg
But whenever try to run the command, ffmpeg doesn't seem to recognize/pass the options to x265.
It gives the error
Unrecognized option '-y4m'.
Error splitting the argument list: Option not found
Why is this?
Here's the command (edited spacing):
C:\ffmpeg (20170123-e371f03-win64-static)\bin>
ffmpeg -i concat:'input1.VOB'\'input.VOB'
-map 0:v -map 0:a -r 24000/1001 -f yuv4mpegpipe
-c:v libx265 -x265-params
--y4m --fps 24000/1001 -p veryslow --open-gop --bframes 16
--b-p yramid --bitrate 2500 --rect --amp --aq-mode 3 --no-sao --qcomp 0.75
--no-strong -intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1
--tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1
--slow-firstpass --stats v. stats --sar 1 --range full 'E:\output.hevc'
ffmpeg version N-83195-ge371f03 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --ena
ble-zlib
libavutil 55. 44.100 / 55. 44.100
libavcodec 57. 75.100 / 57. 75.100
libavformat 57. 63.100 / 57. 63.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Unrecognized option '-y4m'.
Error splitting the argument list: Option not found
That's not the correct syntax. Use
-x265-params "y4m=1:fps=24000/1001:p=veryslow:...."
"--y4m" is not a param of x265. in the first place, it should not be there. it is the container for the output that is going into the yuv4mpegpipe. In your syntax, the error there is your codec. x265 don't any idea what yuv4mpegpipe is...
ffmpeg -i concat:'input1.VOB'\'input.VOB'
-map 0:v -map 0:a -r 24000/1001 -f yuv4mpegpipe
-c:v libx265(remove this)-x265-params(remove this)and change it to this "yuv4" -o "input1.VOB.output.y4m"
write this b4 x265-params after erasing --y4m
ffmpeg.exe -i "input1.VOB.output.y4m"<<-this is the output file that went into the yuv4mpegpipe that you want converted to HEVC)(y4m is like mp4 mkv avi mov) --c:v libx265 --x265-params -->>> --y4m --fps 24000/1001 -p veryslow --open-gop --bframes 16
--b-pyramid --bitrate 2500 --rect --amp --aq-mode 3 --no-sao --qcomp 0.75
--no-strong-intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1
--tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1
--slow-firstpass --stats v. stats --sar 1 --range full 'E:\output.hevc'
if I were to write this, it goes like:
ffmpeg.exe -i concat:'input1.VOB'\'input.VOB' --map 0,1 --c:v yuv4 --s 3840x2160 --r 24000/1001 --f yuv4mpegpipe --pix-fmt yuv444p16le -o "output-yuv444p16le.y4m"
ffmpeg.exe -i "yuv444p16le.y4m" --fps 24000/1001 --p veryslow --c:v libx265 --x265-params --open-gop --bframes 16 --b-pyramid --bitrate 2500 --rect --amp --aq-mode 3 --no-sao --qcomp 0.75 --no-strong-intra-smoothing --psy-rd 1.6 --psy-rdoq 5.0 --rdoq-level 1 --tu-inter-depth 4 --tu-intra-depth 4 --ctu 32 --max-tu-size 16 --pass 1 --slow-firstpass --stats v. stats --sar 1 --range full -o E:\output_yuv444p16le.hevc'

How to use "avconv" on raspberry pi for multicasting h264 file or /dev/video0?

I wrote an simple opencv desktop application to receive a multicast stream from my raspberry pi.
On the pi I want to use avconv to send the multicast.
This one works with my app and also with VLC-Player:
avconv -i video.mp4 -f mpegts udp://225.0.0.37:4030
But this one is not working:
avconv -i video.h264 -f mpegts udp://225.0.0.37:4030
Error Message as follows:
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
built on Mar 16 2015 13:20:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
[h264 # 0x8986980] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'video.h264':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 320x240, 25 fps, 25 tbr, 25 tbn
Output #0, mpegts, to 'udp://225.0.0.37:4030':
Metadata:
encoder : Lavf54.20.4
Stream #0.0: Video: mpeg2video, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Press ctrl-c to stop encoding
[fps # 0x8a5cac0] Discarding initial frame(s) with no timestamp.
Last message repeated 445 times
frame= 0 fps= 0 q=0.0 Lsize= 0kB time=10000000000.00 bitrate= 0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Could anybody explain where the problem is and how to solve this issue??
My aim is to get a live stream with the v4l2 driver, like this:
avconv -i /dev/video0 -f mpegts udp://225.0.0.37:4030
If you want to use /dev/video0 with avconv you have to tell avconv that the source is an video4linux2 source/stream.
And for good results you have to tell v4l2 to set the resolution to ex.. 640x480 otherwise it's using 320x240
avconv -f video4linux2 -s 640x480 -i /dev/video0 -f mpegts udp://225.0.0.37:4030
but remember i think you have to purchase a mpeg2 license for that.
if you recompile avconv with the --enable-omx-rpi you can use the hardware h264 coder from the Openmax.
avconv -f video4linux2 -s 640x480 -i /dev/video0 -f mp4 -na \
-c:v h264_omx -b:v 750k udp://225.0.0.37:4030
-na = disable audio
This will Reduce the CPU usage from your pi by 70% or more.
For compiling instructions :
https://ubuntu-mate.community/t/hardware-h264-video-encoding-with-libav-openmax-il/4997/6

ffmpeg windows: how to run ffmpeg -i input -filter:v frei0r=pixeliz0r=0.02:0.02 output

I run ffmpeg on Windows.
I try to run
ffmpeg -i input.avi -filter:v frei0r=pixeliz0r=0.02:0.02 ouput.avi
I have this error:
No such filter: 'frei0r
Error opening filters!
When I run ffmpeg.exe I got:
ffmpeg version git-N-30610-g1929807, Copyright (c) 2000-2011 the FFmpeg developers
built on Jun 7 2011 15:55:06 with gcc 4.5.3
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib --disable-outdev=sdl -
-pkg-config=pkg-config
Note the --enable-frei0r above.
Any idea where I can get the ffmpeg for windows with frei0r enabled and working ?
Ok finally got it going: http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=312&p=2716#p2716
Basically download some frei0r plugin dll's (http://oss.netfarm.it/mplayer-win32.php has some, http://people.videolan.org/~jb/vlmc/effects.7z has some)
then set FREI0R_PATH=c:\vids\effects\
Then it should "just work" like
ffmpeg.exe -loglevel debug -i input_file -vf "frei0r=glow:20" -t 10 output_file
GL!
From ffmpeg: how to add pixellate effect? , you have a link to http://ffmpeg.zeranoe.com/builds/ . It seems these are Windows build with frei0r enabled.
When using -loglevel debug option, ffmpeg gives information where it looks for frei0r plugins.
On windows you need to create folders following this information. For instance create path: C:\usr\lib\frei0r-1\ and put all filter DLLs there.

ffmpeg encoding error

I have just finished installing ffmpeg on my centOS server using the below link:
http://www.ultratechhost.com/forums/thread-122.html -> Method 1\
phpinfo() reports that ffmpeg has been successfully installed and i also see the ffmpeg section in phpinfo.
But when I try to encode I get an error. Please try and shed some light what the problem is and what the solution could be.
The command and the error is as follows:
ffmpeg -i greenlantern.mov green1.flv
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
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-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --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
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1ea4e8b0]Estimating duration from bitrate, this may be inaccurate
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'greenlantern.mov':
Duration: N/A, bitrate: N/A
Output #0, flv, to 'green1.flv':
Output file #0 does not contain any stream
Is this file DRM protected by any chance? If so, converting probably won't work.
It looks like this is a problem with the file, rather than a problem with ffmpeg.