quarks
quarks

Reputation: 35282

Command to stream MPEG-1 video

I'm trying to stream MPEG-1 video over FFMPEG with

ffmpeg -i "out.ts" -f flv -listen 1 -i rtmp://localhost:8889/live/app -c copy -f flv -listen 1 rtmp://localhost:1935/live/app

The out.ts file is a MPEG-1 video encoded with

ffmpeg -i out.avi -f mpegts -codec:v mpeg1video -b:v 1500k -r 30 -bf 0 -codec:a mp2 -b 0 -q 5 -t 1 out.ts

When I try to open the stream with VLC: rtmp://localhost:1935/live/app media is not playing. What's the command to stream MPEG-1 video over FFMPEG?

Upvotes: 0

Views: 3895

Answers (2)

quarks
quarks

Reputation: 35282

To stream MPEG-1 video using ffmpeg:

ffmpeg -re -y -i out.ts -an -f rtp_mpegts rtp://127.0.0.1:1234

Credit to: https://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028879.html

(Although the source video is 720p, the stream in VLC looks like 360p and no audio is streamed, any idea would be appreciated)

Upvotes: 0

szatmary
szatmary

Reputation: 31110

RTMP does not have support for mpeg1 video or mpeg2 audio. You can see the complete list if supported code in the fly specification under the VIDEODATA header.

https://www.adobe.com/content/dam/acom/en/devnet/flv/video_file_format_spec_v10.pdf

Upvotes: 2

Related Questions