Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKV video plays at double speed (FFmpeg-1.2) #150

Closed
pilfs opened this issue Apr 7, 2013 · 9 comments
Closed

MKV video plays at double speed (FFmpeg-1.2) #150

pilfs opened this issue Apr 7, 2013 · 9 comments

Comments

@pilfs
Copy link

pilfs commented Apr 7, 2013

Built a newly checked out omxplayer against external FFmpeg-1.2.
mpeg4 in .avi container plays fine.
h264 in .mkv container plays at what looks like double speed, with sped up sound.
If I enable --passthrough, the video plays at correct speed so sound is involved somehow.
I've also tried options -y, -z, -r with no difference.

No idea if it's a problem with omxplayer or FFmpeg.

Output of omxplayer -i /mnt/Videos/Sintel.2010.1080p.mkv:
Input #0, matroska,webm, from '/mnt/Videos/Sintel.2010.1080p.mkv':
Metadata:
creation_time : 2011-04-25 12:57:46
Duration: 00:14:48.03, start: 0.000000, bitrate: 10562 kb/s
Chapter #0.0: start 0.000000, end 103.125000
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x818, SAR 1:1 DAR 960:409, 24 fps, 24 tbr, 1k tbn, 48 tbc
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s

Output of omxplayer.log:
00:00:01 T:0 DEBUG: DllBcm: Using omx system library
01:00:00 T:0 DEBUG: DllOMX: Using omx system library
42136:242:42136 T:0 DEBUG: DllAvFormat: Using libavformat system library
00:00:11024 T:0 DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0 DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0 DEBUG: DllAvFormat: Using libavformat system library
18:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.clock input port 80 output port 81
42636:244:52 T:0 DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0 DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0 DEBUG: DllAvFormat: Using libavformat system library
43616:244:25804 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: Previous line repeats 5 times.
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_decode input port 130 output port 131
25:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_render input port 90 output port 90
28:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.video_scheduler input port 10 output port 11
27:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.text_scheduler input port 150 output port 151
818:00:00 T:0 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.video_decode) - port(130), nBufferCountMin(1), nBufferCountActual(60), nBufferSize(81920), nBufferAlignmen(16)
00:00:00 T:0 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.text_scheduler) - port(150), nBufferCountMin(1), nBufferCountActual(100), nBufferSize(1024), nBufferAlignmen(16)
00:00:00 T:0 DEBUG: COMXCoreComponent::AllocOutputBuffers component(OMX.broadcom.text_scheduler) - port(151), nBufferCountMin(1), nBufferCountActual(1), nBufferSize(1024) nBufferAlignmen(16)
2848:245:61944 T:0 DEBUG: COMXVideo::Open - decoder_component(0x0xf4bc10), input_port(0x82), output_port(0x83) deinterlace 0 hdmiclocksync 0
62560:45695:00 T:0 DEBUG: OMXThread::Create - Thread with id -1300237216 started
62560:45567:00 T:0 DEBUG: OMXThread::Create - Thread with id -1308625824 started
00:00:1864 T:0 DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0 DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0 DEBUG: DllAvFormat: Using libavformat system library
653:00:180 T:0 DEBUG: DllAvUtilBase: Using libavutil system library
00:00:00 T:0 DEBUG: DllAvCodec: Using libavcodec system library
00:00:00 T:0 DEBUG: DllAvFormat: Using libswresample system library
00:00:26356 T:0 INFO: COMXAudioCodecOMX::GetChannelMap - FFmpeg reported 6 channels, but the layout contains 0 ignoring
1104:245:25804 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: Previous line repeats 2 times.
00:00:00 T:0 DEBUG: DllAvUtilBase: Using libavutil system library
06:00:00 T:0 INFO: CPCMRemap: I channel map: FL,FR,CE,LFE,BL,BR,UNKNOWN CHANNEL:-1,UNKNOWN CHANNEL:-1
37100:08:61564 T:0 DEBUG: pcm->nPortIndex : 0
37100:08:61564 T:0 DEBUG: pcm->eNumData : 0
37100:08:61564 T:0 DEBUG: pcm->eEndian : 1
37100:08:61564 T:0 DEBUG: pcm->bInterleaved : 1
37100:08:61564 T:0 DEBUG: pcm->nBitPerSample : 16
37100:08:61564 T:0 DEBUG: pcm->ePCMMode : 0
37100:08:61564 T:0 DEBUG: pcm->nChannels : 8
37100:08:61564 T:0 DEBUG: pcm->nSamplingRate : 48000
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelLF
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelRF
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelCF
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelLFE
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelLR
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelRR
37100:08:19 T:0 DEBUG: pcm->nPortIndex : 0
37100:08:19 T:0 DEBUG: pcm->eNumData : 0
37100:08:19 T:0 DEBUG: pcm->eEndian : 1
37100:08:19 T:0 DEBUG: pcm->bInterleaved : 1
37100:08:19 T:0 DEBUG: pcm->nBitPerSample : 16
37100:08:19 T:0 DEBUG: pcm->ePCMMode : 0
37100:08:19 T:0 DEBUG: pcm->nChannels : 2
37100:08:19 T:0 DEBUG: pcm->nSamplingRate : 48000
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelLF
19:00:25968 T:0 DEBUG: OMX_AUDIO_ChannelRF
25:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100
25:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_decode input port 120 output port 121
24:00:19496 T:0 DEBUG: DllOMX: Using omx system library
00:00:00 T:0 DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_mixer input port 232 output port 231
02:00:00 T:0 DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_decode) - port(120), nBufferCountMin(4), nBufferCountActual(250), nBufferSize(6144), nBufferAlignmen(16)
00:6144:63596 T:0 DEBUG: COMXAudio::Initialize Ouput bps 16 samplerate 48000 channels 2 device hdmi buffer size 1536000 bytes per second 768000 passthrough 0 hwdecode 0
00:6144:63596 T:0 DEBUG: COMXAudio::Initialize Input bps 16 samplerate 48000 channels 8 device hdmi buffer size 1536000 bytes per second 768000 passthrough 0 hwdecode 0
5216:45416:00 T:0 DEBUG: OMXThread::Create - Thread with id -1318579104 started
00:00:00 T:0 DEBUG: pcm->nPortIndex : 232
00:00:00 T:0 DEBUG: pcm->eNumData : 0
00:00:00 T:0 DEBUG: pcm->eEndian : 1
00:00:00 T:0 DEBUG: pcm->bInterleaved : 1
00:00:00 T:0 DEBUG: pcm->nBitPerSample : 16
00:00:00 T:0 DEBUG: pcm->ePCMMode : 0
00:00:00 T:0 DEBUG: pcm->nChannels : 8
00:00:00 T:0 DEBUG: pcm->nSamplingRate : 48000
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelLF
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelRF
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelCF
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelLFE
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelLR
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelRR
00:00:19 T:0 DEBUG: pcm->nPortIndex : 100
00:00:19 T:0 DEBUG: pcm->eNumData : 0
00:00:19 T:0 DEBUG: pcm->eEndian : 1
00:00:19 T:0 DEBUG: pcm->bInterleaved : 1
00:00:19 T:0 DEBUG: pcm->nBitPerSample : 16
00:00:19 T:0 DEBUG: pcm->ePCMMode : 0
00:00:19 T:0 DEBUG: pcm->nChannels : 2
00:00:19 T:0 DEBUG: pcm->nSamplingRate : 48000
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelLF
01:00:3296 T:0 DEBUG: OMX_AUDIO_ChannelRF
00:256:55740 T:0 DEBUG: OMXThread::Run - Exited thread with id -1308625824
240:00:32748 T:0 DEBUG: OMXThread::StopThread - Thread stopped
338:00:6684 T:0 DEBUG: OMXThread::Run - Exited thread with id -1300237216
46272:46524:32748 T:0 DEBUG: OMXThread::StopThread - Thread stopped

