NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me

TOPIC: RPi2 MMAl hardware decoder cause corrupt Video

RPi2 MMAl hardware decoder cause corrupt Video 1 year 21 hours ago #1

  • phester
  • phester's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
I re-encoded a few mp4 from a phone with FFmpeg. Nothing out of the ordinary
"ffmpeg -i "%%X" -vf transpose=2 -c:a copy -metadata:s:v rotate="" "rotated\%%X""

But when I cast them to the RPI the converted video does not work correctly. Sound is fine but Video is green and blocky and out jumbled up

when I disable hardware acceleration it works fine.

from the logs

Not working

18:21:12 103.213127 T:1713370176 INFO: ffmpeg[661FF440]: Metadata:
18:21:12 103.214050 T:1713370176 INFO: ffmpeg[661FF440]: major_brand : isom
18:21:12 103.214188 T:1713370176 INFO: ffmpeg[661FF440]: minor_version : 512
18:21:12 103.214630 T:1713370176 INFO: ffmpeg[661FF440]: compatible_brands: isomiso2avc1mp41
18:21:12 103.214760 T:1713370176 INFO: ffmpeg[661FF440]: encoder : Lavf57.49.100
18:21:12 103.214867 T:1713370176 INFO: ffmpeg[661FF440]: episode_sort : 1
18:21:12 103.215416 T:1713370176 INFO: ffmpeg[661FF440]: season_number : 1
18:21:12 103.215530 T:1713370176 INFO: ffmpeg[661FF440]: media_type : 9
18:21:12 103.215820 T:1713370176 INFO: ffmpeg[661FF440]: hd_video : 0
18:21:12 103.216118 T:1713370176 INFO: ffmpeg[661FF440]: Duration: 00:00:07.85, start: 0.000000, bitrate: 762 kb/s
18:21:12 103.217720 T:1713370176 INFO: ffmpeg[661FF440]: Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x1280 [SAR 1:1 DAR 9:16], 614 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
18:21:12 103.218193 T:1713370176 INFO: ffmpeg[661FF440]: Metadata:
18:21:12 103.218323 T:1713370176 INFO: ffmpeg[661FF440]: rotate : 90
18:21:12 103.218674 T:1713370176 INFO: ffmpeg[661FF440]: handler_name : VideoHandler
18:21:12 103.219009 T:1713370176 INFO: ffmpeg[661FF440]: Side data:
18:21:12 103.219131 T:1713370176 INFO: ffmpeg[661FF440]: displaymatrix: rotation of -90.00 degrees
18:21:12 103.219940 T:1713370176 INFO: ffmpeg[661FF440]: Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 141 kb/s (default)
18:21:12 103.220116 T:1713370176 INFO: ffmpeg[661FF440]: Metadata:
18:21:12 103.220604 T:1713370176 INFO: ffmpeg[661FF440]: handler_name : SoundHandler
18:21:12 103.220833 T:1713370176 DEBUG: CDVDDemuxFFmpeg::AddStream(0, ...) -> 0
18:21:12 103.220924 T:1713370176 DEBUG: CDVDDemuxFFmpeg::AddStream(1, ...) -> 1
18:21:12 103.221191 T:1713370176 DEBUG: CDVDInputStreamFile::SetReadRate - set cache throttle rate to 226356 bytes per second
18:21:12 103.221321 T:1713370176 NOTICE: Opening stream: 0 source: 256
18:21:12 103.221535 T:1713370176 DEBUG: CMMALRenderer::init_vout configured:0 format:0->18
18:21:12 103.230362 T:1713370176 NOTICE: Creating video codec with codec id: 28
18:21:12 103.230545 T:1713370176 DEBUG: CDVDFactoryCodec: compiled in hardware support: AMCodec:no MediaCodec:no OpenMax:no libstagefright:no VDPAU:no VAAPI:no iMXVPU:no MMAL:yes
18:21:12 103.230705 T:1713370176 DEBUG: FactoryCodec - Video: mmal-xxxx - Opening
18:21:12 103.244308 T:1713370176 DEBUG: FactoryCodec - Video: mmal-mvc - Opened
18:21:12 103.244789 T:1713370176 NOTICE: Creating video thread
18:21:12 103.244926 T:1456469056 NOTICE: Thread RefClock start, auto delete: false
18:21:12 103.245071 T:1439691840 NOTICE: Thread DVDPlayerVideo start, auto delete: false
18:21:12 103.245193 T:1456469056 DEBUG: CVideoReferenceClock: setting up RPi
18:21:12 103.245293 T:1713370176 NOTICE: Opening stream: 1 source: 256
18:21:12 103.245384 T:1439691840 NOTICE: running thread: video_thread
18:21:12 103.245476 T:1456469056 DEBUG: CVideoReferenceClock: fps: 50.00
18:21:12 103.245567 T:1713370176 NOTICE: Finding audio codec for: 86018
18:21:12 103.245697 T:1456469056 DEBUG: CVideoReferenceClock: Detected refreshrate: 50.000 hertz
18:21:12 103.245804 T:1713370176 DEBUG: FactoryCodec - Audio: passthrough - Opening
18:21:12 103.246017 T:1713370176 DEBUG: FactoryCodec - Audio: passthrough - Failed
18:21:12 103.246117 T:1713370176 DEBUG: FactoryCodec - Audio: FFmpeg - Opening
18:21:12 103.259598 T:1713370176 DEBUG: FactoryCodec - Audio: FFmpeg - Opened
18:21:12 103.259865 T:1713370176 NOTICE: Creating audio thread
18:21:12 103.260246 T:1416094784 NOTICE: Thread DVDPlayerAudio start, auto delete: false
18:21:12 103.260414 T:1439691840 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
18:21:12 103.260521 T:1416094784 NOTICE: running thread: CDVDPlayerAudio::Process()
18:21:12 103.260651 T:1416094784 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_SYNCHRONIZE
18:21:12 103.261086 T:1713370176 DEBUG: OnPlayBackStarted: play state was 1, starting 1
18:21:12 103.261238 T:1713370176 DEBUG: CDVDPlayer::SetCaching - caching state 1
18:21:12 103.261353 T:1967378432 DEBUG: PlayFile: OpenFile succeed, play state 2
18:21:12 103.261475 T:1713370176 DEBUG: CDVDPlayer::SetCaching - caching state 3
18:21:12 103.261574 T:1967378432 DEBUG: OnPlayBackStarted: play state was 2, starting 0
18:21:12 103.261742 T:1439691840 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(0.000000, 1)
18:21:12 103.261848 T:1439691840 INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
18:21:12 103.262360 T:1713370176 DEBUG: CDVDPlayer::CheckContinuity - wrapback :2, prev:66666.666667, curr:33333.333333, diff:-33333.333333
18:21:12 103.264313 T:1416094784 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(21333.333333, 1)
18:21:12 103.265434 T:1416094784 NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
18:21:12 103.266739 T:1416094784 DEBUG: CDVDPlayerAudio:: synctype set to 2: resample
18:21:12 103.267006 T:1947202624 INFO: CActiveAESink::OpenSink - initialize sink
18:21:12 103.267227 T:1416094784 NOTICE: CDVDPlayerAudio::OutputPacket duplicate 4 packets of duration 21
18:21:12 103.267479 T:1947202624 DEBUG: CAESinkPi:Drain delay:0ms now:0ms
18:21:12 103.267586 T:1947202624 DEBUG: CAESinkPi:Deinitialize
18:21:12 103.268127 T:1947202624 DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000000
18:21:12 103.283409 T:1947202624 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0x68e4ef38
18:21:12 103.283958 T:1947202624 DEBUG: CActiveAESink::OpenSink - trying to open device PI:HDMI
18:21:12 103.284607 T:1967378432 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.image_decode input port 320 output port 321 m_handle 0x2bcb8a0
18:21:12 103.284775 T:1947202624 DEBUG: CAESinkPi:SetAudioProps hdmi_stream_channels 0 hdmi_channel_map 00000008
18:21:12 103.284935 T:1947202624 DEBUG: CAESinkPi:Initialize Format:30 Channels:2 Samplerate:48000 framesize:8 bufsize:19200 bytes/s=384000.00 dest=PI:HDMI
18:21:12 103.286263 T:1967378432 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.image_decode) - port(320), nBufferCountMin(2), nBufferCountActual(2), nBufferSize(81920), nBufferAlignmen(16)
18:21:12 103.286819 T:1947202624 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100 m_handle 0x68e4ef38
18:21:12 103.289955 T:1947202624 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_render) - port(100), nBufferCountMin(1), nBufferCountActual(2), nBufferSize(19200), nBufferAlignmen(16)
18:21:12 103.291031 T:1947202624 DEBUG: CActiveAESink::OpenSink - SinkPi Initialized:
18:21:12 103.291214 T:1947202624 DEBUG: Output Device : HDMI
18:21:12 103.291298 T:1947202624 DEBUG: Sample Rate : 48000
18:21:12 103.291382 T:1947202624 DEBUG: Sample Format : AE_FMT_FLOATP
18:21:12 103.291466 T:1947202624 DEBUG: Channel Count : 2
18:21:12 103.291550 T:1947202624 DEBUG: Channel Layout: FL,FR
18:21:12 103.291626 T:1947202624 DEBUG: Frames : 2400
18:21:12 103.291710 T:1947202624 DEBUG: Frame Samples : 4800
18:21:12 103.291786 T:1947202624 DEBUG: Frame Size : 8
18:21:12 103.293053 T:1439691840 NOTICE: fps: 30.000000, pwidth: 720, pheight: 1280, dwidth: 720, dheight: 1280
18:21:12 103.293221 T:1439691840 DEBUG: OutputPicture - change configuration. 720x1280. framerate: 30.00. format: MMAL
18:21:12 103.293427 T:1439691840 DEBUG: CMMALRenderer::Configure - 720x1280->This email address is being protected from spambots. You need JavaScript enabled to view it. flags:12 format:18 ext:0 orient:90
18:21:12 103.293617 T:1439691840 NOTICE: Display resolution USER : 1920x1080 (1920x1080) @ 50.00 - Full Screen (26)
18:21:12 103.293823 T:1439691840 DEBUG: CMMALRenderer::init_vout configured:0 format:18->18
18:21:12 103.293945 T:1439691840 DEBUG: CXBMCRenderManager::Configure - 3
18:21:12 103.294067 T:1967378432 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.egl_render input port 220 output port 221 m_handle 0x2ca84a0
18:21:12 103.294182 T:1439691840 DEBUG: CVideoReferenceClock: Clock speed 100.000000%
Attachments:
The administrator has disabled public write access.