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

Videos play without audio and at least 2x speed when using bluetooth audio #636

Open
DarknightDS opened this issue May 31, 2018 · 5 comments

Comments

@DarknightDS
Copy link

DarknightDS commented May 31, 2018

When connected to a bluetooth speaker and I run omxplayer with --adev alsa to send audio over bluetooth, no audio can be heard when the Pi is also using the USB port for file transfers over usb ethernet. I have an HDMI plugged into the Pi. All video files were created using handbrake's Super HQ 480p profile. Once converted, I then convert the files to MKV as MP4 files would have this issue about 1 in 3 playbacks using omxplayer without any writes to disk or ethernet transfers etc. When videos play back at normal speed, the audio on bluetooth is good.

Raspbian stretch is installed, fully updated.

I'm using a raspberry pi zero w

Omxplayer was installed via the make instructions on github:
Build date: Sun, 27 May 2018 12:23:25 -0400
Version : 9680057 [master]
Repository: https://github.com/popcornmix/omxplayer.git

Media Info:
Format : Matroska
Format version : Version 4 / Version 2
File size : 915 MiB
Duration : 26 min 21 s
Overall bit rate : 4 853 kb/s
Encoded date : UTC 2018-05-29 05:32:30
Writing application : mkvmerge v23.0.0 ('The Bride Said No') 64-bit
Writing library : libebml v1.3.6 + libmatroska v1.4.9

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings : CABAC / 5 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 26 min 21 s
Bit rate : 4 499 kb/s
Width : 538 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Original display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.727
Stream size : 849 MiB (93%)
Writing library : x264 core 148 r2708 86b7198
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=17500 / vbv_bufsize=17500 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC-2
Duration : 26 min 21 s
Bit rate : 159 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 11 ms
Stream size : 30.0 MiB (3%)
Language : English
Default : Yes
Forced : No

Audio #2
ID : 3
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 26 min 21 s
Bit rate mode : Constant
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 33 ms
Stream size : 36.2 MiB (4%)
Language : English
Service kind : Complete Main
Default : No
Forced : No

@DarknightDS
Copy link
Author

DarknightDS commented May 31, 2018

Just noticed that when the file plays without audio, if I set the playback speed to 0.975 the video plays back at the correct speed and I get audio output over Bluetooth properly. This isn't a fix for my issue as the video should playback correctly without me having to slow it down manually. In the project I plan to use this in, I don't want to wire 2 more buttons to step the speed up and down. Video randomly speeds up in middle of video playback as well.

@gpmaxx
Copy link

gpmaxx commented Nov 16, 2018

Hi. Is there an update, resolution or confirmation of this issue? I'm facing the same problem. Video and sound work fine when playing over HDMI audio. However, when trying to play via bluetooth using the -o alsa option the video plays too fast with no sound. Slowing the video down (hitting 1) corrects the fast play and the sound starts. Even more confusing is that perhaps 1 out of every 5 times everything works fine from startup. Using the alsa option to play via i2s works fine. This is on Raspberry Pi Stretch.

@vectorstudio
Copy link

sudo omxplayer -o hdmi /mnt/disk/movie.mp4
using keyborad to change speed

When it's played in normal speed,everything is fine. When it's played in slower or faster speed, the video is fine, but no audio.

@ole1986
Copy link

ole1986 commented Aug 13, 2020

two years and no fix for it when using alsa audio device?

@popcornmix
Copy link
Owner

Have you tried using VLC?
omxplayer is being deprecated and VLC is the recommended alternative.

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

5 participants