开发者

Stream H264 To Android Using FFMPEG

开发者 https://www.devze.com 2023-03-03 21:12 出处:网络
I\'m trying to stream a .ts file containing H.264 and AAC as an RTP stream to an Android device. I tried:

I'm trying to stream a .ts file containing H.264 and AAC as an RTP stream to an Android device.

I tried:

.\ffmpeg -fflags +genpts -re -i 1.ts -vcodec copy -an -f rtp rtp://127.0.0.1:10 000 -vn -acodec copy -f rtp rtp://127.0.0.1:20000 -newaudio

FFMPEG displays what should be in your SDP file and I copied this into an SDP file and tried playing from VLC and FFPLAY. VLC plays audio but just gives errors re: bad NAL unit types for video. FFPLAY doesn't play anything.

My best guess if that the FFMPEG H.264 RTP im开发者_运维问答plementation is broken or at least it doesn't work in video passthru mode (i.e. using the -vcodec copy).

I need a fix for FFMPEG or an alternate simple open-source solution. I don't want to install FFMPEG in my Android client.

thanks.


Have you tried vlc?I once used vlc for streaming. You can have a look at here.

0

精彩评论

暂无评论...
验证码 换一张
取 消