@popcornmix
Copy link
Collaborator

Does standard raspbian image behave the same way?

@pilfs
Copy link
Author

pilfs commented Apr 7, 2013

Same file plays fine in up to date 2013-02-09-wheezy-raspbian with latest firmware.
So most likely ffmpeg related.

@popcornmix
Copy link
Collaborator

Any difference in omxplayer.log between good and bad ffmpeg versions?

@pilfs
Copy link
Author

pilfs commented Apr 7, 2013

No difference in the log, fps and sound related digits looks identical.

@popcornmix
Copy link
Collaborator

This comments:
xbmc/xbmc#2554 (comment)

suggests planar audio formats may cause problems with xbmc and ffmpeg 1.2.
Perhaps you are seeing a similar issue.

@FlyingRat
Copy link

Test with ffplay from the ffmpeg dist and also some of these binaries: https://www.dropbox.com/sh/a7tsbe6o80rrv2a/S2NszQXp7H and report back ...

@pilfs
Copy link
Author

pilfs commented Apr 17, 2013

For what it's worth, I've now tried the same video with ffplay -vn from the same build and the audio is playing at correct speed.

@popcornmix
Copy link
Collaborator

I've just updated omxplayer to use ffmpeg 1.2.
This now directly supports the planar float audio format on the GPU so you need to rpi-update.

Let me know if it fixes your playing speed problems.

@pilfs
Copy link
Author

pilfs commented Apr 20, 2013

Thanks popcornmix!
Problem is solved after rebuild and rpi-update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants