Discussion:
[FFmpeg-user] ffmpeg read from UDP/Port
Alex Lin
2014-09-17 23:26:22 UTC
Permalink
Hi all,

I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z

I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.

I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really matter
at this point.

Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
machine:

ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4

Then the following shows

ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100

The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this

udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.

am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg, so
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.

Thanks in advance.
AL
Maziar Mehrabi
2014-09-18 05:23:33 UTC
Permalink
Hi,

I'm a bit confused here, first you said RTP and then you're using UDP in
your commands. Can you explain it to me?
Try playing directly from the stream with ffplay and see what will happen.
ffplay udp://192.168.1.200:50002/stream_name
I can capture and save from udp but the result is very noisy and faulty.
Http seems to be better though.
I also didn't use the -f mp4 options in my command. I think you also didn't
mention the stream name in input for ffmpeg.

BR,
Maziar


--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really matter
at this point.
Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg, so
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.
Thanks in advance.
AL
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Alex Lin
2014-09-22 23:33:14 UTC
Permalink
Hi Maziar,
Post by Maziar Mehrabi
Post by Maziar Mehrabi
I'm a bit confused here, first you said RTP and then you're using UDP in
your commands. Can you explain it to me?
The packets I am getting is H264 over RTP. Since RTP is a subset of UDP, so
I thought it would be okay to just let ffmpeg read the UDP packets.
Post by Maziar Mehrabi
Post by Maziar Mehrabi
Try playing directly from the stream with ffplay and see what will
happen. ffplay udp://192.168.1.200:50002/stream_name
I tried it and no luck either. When I try that, I get a lot of errors such
as:

[aac @ 0000000002ad5120] get_buffer() failed
[aac @ 0000000002ad5120] Inconsistent channel configuration.
[aac @ 0000000002ad5120] get_buffer() failed
[aac @ 0000000002ad5120] Inconsistent channel configuration.
[aac @ 0000000002ad5120] get_buffer() failed
[aac @ 0000000002ad5120] Inconsistent channel configuration.
[aac @ 0000000002ad5120] get_buffer() failed
[aac @ 0000000002ad5120] channel element 3.8 is not allocated
[aac @ 0000000002ad5120] Number of bands (31) exceeds limit (13).
[aac @ 0000000002ad5120] channel element 1.15 is not allocated
[aac @ 0000000002ad5120] Reserved bit set.
[aac @ 0000000002ad5120] channel element 3.9 is not allocated
[aac @ 0000000002ad5120] Reserved bit set.
Last message repeated 1 times
[aac @ 0000000002ad5120] SBR was found before the first channel element.
[aac @ 0000000002ad5120] Sample rate index in program config element does
not ma
tch the sample rate index configured by the container.
[aac @ 0000000002ad5120] decode_pce: Input buffer exhausted before END
element f
ound
[aac @ 0000000002ad5120] Reserved bit set.
[aac @ 0000000002ad5120] channel element 2.15 is not allocated
[aac @ 0000000002ad5120] Reserved bit set.
Last message repeated 1 times
[aac @ 0000000002ad5120] channel element 2.13 is not allocated
[aac @ 0000000002ad5120] Sample rate index in program config element does
not ma
tch the sample rate index configured by the container.
[aac @ 0000000002ad5120] Inconsistent channel configuration.
[aac @ 0000000002ad5120] get_buffer() failed
[aac @ 0000000002ad5120] channel element 3.1 is not allocated
[aac @ 0000000002ad5120] Dependent coupling is not supported together with
LTP
Last message repeated 40 times
[aac @ 0000000002ad5120] Reserved bit set.
[aac @ 0000000002ad5120] Assuming an incorrectly encoded 7.1 channel layout
inst
ead of a spec-compliant 7.1(wide) layout, use -strict 1 to decode according
to t
he specification instead.
[aac @ 0000000002ad5120] channel element 1.11 is not allocated
[aac @ 0000000002ad5120] channel element 2.10 is not allocated
[aac @ 0000000002ad5120] channel element 3.11 is not allocated
[aac @ 0000000002ad5120] channel element 2.15 is not allocated
[aac @ 0000000002ad5120] channel element 1.3 is not allocated
[aac @ 0000000002ad5120] invalid band type
[aac @ 0000000002ad5120] SSR is not implemented. Update your FFmpeg version
to t
he newest one from Git. If the problem still occurs, it means that your
file has
a feature which has not been implemented.
[aac @ 0000000002ad5120] If you want to help, upload a sample of this file
to ft
p://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list.
(ffmp
eg-***@ffmpeg.org)
[aac @ 0000000002ad5120] channel element 2.3 is not allocated
[aac @ 0000000002ad5120] Number of scalefactor bands in group (14) exceeds
limit
(12).

