MP4 file won't stream into omxplayer,any idea why?

388 Views Asked by At

I have an MP4 that plays just fine using omxplayer omxplayer F.mp4

If I use the -i flag, I get the following media information

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:03:24.55, start: 0.000000, bitrate: 270 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x480, 136 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

I'm experimenting with simple streaming into omxplayer, without success. e.g.

cat F.mp4 | omxplayer -o hdmi --no-keys pipe:0

omxplayer prints

Video codec omx-h264 width 640 height 480 profile -99 fps 30.000000 Audio codec aac channels 2 samplerate 44100 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0

It seems to have figured out the write demux and codec to use. But then nothing. No vid or sound. Just sits there without even the courtesy of an error message.

If I add -b then the screen blanks, so omxplayer is definitely able to send that change to the hdmi output

This may seem a bit pointless,but I am trying to understand the streaming mechanism with a view to replacing the cat with nc, or some other mechanism to provide streaming. I want hw accelerated video rendering so I figured omxplayer was the way to go.

Tried --genlog and it generated an omplayer.log as shown below, but I can't interpret it. Any ideas?

I'm running a model 1 rpi (2012 with 512K, medium overclock) uname -a Linux alice 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT 2022 armv6l GNU/Linux

15:37:42 T:18446744071896302655   DEBUG: DllBcm: Using omx system library
15:37:42 T:18446744071896310619   DEBUG: DllOMX: Using omx system library
15:37:42 T:18446744071896316156   DEBUG: DllAvFormat: Using libavformat system library
15:37:42 T:18446744071896330767   DEBUG: DBus connection succeeded
15:37:42 T:18446744071896331310   DEBUG: DllAvUtilBase: Using libavutil system library
15:37:42 T:18446744071896331482   DEBUG: DllAvCodec: Using libavcodec system library
15:37:42 T:18446744071896331629   DEBUG: DllAvFormat: Using libavformat system library
15:37:43 T:18446744071896641670   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.clock input port 80 output port 81 m_handle 0x190e3a0
15:37:43 T:18446744071896644473   DEBUG: OMXClock::OMXStop
15:37:43 T:18446744071896645461   DEBUG: OMXClock::OMXSetSpeed(0.00) pause_resume:1
15:37:43 T:18446744071896646725   DEBUG: DllAvUtilBase: Using libavutil system library
15:37:43 T:18446744071896647084   DEBUG: DllAvCodec: Using libavcodec system library
15:37:43 T:18446744071896647244   DEBUG: DllAvFormat: Using libavformat system library
15:37:43 T:18446744071896656635   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_decode input port 130 output port 131 m_handle 0x190e2b0
15:37:43 T:18446744071896665681   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.video_decode) - port(130), nBufferCountMin(1), nBufferCountActual(60), nBufferSize(81920), nBufferAlignmen(16)
15:37:43 T:18446744071896718556   DEBUG: COMXVideo::Open - decoder_component(0x0x190e2b0), input_port(0x82), output_port(0x83) deinterlace 1 hdmiclocksync 0
15:37:43 T:18446744071896722676   DEBUG: OMXThread::Create - Thread with id -1390416192 started
15:37:43 T:18446744071896724920   DEBUG: OMXThread::Create - Thread with id -1398808896 started
15:37:43 T:18446744071896725390   DEBUG: DllAvUtilBase: Using libavutil system library
15:37:43 T:18446744071896725579   DEBUG: DllAvCodec: Using libavcodec system library
15:37:43 T:18446744071896725731   DEBUG: DllAvFormat: Using libavformat system library
15:37:43 T:18446744071896726018   DEBUG: DllAvUtilBase: Using libavutil system library
15:37:43 T:18446744071896726180   DEBUG: DllAvCodec: Using libavcodec system library
15:37:43 T:18446744071896726328   DEBUG: DllAvFormat: Using libswresample system library
15:37:43 T:18446744071896731219   DEBUG: DllAvUtilBase: Using libavutil system library
15:37:43 T:18446744071896731512   DEBUG: COMXAudio::SetCodingType OMX_AUDIO_CodingPCM
15:37:43 T:18446744071896731834    INFO: CPCMRemap: I channel map: FL,FR
15:37:43 T:18446744071896732139    INFO: CPCMRemap: O channel map: FL,FR
15:37:43 T:18446744071896732308   DEBUG: CPCMRemap: Downmix normalization is disabled
15:37:43 T:18446744071896732598   DEBUG: CPCMRemap: FL = FL(1.000000*)
15:37:43 T:18446744071896732858   DEBUG: CPCMRemap: FR = FR(1.000000*)
15:37:43 T:18446744071896749032   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_decode input port 120 output port 121 m_handle 0x191eb10
15:37:43 T:18446744071896758587   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_decode) - port(120), nBufferCountMin(4), nBufferCountActual(16), nBufferSize(65536), nBufferAlignmen(16)
15:37:43 T:18446744071896782313   DEBUG: COMXAudio::Initialize Input bps 32 samplerate 44100 channels 2 buffer size 529200 bytes per second 352800
15:37:43 T:18446744071896785722   DEBUG: pcm->direction      : input
15:37:43 T:18446744071896786081   DEBUG: pcm->nPortIndex     : 120
15:37:43 T:18446744071896786246   DEBUG: pcm->eNumData       : 0
15:37:43 T:18446744071896786400   DEBUG: pcm->eEndian        : 1
15:37:43 T:18446744071896786552   DEBUG: pcm->bInterleaved   : 1
15:37:43 T:18446744071896786707   DEBUG: pcm->nBitPerSample  : 32
15:37:43 T:18446744071896786951   DEBUG: pcm->ePCMMode       : 0
15:37:43 T:18446744071896787116   DEBUG: pcm->nChannels      : 2
15:37:43 T:18446744071896787273   DEBUG: pcm->nSamplingRate  : 44100
15:37:43 T:18446744071896787426   DEBUG: OMX_AUDIO_ChannelLF
15:37:43 T:18446744071896787573   DEBUG: OMX_AUDIO_ChannelRF
15:37:43 T:18446744071896787941   DEBUG: COMXAudio::Initialize device omx:hdmi passthrough 0 hwdecode 0
15:37:43 T:18446744071896790492   DEBUG: OMXThread::Create - Thread with id -1409540416 started
15:37:43 T:18446744071896792366  NOTICE: OMXClock using audio as reference
15:37:43 T:18446744071896795919   DEBUG: OMXClock::OMXReset audio / video : 1 / 1 wait mask 0->3 state : 2->1
15:37:43 T:18446744071896798962   DEBUG: Popped message member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:37:43 T:18446744071896799494 WARNING: Unhandled dbus message, member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:37:43 T:18446744071896800666   DEBUG: Normal M:0 (A:-4503599627370496 V:-4503599627370496) P:1 A:0.00 V:0.00/T:0.20 (0,0,0,0) A:0% V:0% (0.00,6.34)
15:37:43 T:18446744071896802089    INFO: COMXVideo::SubmitEOS
15:37:43 T:18446744071896804853    INFO: COMXAudio::SubmitEOS
15:37:43 T:18446744071896827226   DEBUG: Popped message member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:37:43 T:18446744071896827595 WARNING: Unhandled dbus message, member: NameAcquired interface: org.freedesktop.DBus type: 4 path: /org/freedesktop/DBus
15:37:43 T:18446744071896828571   DEBUG: Normal M:0 (A:-4503599627370496 V:-4503599627370496) P:1 A:0.00 V:0.00/T:0.20 (0,0,0,0) A:0% V:0% (0.00,6.34)
15:37:43 T:18446744071896829028   DEBUG: Resume 0.00,0.00 (0,0,0,0) EOF:1 PKT:(nil)
15:37:43 T:18446744071896829226   DEBUG: OMXClock::OMXSetSpeed(1.00) pause_resume:1
15:37:43 T:18446744071896851193   DEBUG: Normal M:0 (A:-4503599627370496 V:-4503599627370496) P:0 A:0.00 V:0.00/T:0.20 (0,0,0,0) A:0% V:0% (0.00,6.34)
0

There are 0 best solutions below