Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Video playback gets stuck on a first second (QtMultimedia 5.12)



  • Hello!

    My goal was to play video from youtube using VideoOutput, but video playback gets stuck(audio is ok) on first(differs time to time, but at the beginning) second, now I'm simplifying everything and trying to play some random mp4 from https://www.radiantmediaplayer.com/media/bbb-360p.mp4 — same result.

    What should I try to check or libVLC is just one solution? any thoughts would be appreciated ;)

    I'm on macOS 10.14.5, QtCreator 4.9.1 with Qt 5.12.4
    Deployment target is iOS simulator.

    The code is "easy-peasy-qmlesey":

    MediaPlayer {
    	id: mediaPlayer
    	autoLoad: false
    	autoPlay: true
    
    	onPlaybackRateChanged: {
    		console.debug("playbackRate: " + playbackRate);
    	}
    
    	onPlaybackStateChanged: {
    		console.debug("playbackState = " + mediaPlayer.playbackState);
    		videoOutput.isPlaying = (playbackState === MediaPlayer.PlayingState);
    	}
    
    	onAvailabilityChanged: {
    		console.debug("availability = " + mediaPlayer.availability);
    	}
    
    	onErrorChanged: {
    		console.debug("error = " + mediaPlayer.error);
    	}
    
    	onStatusChanged: {
    		console.debug("status = " + mediaPlayer.status);
    	}
    }
    
    VideoOutput {
    	id: videoOutput
    
    	source: mediaPlayer
    	anchors.fill: parent
    	fillMode: VideoOutput.PreserveAspectFit
    
    	property alias mediaSource: mediaPlayer.source
    	property alias mediaPlayer: mediaPlayer
    	property bool isPlaying: false
    }
    


  • On the real device(iPhone5s) everything works as expected.


Log in to reply