I am starting to think the packets which I am trying to record is not
supported by ffmpeg. Would like to get your opinion on that.

Thank you,
AL
Post by Maziar Mehrabi
Hi,
I'm a bit confused here, first you said RTP and then you're using UDP in
your commands. Can you explain it to me?
Try playing directly from the stream with ffplay and see what will happen.
ffplay udp://192.168.1.200:50002/stream_name
I can capture and save from udp but the result is very noisy and faulty.
Http seems to be better though.
I also didn't use the -f mp4 options in my command. I think you also didn't
mention the stream name in input for ffmpeg.
BR,
Maziar
--
Hälsningar,
Maziar Mehrabi
Post by Maziar Mehrabi
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of
90,000,
Post by Maziar Mehrabi
and I need to record these packets. The file format doesn't really matter
at this point.
Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
Post by Maziar Mehrabi
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the
command
Post by Maziar Mehrabi
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I
waited
Post by Maziar Mehrabi
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg,
so
Post by Maziar Mehrabi
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.
Thanks in advance.
AL
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Bill Davidsen
2014-09-19 19:19:26 UTC
Permalink
Post by Alex Lin
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really matter
at this point.
Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and save in a .TS
file without -f at all.
If that works you can capture the information and then play with it from the
file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if you can
capture the data you
eliminate some possible problems by not reformatting the data at capture.
Post by Alex Lin
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg, so
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.
--
bill davidsen <***@tmr.com>
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may be
less than zero for suffiently large values of zero.
Alex Lin
2014-09-22 23:38:04 UTC
Permalink
Hi Bill,
Post by Bill Davidsen
Post by Bill Davidsen
I might be tempted to set both video and audio codec to copy, and save
in a .TS file without -f at all.
I did a look search on google about .ts files. My understanding is that, I
can use videosnarf to convert a packet trace to .TS file. Is that the way
you have in mind as well?

Thank you,
AL
Post by Bill Davidsen
Post by Bill Davidsen
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I haven't
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really matter
at this point.
Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and save in
a .TS file without -f at all.
If that works you can capture the information and then play with it from
the file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if you can
capture the data you
eliminate some possible problems by not reformatting the data at capture.
Post by Bill Davidsen
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg, so
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264 packets.
--
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may be
less than zero for suffiently large values of zero.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Maziar Mehrabi
2014-09-23 05:05:01 UTC
Permalink
Hi,

Try testing it over http first, rather than UDP or RTP. What I understand
is that the errors somehow are related to audio channel, and RTP divides
the media into two streams (one audio and one video) and sends them through
separate ports, so I guess you should have some sort of mechanism on the
other end to capture and mix these two streams.
One other way to test this idea is to use the -an option while you are
streaming media, this option means "No Audio" and will just stream the
video channel.

if you please, keep me updated about your results.

BR,
Maziar


