mplayer mingw 64bit signal 11 - gdb

with difficulty that I generated the executable. I get this error running
MPlayer interrupted by signal 11 in module: demux_open
MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly.
Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code or in your drivers or in your gcc version. If you
think it's MPlayer's fault, please read DOCS/HTML/en/bugreports.html
and follow the instructions there. We can't and won't help unless
you provide this information when reporting a possible bug.
with gdb
I do not understand why that path, it's not my mingw.
Program received signal SIGSEGV, Segmentation fault.
0x0000000001060853 in __gdtoa (fpi=, be=, bits=0x0, kindp=0x800, mode=0, ndigits=0, decpt=0x0, rve=0x0) at
c:/crossdev/src/mingw-w64-svn/mingw-w64-crt/gdtoa/gdtoa.c:630
630 c:/crossdev/src/mingw-w64-svn/mingw-w64-crt/gdtoa/gdtoa.c:
No such file or directory.
with new snapshot
libavformat version 54.35.100 (internal)
MPEG-PS file format detected. VIDEO: MPEG2 720x576 (aspect 3)
25.000 fps 9800.0 kbps (1225.0 kbyte/s) Load subtitles in ../ [VO_SDL] Using driver: windib.
========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.71.100 (internal) [mpeg2video #
00000000016D96C0]Warning: not compiled with thread support, using thread emulation
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
========================================================================== Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders [ac3
# 00000000016D96C0]Warning: not compiled with thread support, using
thread emulation
Program received signal SIGSEGV, Segmentation fault.
0x00000000009d4fee in decode_frame ()

Related

VLCJ Output audio/video modules

Is there any abillity to change "Audio output module" and "Video output" in my java program?
My linux doesn't play video files when these options are set to "automatic". So in VLC Player I have chosen "ALSA" and "OpenGL GLX (XCB)", now my files are playing.
But when I use EmbeddedMediaPlayerComponent in my program, I think it chooses "automatic" mode for a/v threads. Then I'm getting a green screen (instead of my video) and an error in terminal:
[00007f691c112ac8] pulse audio output error: stream connection failure: Timeout
[00007f691c112ac8] core audio output error: module not functional
[00007f69081b6168] core decoder error: failed to create audio output
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Strange, but audio is playing...
Please, help! ;)
Change the MediaPlayerFactory initialisation arguments to specify the name of the audio/video output module that you want to use.
Something like:
String[] args = {"--vout=xcb", "--aout=alsa"});
From a command-line, vlc --list will give you the available module names.

mplayer doesn't like popen suddenly?

Been stumped over a problem with popen for a few days.
The code:
int main(){
FILE *fp = popen("mplayer /home/linaro/Music/cp.mp3", "r");
char buffer[1028];
while (fgets(buffer, 1028, fp) != NULL)
{
std::cerr<<buffer;
}
pclose(fp);
fp = 0;
return 0;
}
was run at the shop on a linaro embedded controller. Ran fine, no errors. Even though the code is simple (Just plays a coldplay song on execution and then quits) it seems to be causing me more grief than one would think.
If I copy and paste the command itself into a normal bash shell, it runs fine. And what's worse, is it ran fine up until it got plugged in somewhere else. I'm not sure if it is now being connected to via a headphone jack versus before it was in a line out jack.
Regardless, the error I get when I run it is (summarized down to the relevant part)
MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlaye4
Team mplayer: could not connect to socket mplayer: No such file or
directory Failed to open LIRC support. You will not be able to use
your remote control.
Playing /home/linaro/Music/cp.mp3 libavformat version 53.21.1
(external) Mismatching header version 53.19.0 Audio only file format
detected. Clip info: Title: The Scientist Artist: Coldplay Album: A
Rush Of Blood To The Head Year: 2002 Comment: Genre: Unknown Load
subtitles in /home/linaro/Music/ Requested audio codec family [mpg123]
(afm=mpg123) not available. Enable it at compilation. Opening audio
decoder: [ffmpeg] FFmpeg/libavcodec audio decoders libavcodec version
53.35.0 (external) Mismatching header version 53.32.2 AUDIO: 44100 Hz, 2
ch, floatle, 256.0 kbit/9.07% (ratio: 32002->352800) Selected audio
codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio) Home
directory not accessible: Permission denied AO: [pulse] Init failed:
Connection refused Failed to initialize audio driver 'pulse' Home
directory not accessible: Permission denied [AO_ALSA] alsa-lib:
pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC1D0p' failed (-22):
Invalid argument [AO_ALSA] Playback open error: Invalid argument
Failed to initialize audio driver 'alsa' [AO SDL] Samplerate: 44100Hz
Channels: Stereo Format floatle [AO SDL] using aalib audio driver. [AO
SDL] Unsupported audio format: 0x1d. [AO SDL] Unable to open audio: No
available audio device Failed to initialize audio driver 'sdl:aalib'
Could not open/initialize audio device -> no sound. Audio: no sound
Video: no video
Again, if I copy and paste the exact command it executes via popen into the console, it begins playing. It fails if pass -ao alsa, -ao pulse, -ao oss as well, which has me completely stumped. Any help would be appreciated!
Edit:
Linux is linaro, based on Ubuntu 12.04 using arm CPU
Issue wound up being as Jonas and alk suggested -- permissions. Something along the way changed how it ran, but at the end of the day the dirty fix was to just include
su - user -c ' mplayer ... '
To the line being called.

Capture and play MJPEG - Network Video stream over UDP with OpenCV and ffmpeg

