ffprobe with mpegts/udp

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ffprobe with mpegts/udp

Andriy Gelman
Hello,

I have a question about using ffprobe with mpegts/udp.

Consider the following example:

*$ echo "test" > testfile.dat  #create test file*
*$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts output.ts*

Running ffprobe on output.ts outputs the stream format

*$ ffprobe output.ts  *







*Input #0, mpegts, from 'output.ts':  Duration: N/A, start: 1.400000,
bitrate: N/A  Program 1     Metadata:      service_name    : Service01
service_provider: FFmpeg    Stream #0:0[0x100]: Data: bin_data
([6][0][0][0] / 0x0006)*

However, when I use udp, i.e.
*$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts udp://127.0.0.1:6500
<http://127.0.0.1:6500>*

ffprobe just hangs and doesn't output any results:
*$ ffprobe -f mpegts udp://127.0.0.1:6500 <http://127.0.0.1:6500>*

Do I need to set some additional parameters, like probesize or analyze
duration here?

Your help is much appreciated!
Thank you,
Andriy

P.S. I am on the origin/master branch of ffmpeg












*ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developersbuilt
with gcc 8.2.1 (GCC) 20180831configuration: --prefix=/usr --disable-debug
--disable-static --disable-stripping --enable-fontconfig --enable-gmp
--enable-gnutls --enable-gpl --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype
--enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh
--enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec
--enable-nvenc --enable-omx --enable-shared --enable-version3libavutil
56. 22.100 / 56. 22.100libavcodec     58. 35.100 / 58. 35.100libavformat
58. 20.100 / 58. 20.100libavdevice    58.  5.100 / 58.
5.100libavfilter     7. 40.101 /  7. 40.101libswscale      5.  3.100 /  5.
3.100libswresample   3.  3.100 /  3.  3.100libpostproc    55.  3.100 / 55.
3.100*
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe with mpegts/udp

Andriy Gelman
I also have the issue when trying to recover the binary data from the
mpegts container via udp:

For example, this works fine

*$ echo "hello" > testfile.dat *
*$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts output.ts*
*$ ffmpeg -f mpegts -i output.ts -c copy -map 0 -f data out.dat    #
out.dat is the same as testfile.dat*

However, when using udp, ffmpeg hangs (maybe expecting more data?):

*$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts udp://127.0.0.1:6500
<http://127.0.0.1:6500>*

*$ ffmpeg -f mpegts -i udp://127.0.0.1:6500 <http://127.0.0.1:6500> -c copy
-map 0 -f data out.dat*

On Sat, 9 Feb 2019 at 10:16, Andriy Gelman <[hidden email]> wrote:

>
> Hello,
>
> I have a question about using ffprobe with mpegts/udp.
>
> Consider the following example:
>
> *$ echo "test" > testfile.dat  #create test file*
> *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts output.ts*
>
> Running ffprobe on output.ts outputs the stream format
>
> *$ ffprobe output.ts  *
>
>
>
>
>
>
>
> *Input #0, mpegts, from 'output.ts':  Duration: N/A, start: 1.400000,
> bitrate: N/A  Program 1     Metadata:      service_name    : Service01
> service_provider: FFmpeg    Stream #0:0[0x100]: Data: bin_data
> ([6][0][0][0] / 0x0006)*
>
> However, when I use udp, i.e.
> *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts udp://127.0.0.1:6500
> <http://127.0.0.1:6500>*
>
> ffprobe just hangs and doesn't output any results:
> *$ ffprobe -f mpegts udp://127.0.0.1:6500 <http://127.0.0.1:6500>*
>
> Do I need to set some additional parameters, like probesize or analyze
> duration here?
>
> Your help is much appreciated!
> Thank you,
> Andriy
>
> P.S. I am on the origin/master branch of ffmpeg
>
>
>
>
>
>
>
>
>
>
>
>
> *ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developersbuilt
> with gcc 8.2.1 (GCC) 20180831configuration: --prefix=/usr --disable-debug
> --disable-static --disable-stripping --enable-fontconfig --enable-gmp
> --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom
> --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype
> --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack
> --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
> --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
> --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh
> --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis
> --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec
> --enable-nvenc --enable-omx --enable-shared --enable-version3libavutil
> 56. 22.100 / 56. 22.100libavcodec     58. 35.100 / 58. 35.100libavformat
> 58. 20.100 / 58. 20.100libavdevice    58.  5.100 / 58.
> 5.100libavfilter     7. 40.101 /  7. 40.101libswscale      5.  3.100 /  5.
> 3.100libswresample   3.  3.100 /  3.  3.100libpostproc    55.  3.100 / 55.
> 3.100*
>
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe with mpegts/udp