--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Bill,
Post by Bill Davidsen
Post by Bill Davidsen
I might be tempted to set both video and audio codec to copy, and save
in a .TS file without -f at all.
I did a look search on google about .ts files. My understanding is that, I
can use videosnarf to convert a packet trace to .TS file. Is that the way
you have in mind as well?
Thank you,
AL
Post by Bill Davidsen
Post by Bill Davidsen
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I
haven't
Post by Bill Davidsen
Post by Bill Davidsen
quite figure out if ffmpeg is the right solution to my problem yet, so I
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really
matter
Post by Bill Davidsen
Post by Bill Davidsen
at this point.
Currently, I have a server sending the H264 packets to port 50002 of my
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and save in
a .TS file without -f at all.
If that works you can capture the information and then play with it from
the file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if you
can
Post by Bill Davidsen
capture the data you
eliminate some possible problems by not reformatting the data at capture.
Post by Bill Davidsen
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving not
supported?
I have looked around and did not see any debug log generated by ffmpeg,
so
Post by Bill Davidsen
Post by Bill Davidsen
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264
packets.
Post by Bill Davidsen
--
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may be
less than zero for suffiently large values of zero.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Alex Lin
2014-09-23 17:19:24 UTC
Permalink
Hi Maziar,

I finally figured it out. Instead of using udp stream as input, I generated
a SDP file and use it as the input.
Prior to receiving the audio packets, I receive a SIP packet with SDP
payload. The SDP payload describes the IP/port of the video packet as well
as the format. I just created a SDP file with the content of the payload,
and FFmpeg was able to use it to receive and save the packets into a mpeg
file. (or play it)

Thank you for your help!
AL
Post by Maziar Mehrabi
Hi,
Try testing it over http first, rather than UDP or RTP. What I understand
is that the errors somehow are related to audio channel, and RTP divides
the media into two streams (one audio and one video) and sends them through
separate ports, so I guess you should have some sort of mechanism on the
other end to capture and mix these two streams.
One other way to test this idea is to use the -an option while you are
streaming media, this option means "No Audio" and will just stream the
video channel.
if you please, keep me updated about your results.
BR,
Maziar
--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Bill,
Post by Bill Davidsen
Post by Bill Davidsen
I might be tempted to set both video and audio codec to copy, and save
in a .TS file without -f at all.
I did a look search on google about .ts files. My understanding is that,
I
Post by Alex Lin
can use videosnarf to convert a packet trace to .TS file. Is that the way
you have in mind as well?
Thank you,
AL
Post by Bill Davidsen
Post by Bill Davidsen
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I
haven't
Post by Bill Davidsen
Post by Bill Davidsen
quite figure out if ffmpeg is the right solution to my problem yet,
so I
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really
matter
Post by Bill Davidsen
Post by Bill Davidsen
at this point.
Currently, I have a server sending the H264 packets to port 50002 of
my
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and save
in
Post by Alex Lin
Post by Bill Davidsen
a .TS file without -f at all.
If that works you can capture the information and then play with it
from
Post by Alex Lin
Post by Bill Davidsen
the file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if you
can
Post by Bill Davidsen
capture the data you
eliminate some possible problems by not reformatting the data at
capture.
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving
not
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
supported?
I have looked around and did not see any debug log generated by
ffmpeg,
Post by Alex Lin
so
Post by Bill Davidsen
Post by Bill Davidsen
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264
packets.
Post by Bill Davidsen
--
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may be
less than zero for suffiently large values of zero.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Maziar Mehrabi
2014-09-23 18:16:26 UTC
Permalink
Hi,

No problem, it was yourself who figured it out after all.
I have a question still though. How do you transmit the SDP file to the
client? I mean apparently for every stream you should have an SDP file
generated and sent to the client before the client is able to play it.
This problem is a major challenge if the client if going to play the stream
in a browser using html5.
So how do you manage this? Or do you think what solutions are there?

Thank you,
Maziar


