[DEV] Porting mplayer to Dream - G1 Android Development

I was very interested to see a thread in the Hero section on cross-compiling the excellent linux mplayer application
In this thread, http://forum.xda-developers.com/showthread.php?t=575500 some work has been done to get mplayer to work which may throw some interest to people who are interested in getting mplayer going on the Dream.
I have tried the binary on the Dream and am not getting any sound out but am having most **success** with "-ao pcm:file=/dev/msm_pcm_out -v" halts MPlayer with the line "Increasing filtered audio buffer size from 0 to 65536".
I do get flashing video; which is unwatchable but at least a start.

i got it on my tomtom, which uses arm too...
http://www.opentom.org/Build_MPlayer
its a start, not a cure

A Q, what does 'mplayer -ao help' come back with?
Might gives clues about the audio driver to use.

installed mplayer myself in /data and running mplayer gives:
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video
also running 'mplayer -ao help' gives:
bash-3.2# /data/mplayer -ao help
Cannot find HOME directory.
MPlayer SVN-r29814-4.4.1 (C) 2000-2009 MPlayer Team
Available audio output drivers:
oss OSS/ioctl audio output
mpegpes DVB audio output
v4l2 V4L2 MPEG Audio Decoder output
null Null audio output
pcm RAW PCM/WAVE file writer audio output
no idea how this can work

The ones available are the ones mplayer was compiled with. You have to change the devices in the mplayer-framebuffer source for video, I guess you have to do the same for the audio, which is a bit more complicated I think. MPlayer is definitely on my ToDo though.

Related

No audio in video mp4 video format

I am able to play this particular video file, but am not getting any audio. Is there a certain audio codec that I need to download?
File details: Video: MPEG4 Video (H264) 1264x528 23.98fps [Video]
Audio: AAC 48000Hz 6ch 4608Kbps [Audio]
TPA_Droid said:
I am able to play this particular video file, but am not getting any audio. Is there a certain audio codec that I need to download?
File details: Video: MPEG4 Video (H264) 1264x528 23.98fps [Video]
Audio: AAC 48000Hz 6ch 4608Kbps [Audio]
Click to expand...
Click to collapse
It is because Galaxy S can't playback audio with 6 channels , i did not try this my self but that is what others observed.
Yes, I think it's limited to 5.1 channel audio encoded videos.
Also, that 4608kbps audio rate is awfully high.
Try using rockplayer and see if it works.
Was having a hard time w a video, wouldn't work in act1 nor the stock video player, worked great on rockplayer
Free on android market
Keep in mind Rockplayer is purely software player , it will not take advantage of phones Hardware acceleration , it will not play high resolution with good bitrate without dropping frames like crazy.
It would be better just to recode audio track.
I was just curious, because this was the same file that I had on my SD card that was in my BB Bold, which was able to play it???

[Q] working on rtsp from VLC for a week still stuck

