Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: RTSP problem (Truong Huy)


----------------------------------------------------------------------

Message: 1
Date: Fri, 29 Dec 2023 21:59:46 +0700
From: Truong Huy <huytruongquo...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] RTSP problem
Message-ID:
        <cahq4sfgho6b1fnf2erskkbsucmqtauo2fdgx_on+cnr3ajq...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Tosiara,

Really appreciate your help.
I tried your guide but failed at the first line.

However, I tried to install ffmpeg and patch manually.

STT

Action

Link

1

Download

wget
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ffmpeg/7:6.1-5ubuntu1/ffmpeg_6.1.orig.tar.xz

2

Modify file

libavformat/rtsp.c





Thay ?o?n d??i ? line 956

if (!av_strcasecmp(lower_transport, "TCP"))
    th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
else
    th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;



B?ng



if (!av_strcasecmp(lower_transport, "TCP") ||
!av_strcasecmp(lower_transport, ""))
    th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
else
    th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;





sudo apt-get install build-essential

sudo apt-get install pkg-config

sudo apt-get install yasm





./configure





make





make install



Testing (Play output file with firefox)

ffmpeg -rtsp_transport tcp -i rtsp://
admin:123456789abc@14.233.86.163:554/onvif1 -vcodec copy ./abc2.mp4





git clone https://github.com/Motion-Project/motion





cd motion





sudo apt-get -y install autoconf automake build-essential pkgconf libtool
libzip-dev libjpeg-dev libwebp-dev libmicrohttpd-dev autopoint





sudo apt-get remove libavformat-dev libavcodec-dev libavutil-dev
libswscale-dev libavdevice-dev





autoreconf -fiv





./configure --with-ffmpeg=/full/path/to/ffmpeg/out





Make





Xxxx make yoru config gile





./src/motion -c your_config.conf -d 6 -n

Now. It's working.

Thank you so much.

On Fri, Dec 29, 2023 at 3:29?PM tosiara <tosi...@gmail.com> wrote:

