I am trying to convert a mov with alpha transparency to webm with alpha transparency, as seen here. I followed the steps explained here to no avail.
From this answer I was able to remove all the black in the video, thus making it transparent but this is not what I need as I already have a transparent mov and would like to convert that to transparent webm format.
ffmpeg -i input.mp4 -c:v libvpx -vf "colorkey=0x000000:0.1:0.1,format=yuva420p" out.webm
This is the ffprobe output of the video I would like to convert to webm with transparency.
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-nonfree --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2016-01-17 16:04:07
encoder : Mac OS X v? (AVF 1046.9.1, CM 1731.15.20, x86_64)
encoder-eng : Mac OS X v? (AVF 1046.9.1, CM 1731.15.20, x86_64)
Duration: 00:00:06.63, start: 0.000000, bitrate: 63966 kb/s
Stream #0:0(eng): Video: prores (ap4h / 0x68347061), yuva444p10le(bt470bg/smpte240m/bt709), 1920x1080, 63963 kb/s, 25.03 fps, 25 tbr, 600 tbn, 600 tbc (default)
Metadata:
creation_time : 2016-01-17 16:04:07
handler_name : Core Media Data Handler
encoder : Apple ProRes 4444
I've also tried the following command which didn't work for me either.
ffmpeg -y -i input.mov -c:v libvpx-vp9 -b:v 2000k -pass 1 -an -f webm output.webm
I'm using version 2.8.4 of ffmpeg on a Mac, installed with brew. 2.8.5 is the latest version.
Since 2016-07-13, it's possible to encode VP9/webm videos with alpha channel (VP9a). However, the command you use here will create a VP8a video. Assuming you got a copy of ffmpeg compiled after that date, all you need is change the libvpx to libvpx-vp9. You don't need the yuva420p conversion either (is selected by default).
Try
ffmpeg -i input.mov -c:v libvpx -pix_fmt yuva420p out.webm
All of the other solutions resulted in a video of subpar quality. Please ensure that you define the bitrate to your liking. I changed mine from 1M to 2M and was satisfied.
ffmpeg -i "Model 1 V1.mov" -f webm -c:v libvpx -b:v 2M -acodec libvorbis -auto-alt-ref 0 model1v3.webm -hide_banner
If you're using After Effects or Premiere Pro, there's also this plugin, which can be used in Adobe Media Encoder.
WebM-alpha is only defined for VP8. It doesn't work at all for VP9 right now.
This is the command that worked for me for VP8.
ffmpeg -i input.mov -c:v libvpx -pix_fmt yuva420p -b:v 2M -auto-alt-ref 0 output.webm
Accepted option did not work.
Related
The quality of JPGs extracted by ffmpeg from an mp4 is much poorer than pause frame from video player (vlc). I am looking for ffmpeg cmd option to improve output quality.
Using following cmd :
/home/tools/bin/ffmpeg -i Merkurtransit_20191111_crf20_8fps_crop.mp4 Merkurtransit_20191111_crf20_8fps_crop_%04d.jpg -hide_banner
The ffmpeg cmd is from instructions found here :
https://www.bugcodemaster.com/article/extract-images-frame-frame-video-file-using-ffmpeg
A comparing screen copy is here:
http://skywatcher.space/download/vlc_player_vs_ffmpeg_bug.png
A few items of note. I created the mp4 myself from high res png (actually originally from 16bit tiff) using ffmpeg :
/home/tools/bin/ffmpeg -framerate 8.0 -i ./AS_P10_RS6_png_reg/Merkurtransit_20191111_%03d.png -vf "crop=760:560:20:40" -pix_fmt yuv420p -crf 20 -r 24 -y ./Video/Merkurtransit_20191111_crf20_8fps_crop.mp4
The crf 20 is pretty high quality, close to 100% and the recovered frame should be close to original. The video player pause frame shows adequate quality. (though I can't say if it is on a key frame or not)
ffmpeg version info:
home/tools/bin/ffmpeg -v
ffmpeg version N-80251-g0c7fa15 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/home/tools/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/tools/ffmpeg_build/include --extra-ldflags=-L/home/tools/ffmpeg_build/lib --bindir=/home/tools/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 45.100 / 57. 45.100
libavformat 57. 37.101 / 57. 37.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
FFmpeg is primarily a video convertor and JPEG output is the result of a MJPEG encoder generating a single image. When no rate control parameters are set, a default bitrate of 200 kbps is selected.
For a better quality output, use
ffmpeg -i in.mp4 -q:v 1 -qmin 1 -qmax 1 out%d.jpg
The quantizer is clamped to exactly 1.
I'm trying to convert a PNG image to a JPEG image using ffmpeg. As far as I can tell, it's working fine, but it doesn't display properly in Mac Preview.
I'm running the following:
$ ffmpeg -i foo.png foo.jpg
And it produces the following output:
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --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-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, png_pipe, from 'foo.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 200x231, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler # 0x7ffeaf00ae00] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'foo.jpg':
Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mjpeg, yuvj444p(pc), 200x231, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.35.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1 fps=0.0 q=3.7 Lsize=N/A time=00:00:00.04 bitrate=N/A speed= 4.7x
video:12kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
When I open foo.jpg in most applications, such as VLC or Google Chrome, I get exactly what I expected: an image that looks exactly the same as foo.png, the input.
However, this is what is displayed in the Finder preview, and the same this is displayed when I open up the file in "Preview."
~~~I wonder if this has something to do with the deprecated pixel format used, make sure you did set range correctly error, but I'm not sure, especially since the image is fine, the problem seems to be elsewhere.~~~
It seems the deprecated pixel format error is not the issue (that's an internal thing), so I guess I just need to specify pixel formats properly.
Looks like QT / AVFoundation doesn't like fully-sampled chroma in JPEG.
First try
ffmpeg -i foo.png -pix_fmt yuvj422p foo.jpg
else,
ffmpeg -i foo.png -pix_fmt yuvj420p foo.jpg
The warning about deprecated format relates to ffmpeg internals and not the produced output.
You could use the built-in, Apple-supplied sips "Scriptable Image Processing System" tool to do the conversion and thereby avoid the issue and also be less dependent on having to install external tools:
sips -s format jpeg input.png --out output.jpg
We are converting seriously old .flv files to MP4 with FFMPEG. These are at least 10 years old.
Back then all were rendered with early versions of Adobe Premiere.
On desktop browsers all the files work and stream (...watching them feels like going back a century!)
But when requesting the videos on the same pages on mobile devices (android and ios) Video JS doesn't even show up.
Perhaps the codec is just too old, but I was wondering if there could be another reason when converting them with this line:
for i in *.flv; do ffmpeg -i "$i" "${i%.*}.mp4"; done
If not, is it possible to detect this in Video JS, so we can show an announcement that the video is only visible on desktops?
I hope someone here has this knowledge!
added on request of llogan
ffmpeg version N-78967-gbaec6d8 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4) configuration: --prefix=/root/ffmpeg_build
--extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 28.100 / 57. 28.100 libavformat 57. 28.100 / 57. 28.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 39.102 /
6. 39.102 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a_4293_06.mp4': Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.28.100 Duration: 00:01:40.10, start: 0.023220, bitrate: 492 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240, 376 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 123 kb/s (default)
Metadata:
handler_name : SoundHandler At least one output file must be specified
Thanks to #llogan's comments I can answer this one myself.
First, I upgraded ffmpeg to the latest version, and then did some research on the -movflags and +faststart.
I found a 2015 article with great info on how to convert .flv to .mp4 (https://addpipe.com/blog/flv-to-mp4/)
So, in order to make the new .mp4 files compatible with mobile devices, you need to add a profile and a level, like this:
in a batch convert:
for i in *.flv; do ffmpeg -y -i "$i" -movflags +faststart -profile:v baseline -level 3.0 "${i%.*}.mp4"; done
and for a single file:
ffmpeg -i filename.flv -movflags +faststart -profile:v baseline -level 3.0 filename.mp4
And then the terminal shows this line when converting:
Starting second pass: moving the moov atom to the beginning of the
file
That is needed, but the addition of the -profile and -level actually made the videos work on the mobile devices.
I tried downloading a video with youtube-dl with 3gp format. When I try to play it on VLC or any other application it doesn't play. This is the output I get when trying to download it again.
youtube-dl https://youtu.be/lVFq__mrmlQ -f worst -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://youtu.be/lVFq__mrmlQ', '-f', 'worst', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.14
[debug] Python version 3.6.5 (CPython) - Linux-4.15.0-29-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] lVFq__mrmlQ: Downloading webpage
[youtube] lVFq__mrmlQ: Downloading video info webpage
[youtube] lVFq__mrmlQ: Extracting video information
[debug] Invoking downloader on 'https://r4---sn-h5q7dnee.googlevideo.com/videoplayback?signature=5432A7990BB3336616E21753F1D53171D09CBC31.B98E84CF0C51F39C613F53311128CD9E7A3872EA&c=WEB&lmt=1514133618343257&key=yt6&itag=17&fvip=3&mn=sn-h5q7dnee%2Csn-h5q7knes&mm=31%2C29&pl=24&mime=video%2F3gpp&id=o-AKWLZ7MpY1ip3PlxZJ7vXBY-jDqbVpUeI_Bls_o_g-GV&ipbits=0&requiressl=yes&ip=90.174.4.0&gir=yes&mt=1532653244&ms=au%2Crdu&dur=18470.684&initcwndbps=1011250&ei=S29aW5SjH4bIVseNkfgE&expire=1532674987&mv=m&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&clen=195336027&source=youtube&ratebypass=yes'
[download] Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.3gp has already been downloaded
[download] 100% of 186.29MiB
I tried converting it with ffmpeg, but I get the following message:
ffmpeg -i Heroes\ of\ Might\ and\ Magic\ III\ -\ No\ Might\ 1v7\ FFA\ \(200%\)-lVFq__mrmlQ.3gp Heroes\ of\ Might\ and\ Magic\ III\ -\ No\ Might\ 1v7\ FFA\ \(200%\)-lVFq__mrmlQ.mp4
ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[mov,mp4,m4a,3gp,3g2,mj2 # 0x562e75c728c0] Could not find codec parameters for stream 0 (Video: mpeg4 (mp4v / 0x7634706D), none, 221 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.3gp':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-12-24T16:43:17.000000Z
Duration: 05:07:50.68, bitrate: 84 kb/s
Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), none, 221 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc (default)
Metadata:
creation_time : 2017-12-24T16:43:17.000000Z
handler_name : IsoMedia File Produced by Google, 5-11-2011
Output #0, mp4, to 'Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.mp4':
Output file #0 does not contain any stream
With this information, I don't know how to proceed. I already tried ffmpeg with the max analyzeduration and probesize and it still doesn't work. Any ideas?
EDIT: added list of formats youtube-dl detected.
youtube-dl -F https://youtu.be/lVFq__mrmlQ
[youtube] lVFq__mrmlQ: Downloading webpage
[youtube] lVFq__mrmlQ: Downloading video info webpage
[youtube] lVFq__mrmlQ: Extracting video information
[info] Available formats for lVFq__mrmlQ:
format code extension resolution note
249 webm audio only DASH audio 71k , opus # 50k, 108.83MiB
250 webm audio only DASH audio 85k , opus # 70k, 142.71MiB
171 webm audio only DASH audio 119k , vorbis#128k, 228.14MiB
140 m4a audio only DASH audio 145k , m4a_dash container, mp4a.40.2#128k, 279.77MiB
251 webm audio only DASH audio 152k , opus #160k, 280.97MiB
160 mp4 256x144 144p 114k , avc1.4d400c, 30fps, video only, 91.12MiB
278 webm 256x144 144p 153k , webm container, vp9, 30fps, video only, 176.00MiB
133 mp4 426x240 240p 258k , avc1.4d4015, 30fps, video only, 188.39MiB
242 webm 426x240 240p 261k , vp9, 30fps, video only, 366.78MiB
243 webm 640x360 360p 528k , vp9, 30fps, video only, 751.54MiB
134 mp4 640x360 360p 758k , avc1.4d401e, 30fps, video only, 539.15MiB
244 webm 854x480 480p 896k , vp9, 30fps, video only, 1.43GiB
135 mp4 854x480 480p 1441k , avc1.4d401f, 30fps, video only, 1.40GiB
247 webm 1280x720 720p 1798k , vp9, 30fps, video only, 3.03GiB
136 mp4 1280x720 720p 2673k , avc1.4d401f, 30fps, video only, 2.86GiB
302 webm 1280x720 720p60 2907k , vp9, 60fps, video only, 5.10GiB
298 mp4 1280x720 720p60 4626k , avc1.4d4020, 60fps, video only, 4.11GiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2# 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis#128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2# 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2#192k (best)
The one that got downloaded was number 17.
You passed in -f worst. As the name indicates, -f worst will get you the worst video format, with horrible quality and very little support in many applications, including ffmpeg. In short, you got what you asked for.
To get a better file, ask for something else. For instance, if you just want audio (much smaller than picture for most videos), pass in -x.
If you want the best video quality, simply omit -f worst.
If your device can only play a certain resolution (say 300px width), pass in -f 'bestvideo[width<=300]+bestadio/best[width<=300]'.
If your disk space per video is the limit (e.g. 5GB), pass in -f best[filesize<=5GB].
If your device can only play certain formats, specify that format, with acodec, vcodec, container, or simply ext. For instance, -f worstvideo[ext=mp4]+bestaudio/worst[ext=mp4] will get you the worst-quality MP4 file.
Of course, these selectors can be combined, as in -f worst[ext=mp4][filesize<=5GB]. For more information on all of these options, consult the youtube-dl documentation.
The issue had nothing to do with codecs or ffmpeg. The file got corrupted during download and further attempts to redownload didn't tell me anything about it. Credit to the user phihag for sharing the sha256 of the file.
I'm using the windows build of ffmpeg (details below), and when I try to transcode a video with the output file NOT in the local directory, it complains with the error message :
/dtop/out.mp4: No such file or directory
My cygwin mounts are as follows - I have not found any other application which doesn't follow the mounts/links correctly...
[lwobker:/dtop/vertigo]$ mount
C:/Documents and Settings/lwobker/Desktop on /dtop type ntfs (binary)
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
Here's what I've managed to figure out so far, leading me to believe that for some reason FFMPEG does not like following mount points or links in cygwin. But I'll be damned if I can figure out why...
if I do this, it WORKS:
ffmpeg -i ./input.mp4 ./out.mp4
if I do this, it WORKS (permission and mount/link check):
touch /dtop/out.mp4
however, if I give a file location that is not in the current working directory or a subdirectory of the current working directory, it pukes:
[lwobker:/dtop/vertigo]$ ffmpeg -i 00001.MTS /dtop/out.mp4
ffmpeg version N-64919-ga613257 Copyright (c) 2000-2014 the FFmpeg developers
<snip>
Input #0, mpegts, from '00001.MTS':
Duration: 00:01:41.63, start: 1.033367, bitrate: 10221 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
/dtop/out.mp4: No such file or directory
it also pukes if I give it /cygdrive/c/somefile.mp4 as an argument - it won't find that either.
Any ideas would be really appreciated. I had this working with a version of FFMPEG that I had compiled from source locally within cygwin, but when I moved machines I could not get it to recompile correctly so I'm hoping to figure this out so I can use the pre-compiled binaries for convenience...
FFMPEG version details:
[lwobker:/dtop/vertigo]$ ffmpeg
ffmpeg version N-64919-ga613257 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 23 2014 00:35:22 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 52. 92.101 / 52. 92.101
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.101 / 55. 48.101
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
You cannot feed Windows native programs Cygwin paths, they do not understand
that. However you can put a wrapper script in the same folder as ffmpeg.exe,
and call it ffmpeg. Like this
#!/bin/sh
for each
do
foo=$(cygpath -w -- "$each")
bar+=("$foo")
done
ffmpeg.exe "${bar[#]}"
Then you go from this
$ ffmpeg.exe -i 1_Les_Nuits.mp3 /tmp/outfile.m4a
/tmp/outfile.m4a: No such file or directory
To this
$ ffmpeg -i 1_Les_Nuits.mp3 /tmp/outfile.m4a
frame=1 fps=0.1 q=33.0 Lsize=6046kB time=00:06:21.52 bitrate= 129.8kbits/s
Another option, if it works for you is to just use Windows paths when dealing
with Windows native programs, example
ffmpeg.exe -i 'C:\1_Les_Nuits.mp3' 'C:\outfile.m4a'