ffmpeg error when I try to stream on trovo - ffmpeg

When I try to start a stream on the trovo, the error av_interleaved_write_frame(): Unknown error appears.
comand:
ffmpeg -i D:\voi.mp4 -c copy -f flv rtmp://livepush.trovo.live/live/<key>
output:
ffmpeg version n4.4.2-2-g7ffb7d4b04-20220630 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11.2.0 (crosstool-NG 1.24.0.533_681aaef)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --disable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --disable-vulkan --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20220630
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\voi.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:03:59.70, start: 0.000000, bitrate: 2683 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 2511 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Output #0, flv, to 'rtmp://livepush.trovo.live/live/73846_112160385_112160385?bizid=73846':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Stream #0:0(und): Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2511 kb/s, 30 fps, 30 tbr, 1k tbn, 30k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 160 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Unknown errortime=00:00:02.19 bitrate=2955.2kbits/s speed=4.21x
[flv # 0000020eada7ecc0] Failed to update header with correct duration.
[flv # 0000020eada7ecc0] Failed to update header with correct filesize.
Error writing trailer of rtmp://livepush.trovo.live/live/73846_112160385_112160385?bizid=73846: Error number -10053 occurred
frame= 86 fps=0.0 q=-1.0 Lsize= 962kB time=00:00:02.77 bitrate=2842.1kbits/s speed=4.22x
video:922kB audio:55kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
'txSecret' is not recognized as an internal or external command,
operable program or batch file.
'txTime' is not recognized as an internal or external command,
operable program or batch file.
'cert' is not recognized as an internal or external command,
operable program or batch file.
'certTime' is not recognized as an internal or external command,
operable program or batch file.
'flag' is not recognized as an internal or external command,
operable program or batch file.
'timeshift_bps' is not recognized as an internal or external command,
operable program or batch file.
'timeshift_dur' is not recognized as an internal or external command,
operable program or batch file.
'txAddTimestamp' is not recognized as an internal or external command,
operable program or batch file.
'tp_code' is not recognized as an internal or external command,
operable program or batch file.
'tp_sign' is not recognized as an internal or external command,
operable program or batch file.
'dm_sign' is not recognized as an internal or external command,
operable program or batch file.
'pq_sn' is not recognized as an internal or external command,
operable program or batch file.
'txHost' is not recognized as an internal or external command,
operable program or batch file.
I guess this is a problem on the part of trovo. I mean, it is possible that certain restrictions must be observed for streaming on this site, but I do not know which ones specifically.
So how can I fix this?
P.S. on other platforms the stream works for example twitch.
I have tried many commands and different video formats, the result is the same.

I found a solution. You need to specify the video codec -vcodec libx264.
this git helped me: Trovo live streaming
The minimum command to run looks like this: ffmpeg -i "D:\voi.mp4" -vcodec libx264 -f flv "rtmp://livepush.trovo.live/live/<key>"

Related

FFmpeg Convert to JPEG works in VLC but not in Mac Preview?

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

ffmpeg recoded mp4 files error on mobiles in Video JS

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.

FFMPEG [h264_nvenc # 0x56151389fe00] Cannot get the preset configuration: invalid version (15)

i have issue with ffmpeg as usual :D. I have FFMPEG compiled (version N-90807-g00099ef0d0) with NVIDIA support (latest CUDA and latest NV Headers):
ffmpeg version N-90807-g00099ef0d0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --enable-libnpp --enable-cuda --enable-cuvid --enable-nvenc --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-gpl --enable-libx264 --disable-x86asm --enable-libx265 --enable-libfdk-aac --enable-nonfree --enable-x86asm
libavutil 56. 15.100 / 56. 15.100
libavcodec 58. 19.100 / 58. 19.100
libavformat 58. 13.100 / 58. 13.100
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 19.100 / 7. 19.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.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'
When I try to run basic transcoding on GPU using command:
ffmpeg -i 'udp://#239.100.0.1:331?fifo_size=‎100000000' -map i:0x100 -g 20 -vcodec h264_nvenc -map i:0x101 -ab 128k -ar 48k -acodec aac -f mpegts udp://#239.0.0.1:1234?overrun_nonfatal_optin=
I got this error:
Input #0, mpegts, from 'udp://#239.100.0.1:331?fifo_size=‎100000000':
Duration: N/A, start: 106.414400, bitrate: N/A
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 # 0x55a5edc45880] co located POCs unavailable
[h264_nvenc # 0x55a5edc45380] Cannot get the preset configuration: invalid version (15)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac # 0x55a5edc46d40] Qavg: 227.785
[aac # 0x55a5edc46d40] 2 frames left in the queue on closing
I have same version of FFMPEG compiled by the same way on another testing machine and there it is working. I tried to recompile/reinstall ffmpeg with the latest version, but result is the same.
Does someone know what could be wrong on my instance?
Thanks.
Fixed. The issue was in nvidia headers. Used version was extremely new. If you'll get this issue, just use the headers with tag n8.0.14.1 and then compile ffmpeg.
FFmpeg version of headers required to interface with Nvidias codec APIs:
git clone https://github.com/FFmpeg/nv-codec-headers.git
git checkout n8.0.14.1
make && make install

ffmpeg: resulting video from timelapse not playable in quicktime after size change [duplicate]

I'm trying to use FFMPEG to transcode a video with very large frames (4096 x 4096). It's a short video - just under two minutes, but the source video file is 15.8GB. (The video is an animation designed to be projected onto planetarium domes.)
The source file is a Quicktime MOV containing uncompressed Photo-JPEG images (with audio, too). When I tell FFMPEG to transcode my MOV file into an MP4 file, it simply says:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Not very helpful, but yes, I've verified that all of the parameters are correct and/or defaults. In fact, if I change the requested output size to 2048x2048, then everything works just fine. That's why I suspect that there's an upper bound in the encoder.
I am kerflummoxed. Any suggestions that result in a successful transcode will be greatly appreciated. (At this point I am also willing to consider alternatives to FFMPEG.)
The Facts
I run FFMPEG from a script:
set srcFile=%1
set dstFile=%srcFile:.mov=.mp4%
ffmpeg -i %srcFile% -movflags faststart -q:a 0 -q:v 0 -pix_fmt yuv420p -sws_flags gauss -s 4096x4096 %dstFile%
The Output
ffmpeg version N-50911-g9efcfbe Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 13 2013 21:26:48 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
ble-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 19.100 / 52. 19.100
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 54. 4.100 / 54. 4.100
libavfilter 3. 45.103 / 3. 45.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'also-sprach-zarathustra-4k.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-01-11 23:41:30
Duration: 00:01:40.57, start: 0.000000, bitrate: 1357694 kb/s
Stream #0:0(eng): Audio: pcm_s16be (twos / 0x736F7774), 44100 Hz, stereo, s16, 1411 kb/s
Metadata:
creation_time : 2013-01-11 23:41:30
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 4096x4096 [SAR 1:1 DAR 1:1], 1356281 kb/s, 30 fps, 30
tbr, 3k tbn, 3k tbc
Metadata:
creation_time : 2013-01-11 23:41:30
handler_name : Apple Alias Data Handler
File 'also-sprach-zarathustra-4k.mp4' already exists. Overwrite ? [y/N] y
using SAR=1/1
[libx264 # 003b9c80] frame MB size (256x256) > level limit (36864)
[libx264 # 003b9c80] DPB size (4 frames, 262144 mbs) > level limit (2 frames, 184320 mbs)
[libx264 # 003b9c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI1 BMI2
x264 [error]: malloc of size 17305600 failed
Output #0, mp4, to 'also-sprach-zarathustra-4k.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
Stream #0:0(eng): Video: h264, yuv420p, 4096x4096 [SAR 1:1 DAR 1:1], q=-1--1, 90k tbn, 30 tbc
Metadata:
creation_time : 2013-01-11 23:41:30
handler_name : Apple Alias Data Handler
Stream #0:1(eng): Audio: none, 44100 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2013-01-11 23:41:30
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:1 -> #0:0 (mjpeg -> libx264)
Stream #0:0 -> #0:1 (pcm_s16be -> libvo_aacenc)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
PS: Yes, for those playing at home, it is the theme to 2001 - A Space Odyssey. You can see a 1K YouTube version here: 2001 - A Fulldome Space Odyssey And yes, in a planetarium with a good sound system, it is absolutely EPIC.
I think you're actually running into the limitation of of x264's codec complexity levels.
Brief description of the levels from http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC
As the term is used in the standard, a "level" is a specified set of constraints that indicate a degree of required decoder performance for a profile. For example, a level of support within a profile specifies the maximum picture resolution, frame rate, and bit rate that a decoder may use. A decoder that conforms to a given level must be able to decode all bitstreams encoded for that level and all lower levels.
The max resolution for the highest level (5.2) is 4,096×2,304.
I would look into using HEVC which is specifically designed for these larger format 4K / Ultra-HD resolutions.
http://en.wikipedia.org/wiki/HEVC
Max Resolution for HEVC is currently 8,192x4,320
I suspect your problem is hinted at here:
x264 [error]: malloc of size 17305600 failed
Is this a 32-bit build of ffmpeg? If so, I fear you may be out of luck. 4k video processing really requires >4 GB of memory. Better switch to a 64-bit build and try again.
Of course you actually need to have enough memory available in your computer, too. It could be a lot more than 4 GB, depending on your x264 settings.

ffmpeg can't find output directory under cygwin

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'

Resources