> And with this patched ffmpeg you can remove UDP transport from your config
> (remove netcam_params or set it to TCP)
>
> On Fri, Dec 29, 2023 at 10:24?AM tosiara <tosi...@gmail.com> wrote:
>
>> Try this instruction how to patch ffmpeg and build motion:
>>
>>
>> https://github.com/Motion-Project/motion/issues/1735#issuecomment-1871830484
>>
>> On Fri, Dec 29, 2023 at 9:11?AM Truong Huy <huytruongquo...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> After i tried patching ffmepg from
>>> https://github.com/Motion-Project/motion/issues/1071
>>> I could play ffmegp stream and working well.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *Input #0, rtsp, from
>>> 'rtsp://admin:123456789abc@14.233.86.163:554/onvif1
>>> <http://admin:123456789abc@14.233.86.163:554/onvif1>':  Metadata:    title
>>>           : H.264 Video, RtspServer_0.0.0.2  Duration: N/A, start:
>>> 0.000000, bitrate: N/A  Stream #0:0: Video: h264 (Main),
>>> yuv420p(progressive), 1280x720, 15 fps, 14.99 tbr, 90k tbn  Stream #0:1:
>>> Audio: pcm_alaw, 16000 Hz, mono, s16, 128 kb/sFile './abc2.mp4' already
>>> exists. Overwrite? [y/N] yStream mapping:  Stream #0:0 -> #0:0 (copy)
>>> Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))Press [q] to stop,
>>> [?] for helpOutput #0, mp4, to './abc2.mp4':  Metadata:    title
>>> : H.264 Video, RtspServer_0.0.0.2    encoder         : Lavf60.16.100
>>> Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive),
>>> 1280x720, q=2-31, 15 fps, 14.99 tbr, 90k tbn  Stream #0:1: Audio: aac (LC)
>>> (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 69 kb/s    Metadata:
>>> encoder         : Lavc60.31.102 aac[rtsp @ 0x55fb0aeef6c0] Too short data
>>> for FU-A H.264 RTP packet6xsize=    3328kB time=00:01:01.86 bitrate=
>>> 440.7kbits/s speed=1.15x*
>>>
>>> When i return to motion, still same problem. I could be because Motion
>>> use it's motion in package.
>>>
>>>
>>>
>>>
>>> On Fri, Dec 29, 2023 at 9:47?AM Truong Huy <huytruongquo...@gmail.com>
>>> wrote:
>>>
>>>> Hi Chuck,
>>>>
>>>> Would you please help to export machine OVA/OVF? or give builded
>>>> package of motion on Fedora or give me guide to install motion on Fedora.
>>>> I tried with install guide but not much information for fedora.
>>>>
>>>> Thank you.
>>>>
>>>> On Fri, Dec 29, 2023 at 12:22?AM chuck elliot <c.ell...@pobox.com>
>>>> wrote:
>>>>
>>>>> I am using Fedora 38 x86_64
>>>>>
>>>>> ffmpeg-6.0.1-3.fc38.x86_64
>>>>>
>>>>> ('apologies to Tosiara for previous spelling!)
>>>>>
>>>>> Regards.
>>>>>
>>>>>
>>>>> On 28/12/2023 5:09 pm, Truong Huy wrote:
>>>>>
>>>>> Hi all, I found this page over the internet.
>>>>> https://github.com/Motion-Project/motion/issues/946 User had to patch
>>>>> ffmpeg to run such rtsp like my case. Anybody know how to patch ffmpeg?
>>>>> Thank you. On
>>>>> *DuckDuckGo* did not detect any trackers. More
>>>>> <https://duckduckgo.com/email/report#RFVDSzI.G5IBIBwH5aYzW-JDGDdfMv9zTmV7T7cDAKF2UwX8SQEDG4dbsegMnmMca1I_8RaFUXSN0hleKNVNxAFe4tey0uCtv7-QVCckEKl-K6Gbmne6iRfLA6_CrGS1D3avEHGq46KkZCERKYSLZODIeEhC4vcPKOBhQNefHQwouXnDMSKlULZhhQvRTCSJo6d-yMJRlIwnaAbViRQYRdOQhrMFpSeaN6bzabJk0QR_KDOp7vmiM9m8NhV3T_ZQKVgjOFGVCGQfOtGvH7Piqu1Mx9hc6-MtLYSXDyblvianrY6jtHMAlSyh7QJryySusXj7hhJn8Ac>
>>>>> Unable to verify sender identity
>>>>> Report Spam
>>>>> <https://duckduckgo.com/email/report-spam#RFVDSzI.G5IBIBwH5aYzW-JDGDdfMv9zTmV7T7cDAKF2UwX8SQEDG4dbsegMnmMca1I_8RaFUXSN0hleKNVNxAFe4tey0uCtv7-QVCckEKl-K6Gbmne6iRfLA6_CrGS1D3avEHGq46KkZCERKYSLZODIeEhC4vcPKOBhQNefHQwouXnDMSKlULZhhQvRTCSJo6d-yMJRlIwnaAbViRQYRdOQhrMFpSeaN6bzabJk0QR_KDOp7vmiM9m8NhV3T_ZQKVgjOFGVCGQfOtGvH7Piqu1Mx9hc6-MtLYSXDyblvianrY6jtHMAlSyh7QJryySusXj7hhJn8Ac>
>>>>> Hi all,
>>>>>
>>>>> I found this page over the internet.
>>>>> https://github.com/Motion-Project/motion/issues/946
>>>>>
>>>>> User had to patch ffmpeg to run such rtsp like my case.
>>>>> Anybody know how to patch ffmpeg?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> On Fri, Dec 29, 2023 at 12:05?AM Truong Huy <huytruongquo...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank Chuck.
>>>>>>
>>>>>> I tried your config in motion 4.6 but still failed.
>>>>>> What is your OS? and are you running motion on virtual machine?
>>>>>>
>>>>>> Thank you.
>>>>>>
>>>>>> On Thu, Dec 28, 2023 at 11:39?PM chuck elliot <c.ell...@pobox.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Sure - see attached.
>>>>>>>
>>>>>>> I only edited it to accommodate the parameters suggested by Tosaria
>>>>>>>
>>>>>>> for your device instead of my cheap Trust HD 720P test setup.
>>>>>>>
>>>>>>> I think most of it is irrelevant to getting the camera to work...
>>>>>>>
>>>>>>> Regards.
>>>>>>>
>>>>>>>
>>>>>>> On 28/12/2023 4:01 pm, Truong Huy wrote:
>>>>>>>
>>>>>>> Hi Chuck, I updated to 4.6.0 by APT install. However, nothing new.
>>>>>>> Still getting stuck. Could you please help to share your configuration?
>>>>>>> Thank you. On Thu, Dec 28, 2023 at 9:39 PM chuck elliot
>>>>>>>
>>>>>>> *DuckDuckGo* did not detect any trackers. More
>>>>>>> <https://duckduckgo.com/email/report#RFVDSzI.G5IBIBwH5aYzW-JDGDdfMv9zTmV7T7cDAKF2UwX8SQEDG4dbsegMnmMca1I_8RaFUXSN0hleKNVNxAFe4tey0uCtv7-QVCckEKl-K6Gbmne6iRfLA6_CrGS1D3avEHGq46KkZCERKYSLZODIeEhC4vcPKOBhQNefHQwouXnDMSKlULZhhQvRTCSJo6d-yMJRlIwnaAbViRQYRdOQhrMFpSeaN6bzabJk0QR_KDOp7vmiM9m8NhV3T_ZQKVgjOFGVCGQfOtGvH7Piqu1Mx9hc6-MtLYSXDyblvianrY6jtHMAlSyh7QJryySusXj7hhJn8Ac>
>>>>>>> Unable to verify sender identity
>>>>>>> Report Spam
>>>>>>> <https://duckduckgo.com/email/report-spam#RFVDSzI.G5IBIBwH5aYzW-JDGDdfMv9zTmV7T7cDAKF2UwX8SQEDG4dbsegMnmMca1I_8RaFUXSN0hleKNVNxAFe4tey0uCtv7-QVCckEKl-K6Gbmne6iRfLA6_CrGS1D3avEHGq46KkZCERKYSLZODIeEhC4vcPKOBhQNefHQwouXnDMSKlULZhhQvRTCSJo6d-yMJRlIwnaAbViRQYRdOQhrMFpSeaN6bzabJk0QR_KDOp7vmiM9m8NhV3T_ZQKVgjOFGVCGQfOtGvH7Piqu1Mx9hc6-MtLYSXDyblvianrY6jtHMAlSyh7QJryySusXj7hhJn8Ac>
>>>>>>> Hi Chuck,
>>>>>>>
>>>>>>> I updated to 4.6.0 by APT install.
>>>>>>> However, nothing new. Still getting stuck.
>>>>>>>
>>>>>>> Could you please help to share your configuration?
>>>>>>>
>>>>>>> Thank you.
>>>>>>>
>>>>>>> On Thu, Dec 28, 2023 at 9:39?PM chuck elliot <c.ell...@pobox.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> The given parameters work for me using motion 4.6.0
>>>>>>>>
>>>>>>>> and I can also get the stream using ffplay.
>>>>>>>>
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 28/12/2023 1:55 pm, tosiara wrote:
>>>>>>>>
>>>>>>>> netcam_url rtsp://admin:123456789abc@14.233.86.163:554/onvif1
>>>>>>>>
>>>>>>>> netcam_params rtsp_transport=udp,analyzeduration=30
>>>>>>>>
>>>>>>>> width 1280
>>>>>>>>
>>>>>>>> height 720
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Motion-user mailing list
>>>>>>>> Motion-user@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>>>>> https://motion-project.github.io/
>>>>>>>>
>>>>>>>> Unsubscribe:
>>>>>>>> https://lists.sourceforge.net/lists/options/motion-user
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Thank you.
>>>>>>>
>>>>>>> Mr. Truong Quoc Huy
>>>>>>> +84905811839
>>>>>>>
>>>>>>> DuckDuckGo was unable to verify sender identity
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> DuckDuckGo was unable to verify sender identity
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Motion-user mailing 
>>>>>>> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>>>>>>>
>>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Motion-user mailing list
>>>>>>> Motion-user@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>>>> https://motion-project.github.io/
>>>>>>>
>>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Thank you.
>>>>>>
>>>>>> Mr. Truong Quoc Huy
>>>>>> +84905811839
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Thank you.
>>>>>
>>>>> Mr. Truong Quoc Huy
>>>>> +84905811839
>>>>>
>>>>> DuckDuckGo was unable to verify sender identity
>>>>>
>>>>>
>>>>>
>>>>> DuckDuckGo was unable to verify sender identity
>>>>>
>>>>> _______________________________________________
>>>>> Motion-user mailing 
>>>>> listMotion-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/motion-userhttps://motion-project.github.io/
>>>>>
>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>>>>
>>>>> _______________________________________________
>>>>> Motion-user mailing list
>>>>> Motion-user@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>>>> https://motion-project.github.io/
>>>>>
>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Thank you.
>>>>
>>>> Mr. Truong Quoc Huy
>>>> +84905811839
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Thank you.
>>>
>>> Mr. Truong Quoc Huy
>>> +84905811839
>>> _______________________________________________
>>> Motion-user mailing list
>>> Motion-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/motion-user
>>> https://motion-project.github.io/
>>>
>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>>
>> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user



-- 
Regards,
Thank you.

Mr. Truong Quoc Huy
+84905811839
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 208, Issue 32
********************************************

Reply via email to