Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Finding library during compliation in mingw64 environment (libgcrypt and libgpg-error)
28 novembre 2016, par AlastairI'm a real beginner at this, so apologies in advance for obvious questions. I'm trying to compile a custom build of ffmpeg that has some extra dependencies the normal build does not. Among those is
libgcrypt
andlibgpg-error
- I know this, because when I runconfigure
, it fails, and the log contains:C:/workspace/windows/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcrypt C:/workspace/windows/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgpg-error
With this in mind, I cloned the repo for libgpg-error, ran
make
andmake install
, which createdlibgpg-error.dll.a
andlibgpg-error.la
in/home/myuser/w64root/lib
. I've tried adding this path to my$LIB
environment variable, but the configure run still says it can't find the library.How can I make it visible? I also have
pkg-config
available on the machine - would manually creating a.pc
file help me any?Thanks!
-
Stream audio (only) from ffmpeg to Android application
28 novembre 2016, par Othman MohammadI'm trying to implement a simple system to stream voice from microphone to an Android app. To stream, I used the ffmpeg program. I tried the following command:
ffmpeg -ar 48000 -f alsa -i hw:0 -acodec mp2 -b:a 384k -f rtp rtp://127.0.0.1:1234
and I was able to start the server.
Then, I used the command:
ffplay rtp://127.0.0.1:1234
and everything worked properly.
Now I need to play this stream in an Android mobile app.
I saw this code somewhere in stackoverflow:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("rtsp://192.168.0.100")); startActivity(i);
but the app crashed, stating that:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=rtp://192.168.0.100:1234
Can anyone help me with the Android code to play the stream? Plus, am I using the right protocol (RTP) or should I use RTSP?
Thank you.
-
Extracting programs from dvb mux which begin later in stream
28 novembre 2016, par John AllsupOn DVB-T, some channels do not run 24h/day. If I save the entire mux using e.g. vlc (I do this on Windows due to Linux not liking my TV stick), I can play back the resulting .ts file with vlc, and select programs, and if I skip, say, 1hr in, and switch to the program (once started), I can watch it ok. If, however, I run ffmpeg on the file, it reports the program as having only one stream, of type 'Unknown: none', and cannot extract the stream.
The reasoning is that if I wish to capture the first program from a channel which comes on at, say, 7pm, I want the dump of the mux to begin before 7pm.
Any thoughts on how to extract the program stream?
-
opencv2 can't load video on mac
28 novembre 2016, par bogunI can't use cv2.VideoCapture('test.avi') to load my local video. I had installed ffmpeg using
brew install ffmpeg
When i try to run the codecv2.VideoCapture(test.avi)
, the python process will crash, here is the error log:'2016-11-28 18:18:47.768 Python[20241:277423] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
*** First throw call stack: ( 0 CoreFoundation 0x00007fffa44b148b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fffb8c13cad objc_exception_throw + 48 2 CoreFoundation 0x00007fffa43cad8c -[__NSArrayM objectAtIndex:] + 204 3 libopencv_highgui.2.4.dylib 0x0000000109be9270 _ZN13CvCaptureFileC2EPKc + 350 4 libopencv_highgui.2.4.dylib 0x0000000109be7ce2 _Z32cvCreateFileCapture_AVFoundationPKc + 34 5 libopencv_highgui.2.4.dylib 0x0000000109bdb7de cvCreateFileCapture + 14 6 libopencv_highgui.2.4.dylib 0x0000000109bdba8e _ZN2cv12VideoCapture4openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 64 7 libopencv_highgui.2.4.dylib 0x0000000109bdb8ee _ZN2cv12VideoCaptureC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 42 8 cv2.so 0x0000000109387bce _ZL34pyopencv_VideoCapture_VideoCaptureP7_objectS0_S0_ + 275 9 Python 0x0000000109052534 PyEval_EvalFrameEx + 14624 10 Python 0x000000010904ea1e PyEval_EvalCodeEx + 1617 11 Python 0x000000010904e3c7 PyEval_EvalCode + 48 12 Python 0x000000010906e63d PyParser_ASTFromFile + 297 13 Python 0x000000010906e46b PyRun_InteractiveOneFlags + 377 14 Python 0x000000010906df5f PyRun_InteractiveLoopFlags + 192 15 Python 0x000000010906de09 PyRun_AnyFileExFlags + 60 16 Python 0x000000010907fbca Py_Main + 3094 17 libdyld.dylib 0x00007fffb94f2255 start + 1 18 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6
I guess the video's codec could be wrong, but i don't know how to fix it.
-
Grab vtt subtitles from m3u8 stream
28 novembre 2016, par EkonovalI have a video stream http://content.uplynk.com/ext/6790c94a453741799d3f3fb3bc9023a4/2493079.m3u8 which can be perfectly grabbed by ffmpeg command
ffmpeg -i "http://content.uplynk.com/ext/6790c94a453741799d3f3fb3bc9023a4/2493079.m3u8" -c copy CMA.ts
In this m3u8 list there is a subtitles stream http://content-aeui1.uplynk.com/395e08dcb0b54a3781d34d0b840df075/sub3.m3u8 , which has several vtt parts.
Is there a way to grab those vtt parts into single vtt file and then convert to some common format like srt ?
Or maybe there is a way to grab video with subtitles embedded?