I'm trying to receive and display a udp live mjpeg - network video stream from a network cam.
I can play the video stream by starting VLC with the Argument --demux=mjpeg and then typing udp://#:1234 in the network stream field. Or with gstreamer by the console line: gst-launch -v udpsrc port=1234 ! jpegdec ! autovideosink. My Cam has the IP Address 192.168.1.2 and it sends the stream to the address 192.168.1.1:1234.
I've tried to capture the stream with OpenCV with:
cv::VideoCapture cap;
cap.open("udp://#192.168.1.1:1234");
I tried also:
cap.open("udp://#:1234")
cap.open("udp://#localhost:1234")
cap.open("udp://192.168.1.1:1234")
cap.open("udp://192.168.1.1:1234/")
But the function hangs until I press ctrl+C. I have the same problem when I use ffmpeg with: ffmpeg -i udp://#192.168.1.1:1234 -vcodec mjpeg
What did I do wrong? When i installed ffmpeg i couldn't install the dependency libsdl1.2-dev. Is that the problem?
If so, there is any way to read the udp-frames from the socket and then decode the JPEG pictures and display it with OpenCV?
I have the OS Ubuntu linaro oneiric 11.10 with the kernel 3.0.35 from Freescale
thanks any way. i have fixed this problem by installing a newr version of ffmpeg and using the C-Api of ffmpeg

Reading video files with OpenCV VideoCapture

I am having trouble being able top open any video files in OpenCV besides those encoded in MJPEG.
I have installed OpenCV using this script (which should compile OpenCV with support for ffmpeg) and an testing using the sample provided here.
When running with a h264 encoded video I get:
[mov,mp4,m4a,3gp,3g2,mj2 # 0x123ed80] multiple edit list entries, a/v desync might occur, patch welcome
[h264 # 0x12465e0] A non-intra slice in an IDR NAL unit.
[h264 # 0x12465e0] decode_slice_header error
Could not open the output video for write: test.mp4
When running with an MPEG-2 encoded video I get:
[mpegts # 0x1e92d80] PES packet size mismatch
[mpegts # 0x1e92d80] PES packet size mismatch
[mpegts # 0x1e92d80] max_analyze_duration reached
[mpegts # 0x1e92d80] PES packet size mismatch
Could not open the output video for write: test.mpeg
I am running x64 Ubuntu 12.04.
EDIT: I tried OpenCV 2.4.8 on a Ubuntu 13.10 x86 VM, ffmpeg works fine, however the sample code still fails, this time with the following error:
[h264 # 0x849ff40] A non-intra slice in an IDR NAL unit.
[h264 # 0x849ff40] decode_slice_header error
Could not find encoder for codec id 28: Encoder not foundOpenCV Error: Unsupported format or combination of formats (Gstreamer Opencv backend doesn't support this codec acutally.) in CvVideoWriter_GStreamer::open, file /home/dan/Install-OpenCV/Ubuntu/2.4/OpenCV/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp, line 505
terminate called after throwing an instance of 'cv::Exception'
what(): /home/dan/Install-OpenCV/Ubuntu/2.4/OpenCV/opencv-2.4.8/modules/highgui/src/cap_gstreamer.cpp:505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open
I am not sure about the main reason for this. But I guess this problem is relate to the decoder installed on your system. According to the install script from github, it removes your ffmpg and x264 then rebuilds them from source code. Before testing your OpenCV code, try simple "ffmpeg" command on your test video.
Such as: ffmpeg -i inputfile.avi -f image2 image-%3d.jpeg
The script you have used is quite old and installs old version of OpenCV (2.4.2, while the latest stable is 2.4.8), try to use this script - https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_8.sh or install OpenCV and ffmpeg on you own.
As rookiepig mentioned - check whether ffmpeg is working.
Try to use different codec - here http://www.fourcc.org/ is full list of options, of course testing all of them is useless - jsut try the most popular codecs.
I know that it's stupid, but on Windows some codecs works only in release mode(okay, probably they are working in both modes, but on my machine they used to work only in release mode). Try to compile you program in both modes and check whether there is some difference.
And show us you code, maybe there is something wrong in it.

how to program the STM32 flash using openOCD and gdb

I'm using an Olimex ARM-USB-OCD dongle with openOCD and GDB to program and debug an stm32f103 micro. The IDE I'm using came from the Olimex dev-kit CD and makes use of eclipse ganymede.
I can load a small program into the RAM and step through the code without any problems.
I now have a much larger program which doesn't fit into RAM (which is only 20K) and so I'd like to run it from flash (which is 128K).
I've modified the linker script indicating the program code should go in the flash section (address 0x8000000), but gdb fails to load the program.
(gdb)
20 load main.out
&"load main.out\n"
load main.out
~"Loading section .text, size 0xb0e6 lma 0x8000000\n"
Loading section .text, size 0xb0e6 lma 0x8000000
&"Load failed\n"
Load failed
What should I do to get gdb to load the program into flash?
Have you considered flashing directly with openocd? I am doing this in a similar setup, but with an ARM7 microcontroller.
openocd -f flash.cfg
Here is my flash.cfg
set CHIPNAME at91sam7x512
source [find interface/olimex-arm-usb-ocd.cfg]
source [find target/at91sam7sx.cfg]
init
halt
flash probe 0
flash probe 1
flash erase_sector 0 0 15
flash erase_sector 1 0 15
flash write_image my-image.elf
at91sam7 gpnvm 0 set
at91sam7 gpnvm 1 set
at91sam7 gpnvm 2 set
shutdown
The GPNVM stuff is Atmel SAM7 specific, but I think this script should give you a good starting point for making a STM32 version. Openocd can be a bit confusing in the beginning, but the documentation is good and worth reading (http://openocd.berlios.de/). The current stable version (0.4.0) is quite old, so if you have problems, download the latest source code and compile your own.