Open atleberg opened 6 years ago
I can also confirm that I can use ffmpeg to fetch the stream to a FIFO and play back from that same FIFO (using screen sessions for this). This solution, however, seems to have a memory leak so it will quit after a while (when the Pi's memory is full).
There's also the issue of too much latency (3-5 seconds), although I've tried to tune this.
According to the m_musicExtensions
list in omxplayer.cpp line 981, the file extension .stm is an audio only format, and therefore OMXPlayer switches off the video (line 1039 m_has_video = false;
) and warns you with the log message you highlighted. Furthermore the logging shows also that you probably used the -n -1
option as m_has_audio equals false
leads to the logging 15:27:40 T:962260002 NOTICE: OMXClock using video as reference
. Strange that OMXXPlayer doesn't stop by itself, and you had to ESCape it (15:27:53 T:975319816 DEBUG: Keyboard: character (0x1b)
) to get OMXPlayer terminated.
Can't you configure your IONodes camera so that you have to address it as an .mp4 stream in stead of an .stm? Or is the m_musicExtensions
incorrect and is .stm not an audio only format as you prove it by using ffmpeg to re-format it to an mp4 -with probably no audio.
I can play back other mp4 files - as well as some rtsp streams fine - so I know my setup work. However, this particular stream (from a IONodes card) have so far been impossible to get to work.
If I use ffmpeg to write the stream to disk first it will play back fine (and VLC on another computer works):
ffmpeg -i rtsp://user:pass@192.168.2.9:2020/videoinput_1/h264_2/media.stm -vcodec copy -acodec copy -map 0 -f segment -segment_time 30 -segment_format mp4 "ffmpeg_capture-%03d.mp4"
Using the command
omxplayer -I --avdict rtsp_transport:tcp rtsp://user:pass@192.168.2.9:2020/videoinput_1/h264_2/media.stm --genlog
shows the following result (but no video):Input #0, rtsp, from 'rtsp://user:pass@192.168.2.9:2020/videoinput_1/h264_2/media.stm':
Metadata:
title : /videoinput_1:0/h264_2/media.stm
Duration: N/A, start: 0.240011, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt470bg/bt470bg/smpte170m, progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
Subtitle count: 0, state: off, index: 1, delay: 0
Stopped at: 00:00:00
have a nice day ;)
These are the same exact settings as with the working camera.The log file shows the following:
15:27:39 T:960898306 DEBUG: DllBcm: Using omx system library
15:27:39 T:960899436 DEBUG: DllOMX: Using omx system library
15:27:39 T:960900029 DEBUG: DllAvFormat: Using libavformat system library
15:27:39 T:960902028 DEBUG: DBus connection succeeded
15:27:39 T:960903129 DEBUG: Keyboard: DBus connection succeeded
15:27:39 T:960903286 DEBUG: OMXThread::Create - Thread with id 1855975904 started
15:27:39 T:960903360 DEBUG: DllAvUtilBase: Using libavutil system library
15:27:39 T:960903387 DEBUG: DllAvCodec: Using libavcodec system library
15:27:39 T:960903409 DEBUG: DllAvFormat: Using libavformat system library
15:27:39 T:960904469 DEBUG: COMXPlayer::OpenFile - avformat_open_input rtsp://user:pass@192.168.2.9:2020/videoinput_1/h264_2/media.stm
15:27:39 T:961102235 DEBUG: COMXPlayer::OpenFile - avformat_open_input enabled SEEKING
15:27:40 T:962254654 WARNING: main - Ignoring video in audio filetype:rtsp://user:pass@192.168.2.9:2020/videoinput_1/h264_2/media.stm15:27:40 T:962258107 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.clock input port 80 output port 81 m_handle 0x1211058
15:27:40 T:962258497 DEBUG: OMXClock::OMXStop
15:27:40 T:962258682 DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
15:27:40 T:962259235 DEBUG: OMXThread::Create - Thread with id 1845490144 started
15:27:40 T:962260002 NOTICE: OMXClock using video as reference
15:27:40 T:962260685 DEBUG: Popped message member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:27:40 T:962260774 WARNING: Unhandled dbus message, member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:27:40 T:962260969 DEBUG: Normal M:0 (A:0 V:0) P:1 A:0.00 V:0.00/T:0.20 (0,0,1,1) A:0% V:0% (0.00,0.00)
15:27:40 T:962261059 DEBUG: Resume 0.00,0.00 (0,0,1,1) EOF:0 PKT:(nil)
15:27:40 T:962261116 DEBUG: OMXClock::OMXSetSpeed(1.00) pause_resume:1
15:27:40 T:962288827 DEBUG: Popped message member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:27:40 T:962288980 WARNING: Unhandled dbus message, member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:27:40 T:962289195 DEBUG: Normal M:0 (A:0 V:0) P:0 A:0.00 V:0.00/T:0.20 (0,0,1,1) A:0% V:0% (0.00,0.00)
15:27:53 T:975319816 DEBUG: Previous line repeats 325 times.
15:27:53 T:975319816 DEBUG: Keyboard: character (0x1b)
15:27:53 T:975329206 DEBUG: Popped message member: Action interface: org.mpris.MediaPlayer2.Player type: 1 path: /org/mpris/MediaPlayer2
15:27:53 T:975329916 DEBUG: OMXClock::OMXStop
15:27:53 T:975337601 DEBUG: OMXThread::Run - Exited thread with id 1845490144
15:27:53 T:975338201 DEBUG: OMXThread::StopThread - Thread stopped
15:27:53 T:975349847 DEBUG: OMXThread::Run - Exited thread with id 1855975904
15:27:53 T:975350023 DEBUG: OMXThread::StopThread - Thread stopped
15:27:53 T:975352480 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.clock handle 0x1211058
I've tried to disable the sound using
-n -1
, but no effect. The camera is configured with no sound by default, but turning it on doesn't help either.Any thoughts?