preset files

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

preset files

Scott Johnson
Hi Everyone,

 

Here is a newbie question.

 

I have a C++ API that uses FFmpeg to stream an IP camera to my application.
I can not pass any variables to the background call to FFmpeg, other than
the source rtsp and transport type call.

 

Here is the command I used to test the FFmpeg settings to make it work with
my camera. Or should I say, here is the command I had to build to get it to
work.

 

ffmpeg -rtsp_transport tcp -i "rtsp://192.168.90.112:554/profile2/" -c:v
copy -c:a aac -max_muxing_queue_size 99999 -map 0 foo.mp4

 

I now need to take some of the parts and put them in a preset file. Because
FFmpeg does not like my pcm_alaw audio codex. I had to use "-c:a aac" to
replace the audio steam with a blank one. I also had to add the
"-max_muxing_queue_size 99999" to prevent buffer issues.

 

My video is using the h.264 codex. Do I just need to make a file named
h264.ffpreset, with the following lines:

 

               c:a=aac

               max_muxing_queue_size=99999

 

 

Thanks,

 

Scotty.

 

 

 

 

ffmpeg version N-91715-gd71dfc087b Copyright (c) 2000-2018 the FFmpeg
developers

  built with gcc 8.2.1 (GCC) 20180813

  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
--enable-avisynth

  libavutil      56. 19.100 / 56. 19.100

  libavcodec     58. 27.100 / 58. 27.100

  libavformat    58. 17.103 / 58. 17.103

  libavdevice    58.  4.101 / 58.  4.101

  libavfilter     7. 26.100 /  7. 26.100

  libswscale      5.  2.100 /  5.  2.100

  libswresample   3.  2.100 /  3.  2.100

  libpostproc    55.  2.100 / 55.  2.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: preset files

Francois Visagie
> -----Original Message-----
> From: ffmpeg-user [mailto:[hidden email]] On Behalf Of
> Scott Johnson
> Sent: 31 August 2018 15:07
> To: [hidden email]
> Subject: [FFmpeg-user] preset files
>
> Hi Everyone,
>
>
>
> Here is a newbie question.
>
>
>
> I have a C++ API that uses FFmpeg to stream an IP camera to my application.
> I can not pass any variables to the background call to FFmpeg, other than
> the source rtsp and transport type call.
>
>
>
> Here is the command I used to test the FFmpeg settings to make it work with
> my camera. Or should I say, here is the command I had to build to get it to
> work.
>
>
>
> ffmpeg -rtsp_transport tcp -i "rtsp://192.168.90.112:554/profile2/" -c:v
> copy -c:a aac -max_muxing_queue_size 99999 -map 0 foo.mp4
>
>
>
> I now need to take some of the parts and put them in a preset file. Because
> FFmpeg does not like my pcm_alaw audio codex. I had to use "-c:a aac" to
> replace the audio steam with a blank one. I also had to add the
> "-max_muxing_queue_size 99999" to prevent buffer issues.
>
>
>
> My video is using the h.264 codex. Do I just need to make a file named
> h264.ffpreset, with the following lines:
>
>
>
>                c:a=aac
>
>                max_muxing_queue_size=99999
>
>

As far as I know the use of preset files has been deprecated.

I'd use a wrapper that takes the source and transport type arguments from your API and then specifies the additional settings on the actual ffmpeg command line.

>
>
>
> Thanks,
>
>
>
> Scotty.
>
>
>
>
>
>
>
>
>
> ffmpeg version N-91715-gd71dfc087b Copyright (c) 2000-2018 the FFmpeg
> developers
>
>   built with gcc 8.2.1 (GCC) 20180813
>
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libbluray --enable-libfreetype --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
> libopenjpeg
> --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
> --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
> --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
> --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
> --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2
> --enable-avisynth
>
>   libavutil      56. 19.100 / 56. 19.100
>
>   libavcodec     58. 27.100 / 58. 27.100
>
>   libavformat    58. 17.103 / 58. 17.103
>
>   libavdevice    58.  4.101 / 58.  4.101
>
>   libavfilter     7. 26.100 /  7. 26.100
>
>   libswscale      5.  2.100 /  5.  2.100
>
>   libswresample   3.  2.100 /  3.  2.100
>
>   libpostproc    55.  2.100 / 55.  2.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".

_______________________________________________
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: preset files

Scott Johnson
Hi Francois,

I'm using a third party compiled API, to talk to FFmpeg. I can't change the command line structure. I would have to purchase the API source to do it.

If that is true. They should remove the pages from the website, talking about the feature.

But I can see using these files for several of my projects. It's too bad they removed this feature.

Thanks,

Scott.

-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Francois Visagie
Sent: September 4, 2018 4:00 PM
To: 'FFmpeg user questions' <[hidden email]>
Subject: Re: [FFmpeg-user] preset files

> -----Original Message-----
> From: ffmpeg-user [mailto:[hidden email]] On Behalf Of
> Scott Johnson
> Sent: 31 August 2018 15:07
> To: [hidden email]
> Subject: [FFmpeg-user] preset files
>
> Hi Everyone,
>
>
>
> Here is a newbie question.
>
>
>
> I have a C++ API that uses FFmpeg to stream an IP camera to my application.
> I can not pass any variables to the background call to FFmpeg, other
> than the source rtsp and transport type call.
>
>
>
> Here is the command I used to test the FFmpeg settings to make it work
> with my camera. Or should I say, here is the command I had to build to
> get it to work.
>
>
>
> ffmpeg -rtsp_transport tcp -i "rtsp://192.168.90.112:554/profile2/"
> -c:v copy -c:a aac -max_muxing_queue_size 99999 -map 0 foo.mp4
>
>
>
> I now need to take some of the parts and put them in a preset file.
> Because FFmpeg does not like my pcm_alaw audio codex. I had to use
> "-c:a aac" to replace the audio steam with a blank one. I also had to
> add the "-max_muxing_queue_size 99999" to prevent buffer issues.
>
>
>
> My video is using the h.264 codex. Do I just need to make a file named
> h264.ffpreset, with the following lines:
>
>
>
>                c:a=aac
>
>                max_muxing_queue_size=99999
>
>

