FFmpeg ogg - Invalid data found when processing input - ffmpeg

I am trying to change the framerate of a Video of mine. Below there is the example Input and the Output. I Built ffmpeg myself and I'm pretty sure I miss the right decoder/demuxer but I have no Idea what I need. I thought --enable-libtheora would be enough to enable, muxers, demuxers, encoder and decoder, but apperently there is somehting missing. Does anybody have an idea about this?
I have inserted path-to-ffmpeg to make this shorter, the Path itself is okay, so no worries about that.
*path-to-ffmpeg*\ffmpeg>ffmpeg -i Video.ogg -filter "minterpolate='fps=60'" out.ogg
ffmpeg version 3.3.git Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project)
configuration: --disable-encoders --disable-decoder=hevc --disable-decoder=raw
video --disable-decoder=ac3 --disable-decoder=flac --disable-decoder=ffwavesynth
--disable-decoder=libcelt --disable-decoder=libgsm --disable-decoder=libilbc --
disable-decoder=libopus --disable-decoder=dvbsub --disable-decoder=dvdsub --disa
ble-hwaccels --disable-parsers --disable-bsfs --disable-protocols --disable-inde
vs --disable-outdevs --disable-devices --disable-filters --disable-muxers --disa
ble-demuxers --enable-muxer=ogg --enable-zlib --enable-libtheora --enable-libvor
bis --enable-shared --enable-encoder=libtheora --enable-encoder=libvorbis --enab
le-demuxer=image2 --enable-filter=framerate --enable-protocol=file --enable-filt
er=minterpolate --enable-filter=scale
libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 85.100 / 6. 85.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
Video.ogg: Invalid data found when processing input

Yeah, you have --disable-demuxers but no --enable-demuxer=ogg after that. Depending on what the Oggs contain, your build may still be crippled.

Related

ffmpeg video to jpg frames poor quality

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.

Converting DTS to AAC with ffmpeg shifts spoken audio to the right

I am using ffmpeg to convert mkv movies to mp4, like so:
$ ffmpeg -i source.mkv -c:v copy -c:a aac destination.mp4
By doing this, the audio stream gets converted from the original DTS:
Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
To AAC:
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 394 kb/s (default)
The resulting file plays just fine, except that the spoken audio (what I am assuming would be sent to the central channel in a 5.1 configuration) sounds clearly shifted to the right, when listening through the MacBook's built-in speakers or my stereo headphones. Note that music and other sound effects appear unaffected, properly balanced. Also note that I have been able to reproduce this behavior with a variety of source files.
Here's ffmpeg's banner:
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
An FFmpeg commit, aacenc: support extended channel layouts using PCEs, in Nov 2017 added support for many more channel layouts than specified in the MPEG standard for AAC. Unfortunately, it seems it has broken encoding for layouts that worked fine before.
The 3.4 release series is the last before the said commit and should be used for multichannel AAC encoding if you encounter an error with more recent builds.
There is an open bug report at https://trac.ffmpeg.org/ticket/7273. You may post a comment in there to showcase your example.

Why does mplayer not play my stream?

I wanted to use mplayer (a command line tool) to play a SoundCloud url that I fetched with there official API. The url looks like this
https://cf-media.sndcdn.com/qop35iYKlHhs.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLW1lZGlhLnNuZGNkbi5jb20vcW9wMzVpWUtsSGhzLjEyOC5tcDMiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE0Njg3NTM4NjB9fX1dfQ__&Signature=OZ4IawmjdU6hEN8KB8e~t3QTy4lBFVBbIDg-a6tuPkb65e0mPskkCFFASkTWbyy5lsaT9IrURan6y70sZhLXPbng1IfkTsGdX1dO938NwVYnKs-BS7IL4TiVFxTBXoKJgmCmUD0qmmGmYqm3YdGZQrP~Sj~mw9~fmtwdHQu0rhl3O-dKsgk497JAR6pMorQs7BSs0XIosV1Mmv2DMD6iifquCWV9Ezq4ekneQ1gfSjVmzjjnKvsxjPpgmU~5DTdewwzlNClVxdzHSQONWM7c0YMGlBcVz97NviaeZOQSCAW8QZS59WULXJBJ9OmEPctWtpe3O0mo-GYjwEkbVGYl9A__&Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ
I use the command "mplayer 'url'" to play it but I always get the output:
libavformat version 57.25.100 (internal)
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
Looking which protocols have been installed tells me that I have https input and output support (ffmpeg -protocols):
ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --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-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libfaac --enable-ffplay --enable-libspeex --enable-openssl --enable-libopus --disable-lzma --enable-nonfree --enable-vda
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Supported file protocols:
Input:
async
cache
concat
crypto
data
file
ftp
gopher
hls
http
httpproxy
https
mmsh
mmst
pipe
rtp
srtp
subfile
tcp
tls
udp
udplite
unix
rtmp
rtmpe
rtmps
rtmpt
rtmpte
Output:
crypto
file
ftp
gopher
http
httpproxy
https
icecast
md5
pipe
rtp
srtp
tcp
tls
udp
udplite
unix
rtmp
rtmpe
rtmps
rtmpt
rtmpte