kumowoon1025

> On Feb 9, 2019, at 10:52 AM, Andriy Gelman <[hidden email]> wrote:
>
> I also have the issue when trying to recover the binary data from the
> mpegts container via udp:
>
> For example, this works fine
>
> *$ echo "hello" > testfile.dat *
> *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts output.ts*
> *$ ffmpeg -f mpegts -i output.ts -c copy -map 0 -f data out.dat    #
> out.dat is the same as testfile.dat*
>
> However, when using udp, ffmpeg hangs (maybe expecting more data?):
>
> *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts udp://127.0.0.1:6500
> <http://127.0.0.1:6500>*
>
> *$ ffmpeg -f mpegts -i udp://127.0.0.1:6500 <http://127.0.0.1:6500> -c copy
> -map 0 -f data out.dat*

Surely there were some errors in the output that might give some indication as to what is happening? I don’t see how stream copying a text file into a TS would result in a working stream, I assume it has something to do with that.

> However, when using udp, ffmpeg hangs (maybe expecting more data?):

Are you running the commands in that order? If everything else was working, the first command would finish streaming very quickly, and the second command would get nothing. You would have to start listening on the port first.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe with mpegts/udp

Andriy Gelman
Thanks for your suggestion. Please see my response below.

> Surely there were some errors in the output that might give some
indication as to what is happening? I don’t see how stream > copying a text
file into a TS would result in a working stream, I assume it has something
to do with that.

I've always believed that MPEGTS supports binary attachments. Please
correct me if I'm wrong.
Also, there is no reason why saving/reading .ts file works, whereas udp
does not.

> Are you running the commands in that order? If everything else was
working, the first command would finish streaming very > quickly, and the
second command would get nothing. You would have to start listening on the
port first.

The commands are in two shells. The decoding part is started first.

Regards,
Andriy



On Sat, 9 Feb 2019 at 11:31, Ted Park <[hidden email]> wrote:

>
> > On Feb 9, 2019, at 10:52 AM, Andriy Gelman <[hidden email]>
> wrote:
> >
> > I also have the issue when trying to recover the binary data from the
> > mpegts container via udp:
> >
> > For example, this works fine
> >
> > *$ echo "hello" > testfile.dat *
> > *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts output.ts*
> > *$ ffmpeg -f mpegts -i output.ts -c copy -map 0 -f data out.dat    #
> > out.dat is the same as testfile.dat*
> >
> > However, when using udp, ffmpeg hangs (maybe expecting more data?):
> >
> > *$ ffmpeg -f bin -i testfile.dat -c copy -f mpegts udp://127.0.0.1:6500
> > <http://127.0.0.1:6500>*
> >
> > *$ ffmpeg -f mpegts -i udp://127.0.0.1:6500 <http://127.0.0.1:6500> -c
> copy
> > -map 0 -f data out.dat*
>
> Surely there were some errors in the output that might give some
> indication as to what is happening? I don’t see how stream copying a text
> file into a TS would result in a working stream, I assume it has something
> to do with that.
>
> > However, when using udp, ffmpeg hangs (maybe expecting more data?):
>
> Are you running the commands in that order? If everything else was
> working, the first command would finish streaming very quickly, and the
> second command would get nothing. You would have to start listening on the
> port first.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".