-
Notifications
You must be signed in to change notification settings - Fork 47
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
[video_player_tizen] Videos are playing with software codec #757
Comments
Hi, thank you for your interest. video_player_tizen is implemented using player.h provided by TizenSDK. (This may vary depending on the device's model, specifications, and Tizen version.) If you have a Tizen 8.0 development environment set up, you can test the test code below. |
Hi @JSUYA , thanks for your quick reply. Did you mean that you have ran the code I provided and confirmed that the Tizen OS decoded the video(https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8) with a SW codec? If that is the case, could you help me to get an video example(url) which can be played with a HW codec? Thanks. |
@huluwa-dev Hello, do you play video on TV device? |
yes I played https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
Unfortunately I don't know much about content that forces the use of HW codec. |
Hi @xiaowei-guan Yes, I played the video on a Samsung TV with Tizen 6.0. Tomorrow I will post the TV's model information. |
Thanks for the confirmation. As you are one of the contributors, do you know anybody who can help to make this plugin work with HW codec. SW codec is inefficient and produces poor user experience. I believe it could improve the performance a lot by utilizing a HW codec. Thank you for your time. |
I downloaded the video with yt-dlp
and checked the video's information with FFmpeg.
It is an H.264 video, it should be played with HW codec on most devices. But unfortunately, video_player_tizen plays it with SW codec. It would be great if the tizen team could solve this problem. |
If you want to have a better performance, we suggest you use video_player_videohole. |
@huluwa-dev The video_player_videohole and video_player_avplay only support TV device. |
Hi, thanks for the suggestion, I tried video_player_videohole, but some error occured, I think that's because the video I tried is not with DRM, I will post the detail of the errors tomorrow. |
Hi @xiaowei-guan is video_player_videohole suitable for playing a content without DRM? |
I can play the URL with video_player_videohole and video_player. video_player_videohole plugin has a goode performance, because video_player_videohole render the video on video plane layer, not on graphic layer. if your app just for Tizen TV device, we suggest you use video_player_videohole plugin |
@EricLinPixelforce Hi, if your app just run on Tizen TV device, we suggest you use video_player_videohole plugin, video_player_videohole also supports play DRM content, you need to be a partner of samsung. |
@huluwa-dev As I said before...Tizen 8.0 provides an API that can set the decoder. So if you are in an environment with Tizen 8.0, this operation maybe guaranteed, but in other environments (6.0, 6.5, 7.0), the operation may not be guaranteed. Also, when using the HW decoder, there was a abnormal behavior(?) in which certain contents on my device were initially displayed in a small screen size and then restored. As far as I know, TV devices basically use HW decoder if HW decoder is available. |
Hi, thanks for the great news. I already regisered a Samsung seller account and will distribute a TV app to the Tizen store within a month. |
Hi, I tried to play the URL with video_player_videohole, but the player keeps producing an error
My code:
I would appreciate it if you could give me any suggestions. Thanks. |
@xiaowei-guan I also tried to play it with video_player_avplayer. I got this error:
My code:
|
@JSUYA @xiaowei-guan The TV is a Samsung TV, model code: UA75BU8000WXXY (the model name should be 75" BU8000), with Tizen 6.5 running on it. |
Thanks for the solution, I tried it on the TV, but still, it utilized HW codec to decode the video, because it was lagging. |
Hello, @EricLinPixelforce I can play the URL(https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8) by videohole sample code. class _HlsRomoteVideo extends StatefulWidget {
@override
State<_HlsRomoteVideo> createState() => _HlsRomoteVideoState();
}
class _HlsRomoteVideoState extends State<_HlsRomoteVideo> {
late VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network(
'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
_controller.addListener(() {
if (_controller.value.hasError) {
print(_controller.value.errorDescription);
}
setState(() {});
});
_controller.setLooping(true);
_controller.initialize().then((_) => setState(() {}));
_controller.play();
} plugin logs
|
If you want to use avplay plugin, you need to be a partner of samsung. |
@xiaowei-guan Thanks for the reply. Now I can play it with your code sample in a created new project. But still got error in my existing project. That's weird. I will check the difference and find the reason. |
@xiaowei-guan
But if I play it without waiting for the initilization, it works well.
|
Hi @xiaowei-guan Currently I am playing videos with video_player_videohole, I tried to detect if the video playing is finished with the following code
Finally I got this log and never detected it.
_videoPlayerController.value.position never reached the end. Could you help me to resolve it? Thanks. |
Hello, @EricLinPixelforce , I have checked the position value, the value of position really cannot reach the end. |
Yes, that's exactly what I want! I would be grateful if you could expose the event. |
Ok, I will add it. |
@EricLinPixelforce Please verify this new PR #766 |
Looks good, thanks. Have you tested it? |
Yes, I have tested it at my side. you can verify this PR at your side. |
Hi @xiaowei-guan thank you for the solution, it works as expected, but an error message printed in the console.
|
I have checked the code, plugin need to stop position timer and keep position value = duration.end when receiving completed event, so plugin need call pause() and seekTo() to ensure the platfomr stops playing and seeks to the last frame of the video. |
Hi @xiaowei-guan thanks for the explanation.
In my code, it listens the right arrow and left arrow buttons, the video will fast forward or backward when I click the buttons. But if I click a same button, say the right arrow button, multiple times in a short time, the current position of the video will back and forth, which make the progress bar looks weird.
|
Hi @xiaowei-guan @JSUYA could you help on this issue? Thanks |
@EricLinPixelforce Below comment is native player seekTo guide:
Because SeekTo is asynchronously method, we need make sure previous seekTo operation is completed, then we can call next seekTo. If you call seekTo multiple times in a short time, it may only be processed once. |
@xiaowei-guan Hi, thanks for the reply. I understand the logic. However, if I call seekTo multiple times, currently it will wait for the completion of the first call, the other calls will be ignored. I believe it is ideal to take the last call as the valid one and cancel the previous calls. |
@xiaowei-guan Hi, is it possible to fix this issue as well? Thanks. |
I tried to play an HLS video with video_player_tizen, but when the video quality automatically updated to 1080P, the playback started stuttering significantly. I assume the video was played using a software codec, as other video-playing apps work well (like YouTube), even with 4K videos.
Could you help me confirm whether this plugin uses a software decoder for video playback? Thanks.
This is the code snippet:
The text was updated successfully, but these errors were encountered: