Android Question Showing a HTTP, h264 video stream

HARRY

Active Member
Licensed User
Longtime User
Hi,
My camera, connected to a Raspberry Zero, generates a video stream using the HTTP protocol and h264 encoding. I want to show that stream on my Android phone in a better way than Chrome or Firefox does. Searching this forum I get totally confused about the (im)possibilites. Can somebody inform me about a state of the art way to realize that?
Harry
 
I am trying with exoplayer, but I wonder what create I should use Creatwe SmoothStreamingSource, CreateUriSource or one of the others?
Using CreateSmoothStreamingSource the app is not installed:" The package seems to be damaged". The program is very simple:
Code:
#Region  Project Attributes
    #ApplicationLabel: Camera
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region


Sub Process_Globals
    Private player1 As SimpleExoPlayer
End Sub

Sub Globals
    Private SimpleExoPlayerView1 As SimpleExoPlayerView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then   
        player1.Initialize("player")       
        player1.Prepare(player1.CreateSmoothStreamingSource("http://192.168.2.4:9090/stream"))       
    End If
    Activity.LoadLayout("1")
    SimpleExoPlayerView1.Player = player1
    player1.Play
End Sub

Sub Player_Ready
    Log("Ready")
End Sub

Sub Player_Error (Message As String)
    Log("Error: " & Message)
End Sub

Sub Player_Complete
    Log("complete")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Harry
 
Upvote 0
Still struggling!

With CreateUriSource the app compiles and installs, but no video is shown, neither in debug mode nor in release mode, also no error message. When I touch the screen some indicators to start/stop, etc, appear and disappear.

I use:
B4A 8.50
android:targetSdkVersion="28" in the Manifest Editor and in the path definition of android.jar.

I tried also ExoPlayerExample downloaded from this forum, with the same result; so no success. Using ExoPlayerExample, I think that I have viewed the list, once, , I guess disabled, but this list doesn't show up at present.

Something is wrong, but what?

Once again the complete program:
Code:
#Region  Project Attributes
    #FullScreen: True
    #IncludeTitle: False
    #ApplicationLabel: Camera_View
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: landscape
    #CanInstallToExternalStorage: True
    #BridgeLogger:true
#End Region


Sub Process_Globals
    Private player1 As SimpleExoPlayer
End Sub

Sub Globals
    Private SimpleExoPlayerView1 As SimpleExoPlayerView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        Activity.LoadLayout("1")
        player1.Initialize("player")
        player1.Prepare(player1.CreateUriSource("http://192.168.2.4:9090/stream"))
       'using this address the stream shows in FireFox and Google
    End If  
    SimpleExoPlayerView1.Player = player1
    player1.Play
End Sub

Sub Player_Ready
    Log("Ready")
End Sub

Sub Player_Error (Message As String)
    Log("Error: " & Message)
End Sub

Sub Player_Complete
    Log("complete")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Please some suggestions


Harry
 
Upvote 0
Erel,

No messages.

Where are the logs, you are referring to, located?

What are unfiltered logs and where do I find those?

Harry
 
Upvote 0
UnCheck the checkbox (Filter) in the bottom of the logwindow to see the unfiltered log
 
Upvote 0
Back
Top