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.
Related
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.
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
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
I am kind of new to the streaming world... so, please forgive me if I ask kind of dumb question.
I am trying to stream my pre-recorded file over RTSP through FFserver.
My config file is :
RTSPPort 8544
<Feed feed2.ffm>
File /home/xyz/tmp/feed2.ffm
FileMaxSize 200K
ACL allow 127.0.0.1
</Feed>
<Stream test.sdp>
Feed feed2.ffm
Format rtsp
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>
After starting the server, it give the below log:
$ ./ffserver -f doc/ffserver.conf
ffserver version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 17 2012 19:46:38 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc
-enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Wed Sep 19 17:03:32 2012 FFserver started.
And now from my VLC client I am trying to type the URL: rtsp://xxx.xxx.xxx.xxx:8554/test.sdp
But, what happens is that, there is no response on the ffserver.
I have no clue what might be the problem. Thanks in advance.
You don't have anything to stream.
you need to start
ffmpeg -i <source> http://localhost:8090/feed2.ffm
IF you enable Port 8090 for http,
with the directive (in your config file)
Port 8090
This has been asked before, but badly tagged, so I can't find it.
If anybody finds it, please link it here. As starting an empty server seems to be common.
Matthias is right. Currently you are not streaming anything.
And the given ffmpeg-command should work but you might want to consider, that maybe the feed section is contra productive.
If the video-file is already stored on the server, you don't need the feed (since the video itself will serve as one).
<Stream test.sdp>
File "path_to_your_file" #instead of the Feed
...
</Stream>
If the video-file is on a different computer, you have to stream it to the server first (see Matthias' answer).
Edit:
Also you need the feed if you want to mess around with the stream before streaming.
How can I keep the flow (protocol rtsp, codec h264) in file (container mp4)? That is, on inputting an endless stream (with CCTV camera), and the output files in mp4 format size of 5-10 minutes of recording time.
OS: debian, ubuntu
Software: vlc, ffmpeg (avconv)
Currently this scheme is used:
cvlc rtsp://admin:admin#10.1.1.1:554/ch1-s1 --sout=file/ts:stream.ts
ffmpeg -i stream.ts -vcodec copy -f mp4 stream.mp4
But it can not record video continuously (between restarts vlc loses about 10 seconds of live video).
See this question and answer on Server Fault. In short, switch tools. avconv will do what you want. (ffmpeg has become avconv.)
The feature you are looking for is called segmentation. Your command line would look something like this:
avconv -i rtsp://10.2.2.19/live/ch01_0 -c copy -map 0 -f segment -segment_time 300 -segment_format mp4 "capture-%03d.mp4"
Alexander Garden solution works for ffmpep using the version below. Replace avconv with ffmpeg.
./ffmpeg -i rtsp://10.2.2.19/live/ch01_0 -c copy -map 0 -f segment -segment_time 300 -segment_format mp4 "capture-%03d.mp4"
I'm including this header because of the FFmpeg confusion over versions, the ubuntu schism and rapid development.
ffmpeg version N-80023-gd55568d Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --prefix=/home/rhinchley/q10/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/rhinchley/q10/ffmpeg_build/include --extra-ldflags=-L/home/rhinchley/q10/ffmpeg_build/lib --bindir=/home/rhinchley/q10/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. 42.100 / 57. 42.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Team work: Split the video source and have two processes alternate recording the time frame. You'll want to test how variable the startup time is, and how variable it is. You might want to set the processes priority to realtime to reduce start time variance. There will be some overlap but that sound like it might be ok for your application from what I infer. Example:
p1: sRRRRRRRRRwwwwwwwwsRRRRRRRRRwwwwwwwwsRRRRRRRRR...
p2: wwwwwwwwwsRRRRRRRRRwwwwwwwwsRRRRRRRRRwwwwwwwww...
time -->
s: startup
R: running
w: wait