1

I created the .sdp file locally using ffmpeg, Try to play through vlc on Android. I tried to play through vlc, but the video does not come out. Below is my sdp file

v = 0

o = - 0 0 IN IP4 127.0.0.1

s = H.264 Video, streamed by the LIVE555 Media Server

c = IN IP4 127.0.0.1

t = 0 0

a = tool: libavformat 57.71.100

video 10000 RTP / AVP 96

b = AS: 900

a = rtpmap: 96 H264 / 90000

a = fmtp: 96 packetization-mode = 1;

sprop-parameter-sets = Z00AH42kBQF / ywBA,

aO48gA ==; profile-level-id = 4D001F

vel-id = 4D001F

The code played through vlc is shown below.

try {
            if (media.length() > 0) {
                Toast toast = Toast.makeText(this, media,Toast.LENGTH_LONG);
                toast.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0,
                        0);
                toast.show();
            }
            // Create LibVLC
            // TODO: make this more robust, and sync with audio demo
            ArrayList<String> options = new ArrayList<String>();
            //options.add("--subsdec-encoding <encoding>");
            options.add("--aout=opensles");
            options.add("--audio-time-stretch"); // time stretching
            options.add("-vvv"); // verbosity
            //options.add("vlc -vvv @ : 5004");
            libvlc = new LibVLC(this, options);
            holder.setKeepScreenOn(true);

            // Creating media player
            mMediaPlayer = new MediaPlayer(libvlc);
            mMediaPlayer.setEventListener(mPlayerListener);

            // Seting up video output
            final IVLCVout vout = mMediaPlayer.getVLCVout();
            vout.setVideoView(mSurface);
            //vout.setSubtitlesView(mSurfaceSubtitles);
            vout.addCallback(this);
            vout.attachViews();
            Log.e(TAG, "URI ::  "+Uri.parse(media));
            Media m = new Media(libvlc, Uri.parse(media));
            mMediaPlayer.setMedia(m);
            mMediaPlayer.play();
        } catch (Exception e) {
            Toast.makeText(this, "Error in creating player!", Toast
                    .LENGTH_LONG).show();
        }

What is the problem?

NGMong
  • 21
  • 3
  • The current sdp file is in Android local storage. I passed the path of /storage/emulated/0/aber.sdp to the player as playback information. – NGMong Feb 27 '18 at 07:12

0 Answers0