As far as I know the use of preset files has been deprecated.

I'd use a wrapper that takes the source and transport type arguments from your API and then specifies the additional settings on the actual ffmpeg command line.

>
>
>
> Thanks,
>
>
>
> Scotty.
>
>
>
>
>
>
>
>
>
> ffmpeg version N-91715-gd71dfc087b Copyright (c) 2000-2018 the FFmpeg
> developers
>
>   built with gcc 8.2.1 (GCC) 20180813
>
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libbluray --enable-libfreetype --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
> libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libtheora --enable-libtwolame
> --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
> --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis
> --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex
> --enable-libxvid --enable-libaom --enable-libmfx --enable-amf
> --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc
> --enable-nvdec --enable-dxva2 --enable-avisynth
>
>   libavutil      56. 19.100 / 56. 19.100
>
>   libavcodec     58. 27.100 / 58. 27.100
>
>   libavformat    58. 17.103 / 58. 17.103
>
>   libavdevice    58.  4.101 / 58.  4.101
>
>   libavfilter     7. 26.100 /  7. 26.100
>
>   libswscale      5.  2.100 /  5.  2.100
>
>   libswresample   3.  2.100 /  3.  2.100
>
>   libpostproc    55.  2.100 / 55.  2.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".

_______________________________________________
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".
Reply | Threaded
Open this post in threaded view
|

Re: preset files

Moritz Barsnick
On Tue, Sep 04, 2018 at 16:25:47 -0400, Scott Johnson wrote:

> I'm using a third party compiled API, to talk to FFmpeg. I can't
> change the command line structure. I would have to purchase the API
> source to do it.

Francois suggested a wrapper, i.e. a script which is called ffmpeg,
which adds there options under the hood. Your "API" would call this
script, assuming it is the ffmpeg binary.

> From: ffmpeg-user <[hidden email]> On Behalf Of Francois Visagie
> As far as I know the use of preset files has been deprecated.

At first glance, I don't see any deprecation code around its
implementation.

On Fri, Aug 31, 2018 at 10:06:35 -0400, Scott Johnson wrote:
> My video is using the h.264 codex. Do I just need to make a file named
> h264.ffpreset, with the following lines:
>
>                c:a=aac
>
>                max_muxing_queue_size=99999

You could have just tried (as I am doing now). Using "-loglevel debug",
ffmpeg will tell you about the parsing of this file. E.g.

> keks.ffpreset: Invalid option or argument: 'c:a=aac
> ', parsed as 'c:a' = 'aac'

This works if changed to
acodec=aac
(the c:X format is apparently not supported).

When that is changed, I get:
> Applying option fpre (set options from indicated preset file) with argument keks.ffpreset.
> ffpreset[keks.ffpreset]: set 'acodec' = 'aac'
> ffpreset[keks.ffpreset]: set 'max_muxing_queue_size' = '99999'
> keks.ffpreset: Invalid option or argument: 'max_muxing_queue_size=99999
> ', parsed as 'max_muxing_queue_size' = '99999'

Why the latter isn't understood I do not know, though. Someone else
will need to pitch in, as I don't have the time to investigate right
now.

Cheers,
Moritz
_______________________________________________
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: preset files

Scott Johnson
Hi Moritz,

This was a big help, thanks for the update. One of 40 steps closer to finishing my program. Lol

Thanks,

Scott.

-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Moritz Barsnick
Sent: September 5, 2018 3:52 AM
To: FFmpeg user discussions <[hidden email]>
Subject: Re: [FFmpeg-user] preset files

On Tue, Sep 04, 2018 at 16:25:47 -0400, Scott Johnson wrote:

> I'm using a third party compiled API, to talk to FFmpeg. I can't
> change the command line structure. I would have to purchase the API
> source to do it.

Francois suggested a wrapper, i.e. a script which is called ffmpeg, which adds there options under the hood. Your "API" would call this script, assuming it is the ffmpeg binary.

> From: ffmpeg-user <[hidden email]> On Behalf Of
> Francois Visagie As far as I know the use of preset files has been deprecated.

At first glance, I don't see any deprecation code around its implementation.

On Fri, Aug 31, 2018 at 10:06:35 -0400, Scott Johnson wrote:
> My video is using the h.264 codex. Do I just need to make a file named
> h264.ffpreset, with the following lines:
>
>                c:a=aac
>
>                max_muxing_queue_size=99999

You could have just tried (as I am doing now). Using "-loglevel debug", ffmpeg will tell you about the parsing of this file. E.g.

> keks.ffpreset: Invalid option or argument: 'c:a=aac ', parsed as 'c:a'
> = 'aac'

This works if changed to
acodec=aac
(the c:X format is apparently not supported).

When that is changed, I get:
> Applying option fpre (set options from indicated preset file) with argument keks.ffpreset.
> ffpreset[keks.ffpreset]: set 'acodec' = 'aac'
> ffpreset[keks.ffpreset]: set 'max_muxing_queue_size' = '99999'
> keks.ffpreset: Invalid option or argument:
> 'max_muxing_queue_size=99999 ', parsed as 'max_muxing_queue_size' = '99999'

Why the latter isn't understood I do not know, though. Someone else will need to pitch in, as I don't have the time to investigate right now.

Cheers,
Moritz
_______________________________________________
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".