ffmpeg copying rtmp stream, but without audio - ffmpeg

I am sending stream to flash media server from Adobe Flash Media Live Encoder and I am trying to copy this stream to another FMS using FFmpeg
ffmpeg -analyzeduration 0 -i "rtmp://x.x.x.x/live/stream1 live=1" \
-vcodec copy -acodec copy -f flv rtmp://y.y.y.y/live/stream1
but there is no audio. Can anyone help me?

try like this :
ffmpeg -i "rtmp://x.x.x.x/live/stream1 live=1" \
-vcodec copy -acodec copy -f flv rtmp://y.y.y.y/live/stream1

Related

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?
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
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)

ffmpeg play RTSP stream while recording

I successfully record to a file a RTSP stream using ffmpeg with the following command:
ffmpeg -i "rtsp://1.1.1.1:554/user=admin&password=admin&channel=1&stream=1" -acodec copy -vcodec copy -movflags frag_keyframe+empty_moov -y http://www.example.com/rec/1.mp4
now I need to play video while ffmpeg is still writing to file. Even changing file format, is it possible?
Pipe a 2nd output to ffplay
ffmpeg -i "rtsp://1.1.1.1:554/user=admin&password=admin&channel=1&stream=1" -acodec copy -vcodec copy -movflags frag_keyframe+empty_moov -y http://www.example.com/rec/1.mp4 -c copy -f nut - | ffplay

Extracting a eia_608 stream from a mpeg2 transport stream with FFMPEG

I'm trying to convert a MPEG2 Transport Stream to a MP4 stream. The video and audio are fine, but I can't seem to figure out how to tell ffmpeg to extract the eia_608 stream from the video and place it in a stream for the mp4 or mov. I've tried a straight copy as shown below.
ffmpeg -f mpegts -i tsfile3.ts -codec:v copy -fflags genpts -bsf:a aac_adtstoasc -codec:a copy -codec:s copy -f mov tsfile3a.mp4
Has anyone done this? If so, could you help with the syntax? Thanks.
Finally figured this out. Just be aware it appears to only work with mpegvideo and not h264. The syntax is as follows:
ffmpeg -i Closedcaption_rollup.ts -f lavfi -i "movie=Closedcaption_rollup.ts[out+subcc]" -map 0:0 -map 0:1 -map 1:1 -c:s mov_text test_out.mp4
This is using the ffmpeg fate test clip.
The caveats are:
Appears to only work with mpegvideo. I can't get it to work with h264
Doesn't output eia_608 type in the file, it converts it to mov_text.

ffmpeg rtmp and local file output

I have a trouble with ffmpeg
I receive a rtsp stream from a grabbing device (camera) and I stream-out it to rtmp (Youtube Live)
I want to have a copy of the stream in my computer so I write at the same time in a local file
I use this command :
ffmpeg -y -i 'RTSP_SOURCE' -c:v copy -c:a libvo_aacenc -map 0:v -bsf:v dump_extra -fflags +genpts -flags +global_header -movflags +faststart
-map_metadata 0 -metadata title= -f tee -filter_complex aevalsrc=0 '[f=mp4]/tmp/backup.mp4|[f=mpegts]/tmp/backup.ts|[f=flv]rtmp://a.rtmp.youtube.com/live2/STREAM_ID'
The problem is when I have some disconnections, ffmpeg exits and stop to recording
Is there any flag or option for telling to ffmpeg to continue recording in local files even there is not internet ?
Thank you very much for your help =)
You can try:
ffmpeg -f tee "[onfail=ignore] ...
More description is available here.

FFmpeg PNG+MP3 = FLV

I need to create a FLV video from a MP3 file and a PNG image, and I tried the following ffmpeg command:
/usr/bin/ffmpeg -y -i file.png -i file.mp3 -acodec libmp3lame -vcodec flv -y -ac 1 -ab 32000 -ar 22050 file.flv
I obtained a FLV video file with the correct audio and the image, but it is not seekable in VLC, so I'm looking where I'm wrong.
Could you help me, please?
Thank you very much!

Resources