gdb not stopping at even trivial breakpoints

I am trying to debug ffplay (a debug build) compiled using mingw-w64 on msys2 on Windows 7 64bit. I tried setting breakpoints using gdb, and they seem to be set fine, but the program does not stop. So i tried issuing start, and again it didn't stop. I tried manually setting a breakpoint at main, but it still didn't stop. I verified that main is found, and it is. Here is a portion of the session. Any explanation what might cause this?
(gdb) start
Temporary breakpoint 1 at 0x140013f7c: file C:/Users/bubaruch/Documents/projects/ffmpeg/ffmpeg/ffplay.c, line 3756.
Starting program: C:\Users\bubaruch\Documents\projects\ffmpeg\b2\ffplay_g.exe
[New Thread 7752.0x275c]
ffplay version 2.8.git Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --disable-doc --disable-optimizations
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Simple media player
usage: ffplay [options] input_file
An input file must be specified
Use -h to get full help or, even better, run 'man ffplay'
[Inferior 1 (process 7752) exited with code 01]
(gdb) l main
3748 return 1;
3749 }
3750
3751 /* Called from the main */
3752 int main(int argc, char **argv)
3753 {
3754 int flags;
3755 VideoState *is;
3756 char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
3757
(gdb) b main
Breakpoint 2 at 0x140013f7c: file C:/Users/bubaruch/Documents/projects/ffmpeg/ffmpeg/ffplay.c, line 3756.
(gdb) r
Starting program: C:\Users\bubaruch\Documents\projects\ffmpeg\b2\ffplay_g.exe
[New Thread 15388.0x3278]
ffplay version 2.8.git Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --disable-doc --disable-optimizations
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Simple media player
usage: ffplay [options] input_file
An input file must be specified
Use -h to get full help or, even better, run 'man ffplay'
[Inferior 1 (process 15388) exited with code 01]
From docs:
The ‘start’ command does the equivalent of setting a temporary
breakpoint at the beginning of the main procedure and then invoking
the ‘run’ command.
So you're already inside main when you set the breakpoint. It is never reached again, since the program exits at the end of main. Thus, the breakpoint never triggers.
I have the feeling you're trying to set alternate breakpoints deep inside ffmpeg and debug something more specific, and that's not triggering either. Why don't you ask that question instead? The explanation for it is likely very different, probably having to do with inlining.
Perhaps the symbols file is out-of-sync with the executable.
gdb tells you that main() is at line 3756. On my system it'd tell you it's at line 3753 (on the "{" line). Maybe somebody edited the source files and compiled it but hasn't re-created the symbols file, thereby making gdb setting breakpoints at unreachable addresses.

FFmpeg: NetStream.Play.StreamNotFound on RMTP stream

I want to take snapshots periodically of a RTMP live video stream.
I can see the rtmp video stream using VLC. This is the rtmp url:
rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1
I'm using the following command to capture the snapshots, according to the official FFmpeg site here:
ffmpeg -i rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1 -f image2 -vf fps=fps=1 out%d.png
The command produces the following output:
ffmpeg version N-64667-gd595361 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 14 2014 22:09:48 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzl
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amr
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --ena
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 47.100 / 55. 47.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 10.100 / 4. 10.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
HandShake: client signature does not match!
Closing connection: NetStream.Play.StreamNotFound
rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1: Unknown error occurred
I've tried it with another rmtp streams, but I'm still getting the exact same error.
What could be the problem?
Thank you!
I just tried your command and it worked fine for me. Maybe it is something about your FFMPEG installation? I am using version 2.4 on a Mac (tessus build).
I know other/older versions used "librtmp" for rtmp connections, which required some extra options behind the stream URL. See ffmpeg docs here:
ffmpeg documentation on librtmp
And librtmp docs here:
librtmp documentation
For an unprotected live stream, you may want to try quoting the stream URL and appending " live=1" within the quotes:
ffmpeg -i "rtmp://antena3fms35livefs.fplive.net/antena3fms35live-live/stream-antena3_1 live=1" -f image2 -vf fps=fps=1 out%d.png

Resources