I'm having the same issue as Easy Movie Texture plays in Unity editor but not on device. What am I missing? but the solutions mentioned don't seem to work. I'm running my application on an Android device but besides that it's the same problem. I'm using a video converted in VLC using H.264 and with a frame size of 1920x1080. The video I'm using works in the editor but isn't working on the device itself. The end goal is to create a VR 360 Video player using Unity.
Related
After an intense search on this site I found nothing which fits
my problem. I want to write a small video streaming client on
an Android 5.1 device. The following code is used:
QApplication a(argc, argv);
QWidget *widget=new QWidget;
widget->resize(320,200);
QMediaPlayer *player=new QMediaPlayer;
QVideoWidget *vw= new QVideoWidget;
QHBoxLayout *layout=new QHBoxLayout;
layout->addWidget(vw);
widget->setLayout(layout);
player->setVideoOutput(vw);
player->setMedia(QUrl("rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"));
player->play();
widget->show();
The problem is, the sound works but I only get a white screen.
the sound is playing but no video.
The VLC player on the android device is playing the video
correctly. I also used a small player in android studio and
it plays the video (but with high latency, so it is not useful for me)
I ran out of options what I can change to make it run.
Qt is not media friendly, if you want to play specific format/codec like MOV or h.264/h.265 ect... in a crossplatform way I advise you to use external lib like QtAV (http://www.qtav.org/) or VLC Qt wrapper (https://github.com/RSATom/QmlVlcDemo)
I believe the problem is that Android devices do not support the QuickTime Format (MOV) by default.
VLC Media Player on the other side, is well-known to be able to correctly play MOV videos.
Try testing videos with another format such as MP4or WebM to see how the program behaves.
I once developed a desktop software for streaming audio/video in Qt and I had the pleasure to work with the GStreamer framework.
Among many functionalities, it allows you to convert MOV videos to other formats.
You may check the GStreamer for Android tutorials and QtGstreamer, a set of well-implemented GSstreamer bindings for Qt.
I have developed a live raw H.264 stream receiver-cum-player. I implemented it using Android's MediaCodec API. Video is rendered to the Surface obtained from a TextureView.
The program can successfully receive and play video, however, I am observing serious color banding with the video playback in color gradient areas.
Some more observations:
The target Android device is a PC running on Android-x86-6.0.
The default video player which comes with Android-x86, "Video
player", also exhibits this issue when I play a video file with it (local playback).
Third party video players, like Kodi & VLC for Android, does not
exhibit this issue when I do local playback.
I have used the Miracast protocol to capture video playback on my app on my phone (which is different from the aforementioned target device)
to be displayed on a Miracast-enabled TV, and I do not see this
color banding issue.
I have also tried to add dithering to cover this issue, but somehow the code for it does not seem to work. The following code was added in the onCreate() callback function of the main activity.
...
decorView.getBackground().setDither(true);
getWindow().setFormat(PixelFormat.RGBA_8888);
...
The TextureView on which the video is rendered is also loaded using Fragment.
I am at a lost at what could be the problem. Does the issue arrise because I used the output Surface rendering method? Is it because I load the TextureView using Fragment? Or is there a problem with my decoder implementation? Or is it something else?
Someone, please help. Thank you in advance.
When i run my application on the tablet(android) and hit the pause button it pauses the screen of the video but the video will jump a head how ever many seconds the pause when i un-pause the video. So if i start the video and then click pause and walk away i can come back and un-pause the video and it well jump right to the end.
The code i am using is ns.togglePause(); This same code works on the desktop and works with .flv and .f4v but will not work when i am using a mp4 on the tablet.
Has anyone seen this before or know why it would do something like this?
i am using flashdevelop to debug the application.
I found out that my problem is caused by encoding. This helped me solve my problem.I found this on adobes forms.
Video encoding is very important.
For example, use baseline profile level 3.1 for H264 for mobile
(and not High profile level 4.1 recommended for desktop).
For more information, see the MAX session of Fabio Sonnati:
"Encoding for Performance on Multiple Devices"
And if you have an Android phone/tablet, there is my AIR application
to watch Adobe MAX 2011 videos :
https://market.android.com/details?id=air.fr.inway.maxVideos2011
Search "Sonnati" for this session's video.
(For info, i use a video player based on OSMF 1.6)
The pdf presentation is available on Sonmati's blog:
http://sonnati.wordpress.com/
I want to force the Evo 3D Mediaplayer to show any videos as 3D. The problem is that the HTC Evo 3D is said to be becoming 3D with FPA SEI flag on mp4 file. Is there any way to introduce that flag programmatically?
I want to find where it is overridden and turn it off by hand. I tried to figure out where it is read in the Android media player( http://www.netmite.com/android/mydroid/frameworks/base/media/java/android/media/MediaPlayer.java ); however, I couldn't found. My guess is the HTC is implemented another media player which looks for SEI FPA flag in mp4 header.
Is there anybody who can help me with this situation?
Your best bet is to upload your 3D SBS video to Youtube, and then ask Youtube to change it to 3D. When it's done, wait for 20 minutes and then view your video in 3D on Youtube from your Evo 3D. If it works, then just go ahead and download it from the Youtube website using an internet download manager. Now, if you put that video on your SD card, it should play directly in 3D mode.
I've coded up apps using VideoView and MediaPlayer and both had the same behavior. I'm currently using the code example here. The problem I'm having is that the video doesn't play back continuously. The slider in the MediaController is moving but the picture doesn't change. If I manually drag the slider the picture will change like it should.
I'm using an mp4 file loaded from the sdcard with a SDK 2.3.1 emulator device.
Any help is appreciated.
You usually cannot test video playback applications on the Android emulator, as it is too slow, except on very powerful host PCs. Please test video playback applications on an Android device.