[FFmpeg-user] Send unix socket data without encoding

Deepak Chauhan deepakthakur0409 at gmail.com
Tue Jul 9 10:17:08 EEST 2024


Hi Ferdi,

Apologies for the incomplete question!

Here are the commands and their output

*ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -c:v libvpx -b:v
1000k -deadline realtime -cpu-used 4 -f tee
"[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://127.0.0.1:2064?rtcpport=2025&pkt_size=1200
<http://127.0.0.1:2064/?rtcpport=2025&pkt_size=1200>"*

ffmpeg version 6.1.1-tessus  https://evermeet.cx/ffmpeg/  Copyright (c)
2000-2023 the FFmpeg developers

  built with Apple clang version 11.0.0 (clang-1100.0.33.17)

  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopus --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2
--enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi
--enable-version3 --pkg-config-flags=--static --disable-ffplay

  libavutil      58. 29.100 / 58. 29.100

  libavcodec     60. 31.102 / 60. 31.102

  libavformat    60. 16.100 / 60. 16.100

  libavdevice    60.  3.100 / 60.  3.100

  libavfilter     9. 12.100 /  9. 12.100

  libswscale      7.  5.100 /  7.  5.100

  libswresample   4. 12.100 /  4. 12.100

  libpostproc    57.  3.100 / 57.  3.100

Input #0, h264, from 'unix:/tmp/media':

  Duration: N/A, bitrate: N/A

  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1080x2408, 25 fps, 1200k tbr, 1200k tbn

Stream mapping:

  Stream #0:0 -> #0:0 (h264 (native) -> vp8 (libvpx))

Press [q] to stop, [?] for help

[libvpx @ 0x7f856410cb80] v1.11.0-30-g888bafc78

Output #0, tee, to '[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://
127.0.0.1:2064?rtcpport=2025&pkt_size=1200':

  Metadata:

    encoder         : Lavf60.16.100

  Stream #0:0: Video: vp8, yuv420p(tv, bt709, progressive), 1080x2408,
q=2-31, 1000 kb/s, 25 fps, 25 tbn

    Metadata:

      encoder         : Lavc60.31.102 libvpx

    Side data:

      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A




*ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -c:v copy -b:v
1000k -deadline realtime -cpu-used 4 -f tee
"[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://127.0.0.1:2066?rtcpport=2020&pkt_size=1200
<http://127.0.0.1:2066/?rtcpport=2020&pkt_size=1200>"*



ffmpeg version 6.1.1-tessus  https://evermeet.cx/ffmpeg/  Copyright (c)
2000-2023 the FFmpeg developers

  built with Apple clang version 11.0.0 (clang-1100.0.33.17)

  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
--enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
--enable-libfreetype --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopus --enable-librubberband --enable-libshine
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2
--enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi
--enable-version3 --pkg-config-flags=--static --disable-ffplay

  libavutil      58. 29.100 / 58. 29.100

  libavcodec     60. 31.102 / 60. 31.102

  libavformat    60. 16.100 / 60. 16.100

  libavdevice    60.  3.100 / 60.  3.100

  libavfilter     9. 12.100 /  9. 12.100

  libswscale      7.  5.100 /  7.  5.100

  libswresample   4. 12.100 /  4. 12.100

  libpostproc    57.  3.100 / 57.  3.100

Input #0, h264, from 'unix:/tmp/media':

  Duration: N/A, bitrate: N/A

  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1080x2408, 25 fps, 1200k tbr, 1200k tbn

[out#0/tee @ 0x7fd030f05940] Codec AVOption b (set bitrate (in bits/s)) has
not been used for any stream. The most likely reason is either wrong type
(e.g. a video option with no video streams) or that it is a private option
of some encoder which was not actually used for any stream.

Output #0, tee, to '[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://
127.0.0.1:2066?rtcpport=2020&pkt_size=1200':

  Metadata:

    encoder         : Lavf60.16.100

  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1080x2408, q=2-31, 1000 kb/s, 25 fps, 1200k tbr, 1200k tbn

Stream mapping:

  Stream #0:0 -> #0:0 (copy)

Press [q] to stop, [?] for help



Hope you get your crystal back soon! :P


Thanks,

Deepak

On Tue, Jul 9, 2024 at 12:34 PM Ferdi Scholten <ferdi at sttc-nlp.nl> wrote:

> Hi Team,
> > I am trying to send h264 video data to mediasoup using ffmpeg. When I run
> > this command
> >
> > ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -c:v libvpx
> -b:v
> > 1000k -deadline realtime -cpu-used 4 -f tee
> > "[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://
> > 127.0.0.1:2064?rtcpport=2025&pkt_size=1200"
> >
> >
> > It converts the h264 data to VP8 and the whole setup works fine when I
> > configure mediasoup to accept VP8 data. But I want to avoid this
> conversion
> > and keep the data in h264 format. So when I run this command
> >
> >
> > ffmpeg -re -i unix:/tmp/media -map 0:v:0 -pix_fmt yuv420p -c:v copy -b:v
> > 1000k -deadline realtime -cpu-used 4 -f tee
> > "[select=v:f=rtp:ssrc=22222222:payload_type=102]rtp://
> > 127.0.0.1:2066?rtcpport=2020&pkt_size=1200"
> >
> >
> > It doesn't work.
> >
> >
> > Can someone please let me know what I am doing wrong?
> >
> >
> >
> > Thanks,
> > Deepak
> >
> I'm sorry, my magic crystal ball broke a long time ago so I cannot see
> the output of your ffmpeg command......
>
> Most likely there is some problem with using c:v copy and then also
> specifying parameters for encoding the video that are as far as I know
> not part of the h264 parameter set.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list