--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Maziar,
I finally figured it out. Instead of using udp stream as input, I generated
a SDP file and use it as the input.
Prior to receiving the audio packets, I receive a SIP packet with SDP
payload. The SDP payload describes the IP/port of the video packet as well
as the format. I just created a SDP file with the content of the payload,
and FFmpeg was able to use it to receive and save the packets into a mpeg
file. (or play it)
Thank you for your help!
AL
Post by Maziar Mehrabi
Hi,
Try testing it over http first, rather than UDP or RTP. What I understand
is that the errors somehow are related to audio channel, and RTP divides
the media into two streams (one audio and one video) and sends them
through
Post by Maziar Mehrabi
separate ports, so I guess you should have some sort of mechanism on the
other end to capture and mix these two streams.
One other way to test this idea is to use the -an option while you are
streaming media, this option means "No Audio" and will just stream the
video channel.
if you please, keep me updated about your results.
BR,
Maziar
--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Bill,
Post by Bill Davidsen
Post by Bill Davidsen
I might be tempted to set both video and audio codec to copy, and
save
Post by Maziar Mehrabi
Post by Alex Lin
in a .TS file without -f at all.
I did a look search on google about .ts files. My understanding is
that,
Post by Maziar Mehrabi
I
Post by Alex Lin
can use videosnarf to convert a packet trace to .TS file. Is that the
way
Post by Maziar Mehrabi
Post by Alex Lin
you have in mind as well?
Thank you,
AL
Post by Bill Davidsen
Post by Bill Davidsen
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version of
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I
haven't
Post by Bill Davidsen
Post by Bill Davidsen
quite figure out if ffmpeg is the right solution to my problem yet,
so I
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate of 90,000,
and I need to record these packets. The file format doesn't really
matter
Post by Bill Davidsen
Post by Bill Davidsen
at this point.
Currently, I have a server sending the H264 packets to port 50002 of
my
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
machine (192.168.1.200), so I run the following ffmpeg command on my
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and
save
Post by Maziar Mehrabi
in
Post by Alex Lin
Post by Bill Davidsen
a .TS file without -f at all.
If that works you can capture the information and then play with it
from
Post by Alex Lin
Post by Bill Davidsen
the file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if
you
Post by Maziar Mehrabi
Post by Alex Lin
can
Post by Bill Davidsen
capture the data you
eliminate some possible problems by not reformatting the data at
capture.
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3
--disable-w32threads
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype
--enable-libgme
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on the command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still (I waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing input
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am receiving
not
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
supported?
I have looked around and did not see any debug log generated by
ffmpeg,
Post by Alex Lin
so
Post by Bill Davidsen
Post by Bill Davidsen
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264
packets.
Post by Bill Davidsen
--
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may
be
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
less than zero for suffiently large values of zero.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Alex Lin
2014-09-23 22:05:38 UTC
Permalink
Hi Maziar,

I am implementing the client. Before the server sends video stream to me,
it sends a SIP INVITE with SDP which describes the video stream.
Once I get the SIP INVITE, I can create a SDP file according to the SIP
packet and call ffmpeg to record the incoming video stream.

I have not programmed with html5 before, but I imagine there are packets to
describe the incoming video stream before the video actually arrives.
Otherwise, the server and the client must have already agreed on the video
type ahead of time.

Hope this helps,
AL
Post by Maziar Mehrabi
Hi,
No problem, it was yourself who figured it out after all.
I have a question still though. How do you transmit the SDP file to the
client? I mean apparently for every stream you should have an SDP file
generated and sent to the client before the client is able to play it.
This problem is a major challenge if the client if going to play the stream
in a browser using html5.
So how do you manage this? Or do you think what solutions are there?
Thank you,
Maziar
--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Maziar,
I finally figured it out. Instead of using udp stream as input, I
generated
Post by Alex Lin
a SDP file and use it as the input.
Prior to receiving the audio packets, I receive a SIP packet with SDP
payload. The SDP payload describes the IP/port of the video packet as
well
Post by Alex Lin
as the format. I just created a SDP file with the content of the payload,
and FFmpeg was able to use it to receive and save the packets into a mpeg
file. (or play it)
Thank you for your help!
AL
Post by Maziar Mehrabi
Hi,
Try testing it over http first, rather than UDP or RTP. What I
understand
Post by Alex Lin
Post by Maziar Mehrabi
is that the errors somehow are related to audio channel, and RTP
divides
Post by Alex Lin
Post by Maziar Mehrabi
the media into two streams (one audio and one video) and sends them
through
Post by Maziar Mehrabi
separate ports, so I guess you should have some sort of mechanism on
the
Post by Alex Lin
Post by Maziar Mehrabi
other end to capture and mix these two streams.
One other way to test this idea is to use the -an option while you are
streaming media, this option means "No Audio" and will just stream the
video channel.
if you please, keep me updated about your results.
BR,
Maziar
--
Hälsningar,
Maziar Mehrabi
Post by Alex Lin
Hi Bill,
Post by Bill Davidsen
Post by Bill Davidsen
I might be tempted to set both video and audio codec to copy, and
save
Post by Maziar Mehrabi
Post by Alex Lin
in a .TS file without -f at all.
I did a look search on google about .ts files. My understanding is
that,
Post by Maziar Mehrabi
I
Post by Alex Lin
can use videosnarf to convert a packet trace to .TS file. Is that the
way
Post by Maziar Mehrabi
Post by Alex Lin
you have in mind as well?
Thank you,
AL
Post by Bill Davidsen
Post by Bill Davidsen
Hi all,
I am using Windows 7 64 bit, and I downloaded the 64 bit version
of
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
ffmpeg: ffmpeg-20140916-git-b76d613-win64-static.7z
I have spent the entire day experimenting with ffmpeg today but I
haven't
Post by Bill Davidsen
Post by Bill Davidsen
quite figure out if ffmpeg is the right solution to my problem
yet,
Post by Alex Lin
Post by Maziar Mehrabi
so I
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
would like to get some opinions.
I am receiving H264 encoded packets through RTP with sample rate
of
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
90,000,
and I need to record these packets. The file format doesn't really
matter
Post by Bill Davidsen
Post by Bill Davidsen
at this point.
Currently, I have a server sending the H264 packets to port 50002
of
Post by Alex Lin
Post by Maziar Mehrabi
my
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
machine (192.168.1.200), so I run the following ffmpeg command on
my
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
ffmpeg -i udp://192.168.1.200:50002 -f mp4 hello.mp4
I might be tempted to set both video and audio codec to copy, and
save
Post by Maziar Mehrabi
in
Post by Alex Lin
Post by Bill Davidsen
a .TS file without -f at all.
If that works you can capture the information and then play with it
from
Post by Alex Lin
Post by Bill Davidsen
the file. I am a Linux user,
so you may need guidance for Windows issues from an expert, but if
you
Post by Maziar Mehrabi
Post by Alex Lin
can
Post by Bill Davidsen
capture the data you
eliminate some possible problems by not reformatting the data at
capture.
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
Then the following shows
ffmpeg version N-66289-gb76d613 Copyright (c) 2000-2014 the FFmpeg
developers
built on Sep 15 2014 22:11:04 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3
--disable-w32threads
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-avisynth --enable-bzlib --enable-fontconfig
--enable-frei0r
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype
--enable-libgme
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
--enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
The server starts sending video packets, and nothing happens on
the
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
command
prompt with the ffmpeg command.
The server stops sending video packets, and nothing happens still
(I
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
waited
for at least 5 minutes), so I pressed Ctrl+C, then I see this
udp://192.168.1.200:50002: Invalid data found when processing
input
Post by Alex Lin
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
Received signal 2: terminating.
am I using ffmpeg correctly? and are the H264 packets I am
receiving
Post by Alex Lin
Post by Maziar Mehrabi
not
Post by Alex Lin
Post by Bill Davidsen
Post by Bill Davidsen
supported?
I have looked around and did not see any debug log generated by
ffmpeg,
Post by Alex Lin
so
Post by Bill Davidsen
Post by Bill Davidsen
I don't really know where else to look.
If it is necessary, I can provide a packet capture with the H264
packets.
Post by Bill Davidsen
--
CTO TMR Associates, Inc
Unsigned numbers may not be negative. However, unsigned numbers may
be
Post by Maziar Mehrabi
Post by Alex Lin
Post by Bill Davidsen
less than zero for suffiently large values of zero.
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...