I have been working on developing an a very simple app that plays a video rtsp stream from VLC And have been very stuck after a week I thought it might be time to call it quits but first thought I would post my problem:
I saw on the android dev site that it supports
RTSP (RTP, SDP)
HTTP progressive streaming
Video Encoding Recommendations
Video resolution 176 x 144 px
Video frame rate 12 fps
Video bitrate 56 Kbps
Audio codec AAC-LC
Audio channels 1 (mono)
Audio bitrate 24 Kbps
Click to expand...
Click to collapse
I set everything up in VLC
Stream link: (remove !'s if need for link)
ihop.!org.!edgesuite.!net/ihopkc/wls/tpr/IHOP-KC_TPR_WLS!.asx
Destonation:
RTSP -> Output: /ihop.mp4(also tried .dsp) port 5544 -> Active transcodeing checked -> video profile H.264+ACC(mp4) (and edited everything down to android's low Video Encoding Recommendations (like above))
TTL = 1
the rtsp stream works great when I open up anther VLC instance and stream the link rtsp://myip:5544/ihop.(mp4 or dsp)
but when I run it in my device (nook color w/ CM7.0.2) video viewer it says "sorry can not play this video"
sdk code:
Code:
VideoView videoView = (VideoView) findViewById(R.id.surface_view);
Uri video = Uri.parse("rtsp://192.168.1.88:5544/ihop.mp4");
videoView.setVideoURI(video);
videoView.start();
I am able to run audio stream from vlc to android and also ping my ip in terminal emulator so i know its not a connection error
Any ideas on what im doing wrong or on how to get this to work?
the only thing left that I haven't tried is Darwin streaming server on mac( tried it on windows 7) and would need to fix my hackintosh to do this.
Any Help is very appreciated
THANK YOU!!!

[Q] I want 5.1 passthough on android platform!

android is nature support 5.1 output. why mxplayer must downsampled to 2.0?
I hope it can passthough dts/ac3 output.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
site: https#//source#android#com/devices/audio/implement#html
Audio
In this document
Implementing the HAL
Multi-channel support
Media codecs
Configuring the shared library
Audio pre-processing effects
Source tuning
More information
This page explains how to implement the audio Hardware Abstraction Layer (HAL) and configure the shared library.
Implementing the HAL
The audio HAL is composed of three different interfaces that you must implement:
?hardware/libhardware/include/hardware/audio.h - represents the main functions of an audio device.
?hardware/libhardware/include/hardware/audio_policy.h - represents the audio policy manager, which handles things like audio routing and volume control policies.
?hardware/libhardware/include/hardware/audio_effect.h - represents effects that can be applied to audio such as downmixing, echo, or noise suppression.
For an example, refer to the implementation for the Galaxy Nexus at device/samsung/tuna/audio.
In addition to implementing the HAL, you need to create a device/<company_name>/<device_name>/audio/audio_policy.conf file that declares the audio devices present on your product. For an example, see the file for the Galaxy Nexus audio hardware in device/samsung/tuna/audio/audio_policy.conf. Also, see the system/core/include/system/audio.h and system/core/include/system/audio_policy.h header files for a reference of the properties that you can define.
Multi-channel support
If your hardware and driver supports multichannel audio via HDMI, you can output the audio stream directly to the audio hardware. This bypasses the AudioFlinger mixer so it doesn't get downmixed to two channels.
The audio HAL must expose whether an output stream profile supports multichannel audio capabilities. If the HAL exposes its capabilities, the default policy manager allows multichannel playback over HDMI.
For more implementation details, see the device/samsung/tuna/audio/audio_hw.c in the Android 4.1 release.
To specify that your product contains a multichannel audio output, edit the audio_policy.conf file to describe the multichannel output for your product. The following is an example from the Galaxy Nexus that shows a "dynamic" channel mask, which means the audio policy manager queries the actual channel masks supported by the HDMI sink after connection. You can also specify a static channel mask like AUDIO_CHANNEL_OUT_5POINT1.
audio_hw_modules {
primary {
outputs {
...
hdmi {
sampling_rates 44100|48000
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_DIRECT
}
...
}
...
}
...
}
AudioFlinger's mixer downmixes the content to stereo automatically when sent to an audio device that does not support multichannel audio.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[Feature Request]Surround sound output support

I am using MX Player on my Shield TV. One thing that totally broke the experience for me is that there is absolute no support for surround sound what so ever.
The only way to output any surround sound in MX Player is to use HW decoder. When it works, it is really great because it is the system handling all the surround sound. However, what I want to watch is encoded in hi10p so HW decoder gives me broken image.
I have tried everything but there is simply not an option to decode video through SW while decode audio through HW (Archos has it).
To make things worse, MX Player is not even able to output multichannel PCM properly while all of the other three players on Android TV has absolutely no problem with it.

Google Assistant - Talk back fix for Miui roms

I just thought i would share this, as it's been bugging me on Miui that the Google Assistant didn't always speak results like what is the weather forecast.
https://support.google.com/websearch/forum/AAAAgtjJeM4MwaLxKImwEc/?hl=en
change the value of mm.enable.qcom_parser in build.prop to 245389 (3183219 as mentioned in the article is for another device that supports different codecs) fixes the issue as mentioned in the google bug report for the Xiaomi a1.
I've attached a magisk module that is a modified Camera2 api enabler script. It enables Camera 2 api, adjusts noise cancelation to fluencepro, adds EIS entry for Google camera and turns off noise cancellation for voice recordings
Edit: modified Magisk package to the value @Stoffl_ calculated, 245389, for the mido. Thanks
Thanks, will try this as the TalkBack issue has bugged me for a while.
A better explaination of what is happening - based on that information we can probably work out the right number for the Redmi Note 4x to disable the ogg hardware codec until its updated - The above number may be correct, but we probably just need to get the original number, and just change the bit for Ogg to off for the moment.
http://en.miui.com/forum.php?mod=viewthread&tid=1465017&page=2#pid21050310
21#
01:04, Jan-10-2018 | From PC |
This post was edited by Theliel at 18:09, Jan-09-2018
Is not exactly in that way.
In first instance, the issue is only present in qualcom SoC (not Mediatek) Nougat, Oreo work fine.
In second place, qcom_parser number is a mask, representing all supported codecs directly in hardware (not software). Each SoC support different codecs.
For Mi4c:
Codecs: DivX DivXHD AVI AC3 ASF AAC QCP DTS 3G2 MP2TS
mm.enable.qcom_parser=3379827
3379827 = 1100111001001001110011
Each bit represent a codec, if you set a bit to 1, you enable hw support to that codec. A more simpe example, imagine only 3 codecs and in the exact order: mp3 ogg acc
111 enable all codecs = 7
001 enable only aac = 1
101 enable mp3 and aac, disable ogg = 5
You can't use the same value to each device, because each device support a different array of codecs. The real issue is only with qcom hw lib/codec ogg (container, real codec is opus), that is the audio returned by google. Devices without hw support of ogg or with ogg disabled, work fine in most Nougat.
In my investigations, ogg is placed in 15th position in most of all qcom devices.
So, for default Mi4c:
3379827 = 1100111001001001110011 | Work fine, hw is not used anyway, not supported
Default Mi6 Nougat:
1048575 = 11111111111111111111 | Dont Work
1032191 = 11111011111111111111 | Work perfecly
If you force all devices to 3183219 (for example), yes, you are disabling ogg bit, but you are disabling a lot of other codecs too, is not recommended, not a solution.
The real solution is a newer driver/codec to solve hw codec. Temporal fix is ONLY flip ogg bit to disable hw support and use only software, without touching the others bits. Each device, have a different hw arraw codec, so you shouldn't use the same value to all, is a big mistake
Click to expand...
Click to collapse
So..if I understand this correctly...
My Redmi Note 4X Global on Global stable Rom 9.0.5.0 build.prop has currently the following values
Code:
#codecs:(PARSER_)AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE
mm.enable.qcom_parser=261773
261773 decimal = 111111111010001101 in binary
According to the post above and the comments in my build prop bit 15 should be Ogg support.
111111111010001101 means Ogg is enabled
So the correct value to disable Ogg HW support would be 111111111010000101 = 261765
Correct ?
Hmmm .... this is very interesting - but also probably error prone. With SlimROM v1.17, I have this "mm.enable.qcom_parser=1048575" (i.e., 1111 1111 1111 1111 1111). It seems that everything is turned on! But it is not clear what one will be disabling if any alteration is made.
Turns out the bits should be read from right to left, whoops.
http://en.miui.com/forum.php?mod=redirect&goto=findpost&ptid=1465017&pid=21367895
And the starting zero bits aren't counted, which would explain why number of codecs and bits didn't match up in my example.
I'm now using 229005 and so far google assistant talkback is working.
*edit*
I had the dumb and counted wrong
111011111010001101 = 245389 is working, weather and time talkback functional!!
Only OGG hardware encoding should be disabled, everything else is should be on default rom setting.

Categories

Resources