ffmpeg stream input.ts from ubuntu server on udp multicast

Any other question that don't fit into the other support categorizes.
Post Reply
pistache
Posts: 1
Joined: Mon Mar 04, 2019 1:08 pm

ffmpeg stream input.ts from ubuntu server on udp multicast

Post by pistache » Tue Mar 05, 2019 4:37 pm

hi
i tried to stream a file with ffmpeg ( file.ts 30 mbits this file is encoded in h264 ) , i don't want to transcode it and i want it to be stream in loop
i used this command

Code: Select all

ffmpeg -stream_loop -1 -i file.ts -c copy -f mpegts 'udp://239.0.0.15:1234?pkt_size=188'
in the distant machine,
i open a vlc and try to read it : udp://@239.0.0.15:1234

something appears but the quality is very bad ( lot of freezing and latency)
below info about the command ( input and output )

Code: Select all

Input #0, mpegts, from 'file.ts':
  Duration: 00:01:14.04, start: 1.480000, bitrate: 3393 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, [b]50 tbc[/b]
    Stream #0:1[0x101](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (mp2 (native) -> mp2 (native))
Press [q] to stop, [?] for help

Output #0, mpegts, to 'udp://239.0.0.15:1234?pkt_size=188':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, [b]90k tbc[/b]
    Stream #0:1(eng): Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s
    Metadata:
      encoder         : Lavc58.35.100 mp2
does anyone can help me or give me a command to improve quality output ? why tbn change from input and output without transcoding?

thanks

Aman
Posts: 3
Joined: Sun Aug 11, 2019 11:08 pm

Re: ffmpeg stream input.ts from ubuntu server on udp multicast

Post by Aman » Sun Aug 11, 2019 11:44 pm

It might be your network.
I would attempt to play it first locally on your laptop on your local ip address and see how that plays for you.

Post Reply
'