[FFmpeg-user] How to download video stream starting at an earlier time?

2021-08-15 Thread Bo Berglund
Is it possible to download a live video stream on youtube using ffmpeg such that
it starts *earlier* than current time and lasts for a set time?

If I use a browser I can start the viewing at an earlier time by two ways:
1) I open the video URL and then I drag the right side of the progress bar left

2) I modify the video URL by adding ?t=3600 to the end and it will start playing
1 hour from the start of the stream.

Example:
I would like to be able to download a playing live stream section starting at
3650 seconds from the start and lasting for 600 seconds in mp4 format.

What would the ffmpeg command to accomplish this look like?


-- 
Bo Berglund
Developer in Sweden

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
Android PowerUser  schrieb am Mo., 16. Aug. 2021,
03:54:

> > Ich finde es schade. FFMPEG war für mich super einfach zu benutzen.
> Einfach ein paar Kommandos die man sogar einfach aus dem netz abschreiben
> könnte und fertig.
>

Sorry again for the wrong language.

I find it a pity.  FFMPEG was super easy to use for me.  Just a few
commands that you could even simply copy from the internet and that's it.

>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
Carl Zwanzig  schrieb am Mo., 16. Aug. 2021, 03:15:

> >(rendering an hour of HD video
> on a PHONE is just stupid).
>
> Yes, that's really annoying when it runs in the background and doesn't
bother you ...
 The question was actually why FFMPEG.  Why FFMPEG if I prefer to do it
right and I have to download all the modern codecs individually from github
and some associated programs to make it work.  And FFMPEG can ever catch up
with this question, too.  Because by the time the codecs are integrated,
there will be new ones on the market.  Maybe new codecs will come out
faster and faster.  Maybe it was never like that before ... Ich finde es
schade. FFMPEG war für mich super einfach zu benutzen. Einfach ein paar
Kommandos die man sogar einfach aus dem netz abschreiben könnte und fertig.

You are right, there is really no other way than on the desktop.  But maybe
I can still stay true to Android by putting Linux on my mobile phone.  So
of course only until the PCs have recaptured the users.😁
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

On 8/15/2021 5:58 PM, Android PowerUser wrote:

And with a PC, I'm tied to
one place.  I just can't go to the couch.


That's why I have a laptop, well, several; and a tablet, and a phone, and 
two servers- use the right tool for each job (rendering an hour of HD video 
on a PHONE is just stupid).


And nothing in the last 5-6 emails has to do with ffmpeg itself.

(Learn how to post properly, other people manage it.)

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
A full backup is always available.  I'm not stupid.  It would not be a
problem if the cell phone broke.  Well except that I would need a new one.
I don't let the cloud manage my data either.  Operation on a computer takes
significantly longer.  Instead of simply tapping on it, you first have to
go there with the mouse.  Especially bad with the trackpad.  Sometimes they
just start swimming.  And then there are the extremely small buttons, poor
overview, because everything is forced onto one screen and even with a
touchscreen on a laptop one would have to maneuver with the shoulders -
this is imprecise, inefficient and exhausting.  And with a PC, I'm tied to
one place.  I just can't go to the couch.  That's not work either, it's
free time.  Can also be used with FFMPEG😉.  And that's how I handle it.
If this were work for me, I wouldn't be doing it.

Reindl Harald  schrieb am Mo., 16. Aug. 2021, 02:19:

>
>
> Am 16.08.21 um 01:39 schrieb Android PowerUser:
> > Many have a smartphone and need one, but not everyone has a PC.  You can
> > save more money if you give yourself the money instead of for a PC and
> use
> > your smartphone as a PC right away. Everything on one device is more
> > convenient as there is no need to switch or constantly remembering
> > developer options for multiple types of devices.
>
> sorry, but i value my data and no cloud for me
>
> if that PC dies i just put my 4 disks in the next one and continue
> working, have fun doing a full backup on a smartphone and restore it on
> a different device
>
> i can't take people serious which only use a smartphone, in that case
> you don't do any serious work - before i swipe around on such a mini
> shit-device for serious taks they can wait until i come home or to the
> office
>
> this shit is nice for browsing on thge couch, write some comments and
> that's it - even for youtube it's shit compared to my 65" TV
>
> > Reindl Harald  schrieb am Mo., 16. Aug. 2021,
> 00:00:
> >
> >>
> >>
> >> Am 15.08.21 um 23:01 schrieb Android PowerUser:
> >>> The use case is simple:
> >>>
> >>> why do we use codecs at all:
> >>> It's easy, files will simply become incredibly large.  Stream would be
> >>> impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
> >>> device would also not be possible.  Then of course you also want the
> most
> >>> memory-efficient.  Either all or nothing.  Even on the PC, most of the
> >>> talked about would still not be on FFMPEG.  I also do it on my
> smartphone
> >>> because it is super easy, convenient
> >>
> >> convenient? *lol*
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Reindl Harald




Am 16.08.21 um 01:39 schrieb Android PowerUser:

Many have a smartphone and need one, but not everyone has a PC.  You can
save more money if you give yourself the money instead of for a PC and use
your smartphone as a PC right away. Everything on one device is more
convenient as there is no need to switch or constantly remembering
developer options for multiple types of devices.


sorry, but i value my data and no cloud for me

if that PC dies i just put my 4 disks in the next one and continue 
working, have fun doing a full backup on a smartphone and restore it on 
a different device


i can't take people serious which only use a smartphone, in that case 
you don't do any serious work - before i swipe around on such a mini 
shit-device for serious taks they can wait until i come home or to the 
office


this shit is nice for browsing on thge couch, write some comments and 
that's it - even for youtube it's shit compared to my 65" TV



Reindl Harald  schrieb am Mo., 16. Aug. 2021, 00:00:




Am 15.08.21 um 23:01 schrieb Android PowerUser:

The use case is simple:

why do we use codecs at all:
It's easy, files will simply become incredibly large.  Stream would be
impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
device would also not be possible.  Then of course you also want the most
memory-efficient.  Either all or nothing.  Even on the PC, most of the
talked about would still not be on FFMPEG.  I also do it on my smartphone
because it is super easy, convenient


convenient? *lol*

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
Many have a smartphone and need one, but not everyone has a PC.  You can
save more money if you give yourself the money instead of for a PC and use
your smartphone as a PC right away. Everything on one device is more
convenient as there is no need to switch or constantly remembering
developer options for multiple types of devices.

 I once put Windows on my Smartphone but it was very slow because only one
core was used.  Probably looking better after a few years now because of
new developments over time.  Maybe at some point it will be faster and it
might even be useful to run .exe files on the smartphone.

Reindl Harald  schrieb am Mo., 16. Aug. 2021, 00:00:

>
>
> Am 15.08.21 um 23:01 schrieb Android PowerUser:
> > The use case is simple:
> >
> > why do we use codecs at all:
> > It's easy, files will simply become incredibly large.  Stream would be
> > impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
> > device would also not be possible.  Then of course you also want the most
> > memory-efficient.  Either all or nothing.  Even on the PC, most of the
> > talked about would still not be on FFMPEG.  I also do it on my smartphone
> > because it is super easy, convenient
>
> convenient? *lol*
>
> > and can be done from anywhere
>
> get a life
>
> > well as incidentally, and programs on the smartphone cost less memory.
> > Good smartphones are also cheaper than good PCs.
>
> a) this is nosense
> b) the PC in front of me is running 365/24 since 2011
>
> > Reindl Harald  schrieb am So., 15. Aug. 2021,
> 22:46:
> >
> >>
> >>
> >> Am 15.08.21 um 22:28 schrieb Android PowerUser:
> >>> I forgot to mention that I am referring to the FFMPEG Android app.
> >> Codec2
> >>> cannot be used there.  On the desktop, of course, yes.  Since there is
> no
> >>> description of how to integrate this, if that is even possible.  And
> AVC
> >>> and HEVC can be used natively in FFMPEG in Android and it's super easy.
> >>> And the codecs I mentioned are the best for their purposes.  In
> addition,
> >>> if HEVC with the extremely complicated license invoice, in which the
> >> prices
> >>> cannot even be calculated correctly because they constantly differ
> >>> (depending on use) and a lot of companies are involved that you seem to
> >>> have to ask all questions, then that will not be a problem with VVC
> >>> because this time a network should take care that this should make this
> >>> much easier.  He-aac is also added, why not xhe-aac too?  Even if USAC
> >> has
> >>> strict patents, I would be surprised why a station wagon with he-aac is
> >>> possible, but not the integration in FFMPEG.
> >>
> >> i still need to see a real world usecase for video-encoding on a damned
> >> smartphone besides "because i can"
> >>
> >> i still need to see a real world usecase for that codecs given that H264
> >> plays on every client, is efficient and fast
> >>
> >>> Moritz Barsnick  schrieb am So., 15. Aug. 2021,
> 21:47:
> >>>
>  On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:
> > If FFMPEG is a collection of codecs then why are the most memory
>  efficient
> > codecs not available. The most memory-efficient waveform encoder
> >> xhe-aac,
> > the most memory-efficient video codec VVC, the most memory-efficient
>  image
> > codec AVIF
> 
>  What are you trying to say? Which media framework are you using
> instead
>  which supports these?
> 
> > ISOBMFF as in HEIF), not even the most memory-efficient vocoder
> Codec2
>  can
> > be used without other downloads.
> 
>  "without other downloads"? If you mean libocdec2: Some other team made
>  an effort to create a usable library, and ffmpeg makes use of it.
>  Where's the problem? The same is the case for H.264 via libx264 and
>  HEVC via libx265. (ffmpeg has no native encoders for these either.)
> 
> > So a cross-device codec collection is a good idea, but then you
> should
> >> do
> > it right. I can't help with that, but those who can and have so far
> > partially done it should end it.  Otherwise it doesn't make any sense
> >> ...
> > right?
> 
>  Creating and integrating codecs is not done easily. If you can't
>  contribute with code, you can surely sponsor a group of developers.
> 
>  It does make sense though: HEVC is still being established, so
>  widespread use of VVC seems far away. Sure, a leading codec would be
>  nice, and I'm sure it's in the making, but it doesn't just appear
>  magically
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, 

Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

On 8/15/2021 4:27 PM, Android PowerUser wrote:

I am now trying to use the quoted text. That’s probably at the bottom. As
expected with my name, I also write these messages with my smartphone.


I write gmail massages on my smartphone (with the email app)- it's not 
difficult at all to put the reply under the quoted part, click the 
three-dots to open the quoted message and start editing.


z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
I am now trying to use the quoted text. That’s probably at the bottom. As
expected with my name, I also write these messages with my smartphone.

Ulf Zibis  schrieb am Mo., 16. Aug. 2021, 00:57:

>
> Am 16.08.21 um 00:48 schrieb Android PowerUser:
> > Ich muss zugeben die Hardware Anforderungen sind für Smartphones schnell
> > gestiegen... Ich komm aus einer konservativen Familie. Deshalb habe ich
> > überhaupt erst seit 2015 mobile Geräte. Deswegen ist der Vergleich auch
> > unfair. Ich habe zu wenig beachtet, dass obwohl Smartphones billiger
> sind,
> > deren Lebensdauer stark beschränkt ist.
>
> Ja nett, hier mal was deutsches zu lesen, dennoch gut dass Du's gemerkt
> hast.
>
> Ansonsten wird hier strikt das sogenannte Top-Posting verdammt. Also bevor
> Du den üblichen Shitstorm kriegst, setzt Deine Antworten besser immer
> _unter_ den Text, auf den Du antwortest.
>
> -Ulf
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

On 8/15/2021 4:10 PM, Simon Brown wrote:

Interesting to know that someone with the surname Zwanzig doesn't speak

German.  :-)


Lots of us don't- our great-grandparents might have.

Late,r

z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Simon Brown
>
>
> z!
> who doesn't speak German but can occasionally get the meaning (and google
> translate does an acceptable job)
>
>
> Interesting to know that someone with the surname Zwanzig doesn't speak
German.  :-)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

On 8/15/2021 3:57 PM, Ulf Zibis wrote:
Ansonsten wird hier strikt das sogenannte Top-Posting verdammt. Also bevor 
Du den üblichen Shitstorm kriegst, setzt Deine Antworten besser immer 
_unter_ den Text, auf den Du antwortest.


Also mentioned at 
https://ffmpeg.org/mailing-list-faq.html#What-is-top_002dposting_003f-1


z!
who doesn't speak German but can occasionally get the meaning (and google 
translate does an acceptable job)


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Ulf Zibis


Am 16.08.21 um 00:48 schrieb Android PowerUser:

Ich muss zugeben die Hardware Anforderungen sind für Smartphones schnell
gestiegen... Ich komm aus einer konservativen Familie. Deshalb habe ich
überhaupt erst seit 2015 mobile Geräte. Deswegen ist der Vergleich auch
unfair. Ich habe zu wenig beachtet, dass obwohl Smartphones billiger sind,
deren Lebensdauer stark beschränkt ist.


Ja nett, hier mal was deutsches zu lesen, dennoch gut dass Du's gemerkt hast.

Ansonsten wird hier strikt das sogenannte Top-Posting verdammt. Also bevor Du 
den üblichen Shitstorm kriegst, setzt Deine Antworten besser immer _unter_ den 
Text, auf den Du antwortest.

-Ulf

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
I have to admit the hardware requirements for smartphones have increased
rapidly ... I come from a conservative family.  That's why I've only had
mobile devices since 2015.  That's why the comparison is unfair.  I didn't
pay enough attention to the fact that although smartphones are cheaper,
their lifespan is severely limited. Sorry for the false language in the
past.

Android PowerUser  schrieb am Mo., 16. Aug. 2021,
00:48:

> Ich muss zugeben die Hardware Anforderungen sind für Smartphones schnell
> gestiegen... Ich komm aus einer konservativen Familie. Deshalb habe ich
> überhaupt erst seit 2015 mobile Geräte. Deswegen ist der Vergleich auch
> unfair. Ich habe zu wenig beachtet, dass obwohl Smartphones billiger sind,
> deren Lebensdauer stark beschränkt ist.
>
> Ulf Zibis  schrieb am Mo., 16. Aug. 2021, 00:36:
>
>>
>> Am 16.08.21 um 00:26 schrieb Android PowerUser:
>> > The 2011 PC probably cost more than I've ever spent on smartphones.
>> You will tell us, that you spent less money on smartphones over a period
>> of 10 years than 1 PC?
>>
>> In my experience, the average time of use of smartphones is only 2 - 4
>> years.
>>
>> -Ulf
>>
>>
>> ___
>> ffmpeg-user mailing list
>> ffmpeg-user@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>>
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
Ich muss zugeben die Hardware Anforderungen sind für Smartphones schnell
gestiegen... Ich komm aus einer konservativen Familie. Deshalb habe ich
überhaupt erst seit 2015 mobile Geräte. Deswegen ist der Vergleich auch
unfair. Ich habe zu wenig beachtet, dass obwohl Smartphones billiger sind,
deren Lebensdauer stark beschränkt ist.

Ulf Zibis  schrieb am Mo., 16. Aug. 2021, 00:36:

>
> Am 16.08.21 um 00:26 schrieb Android PowerUser:
> > The 2011 PC probably cost more than I've ever spent on smartphones.
> You will tell us, that you spent less money on smartphones over a period
> of 10 years than 1 PC?
>
> In my experience, the average time of use of smartphones is only 2 - 4
> years.
>
> -Ulf
>
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Reindl Harald




Am 16.08.21 um 00:26 schrieb Android PowerUser:

I think if a libaom on the smartphone is not too slow then VVC either.
Simply -cpu-used 8 and it's 15 times faster with only a 2% loss of storage
efficiency.  With 10 times the complexity, one expects 40% more storage
efficiency.  That without cpu-used 8 is like placebo with AVC or HEVC.  But
with it works.  The 2011 PC probably cost more than I've ever spent on
smartphones.  


1200 euro including 4x2 TB RAID10 storage
not that bad for 10 years

it's also my router, wlan-ap, network-storage and serves 50.000 FLAC 
music tracks to my high-end HiFi


I even think that because more and more projects, for example

on github, start immediately as Android and / or iOS projects and PCs lose
relevance faster and faster, people who compulsively rely on PCs probably
rely on a medium that will no longer be relevant in maybe 15 years and  the
people who still bet on it then fall off the back.  And nothing is worse
and more ridiculous than conversational computer hobbyists.


you dumb kid i make my money with that computer and i need a 32" screen 
and a keyboard deserving that name to maintain servers, networks and 
develop software so that you smartphone-kids have content



Marton Balint  schrieb am Mo., 16. Aug. 2021, 00:04:


On Sun, 15 Aug 2021, Android PowerUser wrote:


The use case is simple:

why do we use codecs at all:
It's easy, files will simply become incredibly large.  Stream would be
impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
device would also not be possible.  Then of course you also want the most
memory-efficient.


There are a lot of other considerations at play. Device compatiblity, for
example. Or licensing cost of using the codecs. HW capacity needed to
_encode_ the videos. So no, typically you don't want the newest codecs
with the slowest presets for any real use case


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to lossless crop mp4 videos

2021-08-15 Thread Ulf Zibis



Am 16.08.21 um 00:32 schrieb Android PowerUser:

That always depends on the codec and probably also on the bit rate and
resolution.  MP4 is just a container format.


I mean mp4 with default libx264 codec.

-Ulf

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Ulf Zibis



Am 16.08.21 um 00:26 schrieb Android PowerUser:

The 2011 PC probably cost more than I've ever spent on smartphones.

You will tell us, that you spent less money on smartphones over a period of 10 
years than 1 PC?

In my experience, the average time of use of smartphones is only 2 - 4 years.

-Ulf


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to lossless crop mp4 videos

2021-08-15 Thread Android PowerUser
That always depends on the codec and probably also on the bit rate and
resolution.  MP4 is just a container format.

Ulf Zibis  schrieb am Mo., 16. Aug. 2021, 00:28:

> Hi,
>
> if I understand correct, mp4 videos are encoded in blocks of 16x16 pixels.
> I I'm wondering if I could crop a video by multiples of 16 pixels without
> reencoding the remaining blocks.
>
> -Ulf
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] How to lossless crop mp4 videos

2021-08-15 Thread Ulf Zibis

Hi,

if I understand correct, mp4 videos are encoded in blocks of 16x16 pixels. I 
I'm wondering if I could crop a video by multiples of 16 pixels without 
reencoding the remaining blocks.

-Ulf

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
I think if a libaom on the smartphone is not too slow then VVC either.
Simply -cpu-used 8 and it's 15 times faster with only a 2% loss of storage
efficiency.  With 10 times the complexity, one expects 40% more storage
efficiency.  That without cpu-used 8 is like placebo with AVC or HEVC.  But
with it works.  The 2011 PC probably cost more than I've ever spent on
smartphones.  I even think that because more and more projects, for example
on github, start immediately as Android and / or iOS projects and PCs lose
relevance faster and faster, people who compulsively rely on PCs probably
rely on a medium that will no longer be relevant in maybe 15 years and  the
people who still bet on it then fall off the back.  And nothing is worse
and more ridiculous than conversational computer hobbyists.

Marton Balint  schrieb am Mo., 16. Aug. 2021, 00:04:

>
>
> On Sun, 15 Aug 2021, Android PowerUser wrote:
>
> > The use case is simple:
> >
> > why do we use codecs at all:
> > It's easy, files will simply become incredibly large.  Stream would be
> > impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
> > device would also not be possible.  Then of course you also want the most
> > memory-efficient.
>
> There are a lot of other considerations at play. Device compatiblity, for
> example. Or licensing cost of using the codecs. HW capacity needed to
> _encode_ the videos. So no, typically you don't want the newest codecs
> with the slowest presets for any real use case.
>
> Regards,
> Marton
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Marton Balint




On Sun, 15 Aug 2021, Android PowerUser wrote:


The use case is simple:

why do we use codecs at all:
It's easy, files will simply become incredibly large.  Stream would be
impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
device would also not be possible.  Then of course you also want the most
memory-efficient.


There are a lot of other considerations at play. Device compatiblity, for 
example. Or licensing cost of using the codecs. HW capacity needed to 
_encode_ the videos. So no, typically you don't want the newest codecs 
with the slowest presets for any real use case.


Regards,
Marton
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

On 8/15/2021 1:28 PM, Android PowerUser wrote:

I forgot to mention that I am referring to the FFMPEG Android app.


A rather large omission; perhaps saying all of that up front would have made 
quite a different impression.


As for platforms, I'd say the vast majority of ffmpeg users are on more 
traditional platforms and find them much more convenient than a phone.


z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Reindl Harald




Am 15.08.21 um 23:01 schrieb Android PowerUser:

The use case is simple:

why do we use codecs at all:
It's easy, files will simply become incredibly large.  Stream would be
impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
device would also not be possible.  Then of course you also want the most
memory-efficient.  Either all or nothing.  Even on the PC, most of the
talked about would still not be on FFMPEG.  I also do it on my smartphone
because it is super easy, convenient


convenient? *lol*


and can be done from anywhere


get a life


well as incidentally, and programs on the smartphone cost less memory.
Good smartphones are also cheaper than good PCs.


a) this is nosense
b) the PC in front of me is running 365/24 since 2011


Reindl Harald  schrieb am So., 15. Aug. 2021, 22:46:




Am 15.08.21 um 22:28 schrieb Android PowerUser:

I forgot to mention that I am referring to the FFMPEG Android app.

Codec2

cannot be used there.  On the desktop, of course, yes.  Since there is no
description of how to integrate this, if that is even possible.  And AVC
and HEVC can be used natively in FFMPEG in Android and it's super easy.
And the codecs I mentioned are the best for their purposes.  In addition,
if HEVC with the extremely complicated license invoice, in which the

prices

cannot even be calculated correctly because they constantly differ
(depending on use) and a lot of companies are involved that you seem to
have to ask all questions, then that will not be a problem with VVC
because this time a network should take care that this should make this
much easier.  He-aac is also added, why not xhe-aac too?  Even if USAC

has

strict patents, I would be surprised why a station wagon with he-aac is
possible, but not the integration in FFMPEG.


i still need to see a real world usecase for video-encoding on a damned
smartphone besides "because i can"

i still need to see a real world usecase for that codecs given that H264
plays on every client, is efficient and fast


Moritz Barsnick  schrieb am So., 15. Aug. 2021, 21:47:


On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:

If FFMPEG is a collection of codecs then why are the most memory

efficient

codecs not available. The most memory-efficient waveform encoder

xhe-aac,

the most memory-efficient video codec VVC, the most memory-efficient

image

codec AVIF


What are you trying to say? Which media framework are you using instead
which supports these?


ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2

can

be used without other downloads.


"without other downloads"? If you mean libocdec2: Some other team made
an effort to create a usable library, and ffmpeg makes use of it.
Where's the problem? The same is the case for H.264 via libx264 and
HEVC via libx265. (ffmpeg has no native encoders for these either.)


So a cross-device codec collection is a good idea, but then you should

do

it right. I can't help with that, but those who can and have so far
partially done it should end it.  Otherwise it doesn't make any sense

...

right?


Creating and integrating codecs is not done easily. If you can't
contribute with code, you can surely sponsor a group of developers.

It does make sense though: HEVC is still being established, so
widespread use of VVC seems far away. Sure, a leading codec would be
nice, and I'm sure it's in the making, but it doesn't just appear
magically


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
The use case is simple:

why do we use codecs at all:
It's easy, files will simply become incredibly large.  Stream would be
impossible and send via Whatsapp (16 MB lock).  Saving on a low budget
device would also not be possible.  Then of course you also want the most
memory-efficient.  Either all or nothing.  Even on the PC, most of the
talked about would still not be on FFMPEG.  I also do it on my smartphone
because it is super easy, convenient, and can be done from anywhere, as
well as incidentally, and programs on the smartphone cost less memory.
Good smartphones are also cheaper than good PCs.

Reindl Harald  schrieb am So., 15. Aug. 2021, 22:46:

>
>
> Am 15.08.21 um 22:28 schrieb Android PowerUser:
> > I forgot to mention that I am referring to the FFMPEG Android app.
> Codec2
> > cannot be used there.  On the desktop, of course, yes.  Since there is no
> > description of how to integrate this, if that is even possible.  And AVC
> > and HEVC can be used natively in FFMPEG in Android and it's super easy.
> > And the codecs I mentioned are the best for their purposes.  In addition,
> > if HEVC with the extremely complicated license invoice, in which the
> prices
> > cannot even be calculated correctly because they constantly differ
> > (depending on use) and a lot of companies are involved that you seem to
> > have to ask all questions, then that will not be a problem with VVC
> > because this time a network should take care that this should make this
> > much easier.  He-aac is also added, why not xhe-aac too?  Even if USAC
> has
> > strict patents, I would be surprised why a station wagon with he-aac is
> > possible, but not the integration in FFMPEG.
>
> i still need to see a real world usecase for video-encoding on a damned
> smartphone besides "because i can"
>
> i still need to see a real world usecase for that codecs given that H264
> plays on every client, is efficient and fast
>
> > Moritz Barsnick  schrieb am So., 15. Aug. 2021, 21:47:
> >
> >> On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:
> >>> If FFMPEG is a collection of codecs then why are the most memory
> >> efficient
> >>> codecs not available. The most memory-efficient waveform encoder
> xhe-aac,
> >>> the most memory-efficient video codec VVC, the most memory-efficient
> >> image
> >>> codec AVIF
> >>
> >> What are you trying to say? Which media framework are you using instead
> >> which supports these?
> >>
> >>> ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2
> >> can
> >>> be used without other downloads.
> >>
> >> "without other downloads"? If you mean libocdec2: Some other team made
> >> an effort to create a usable library, and ffmpeg makes use of it.
> >> Where's the problem? The same is the case for H.264 via libx264 and
> >> HEVC via libx265. (ffmpeg has no native encoders for these either.)
> >>
> >>> So a cross-device codec collection is a good idea, but then you should
> do
> >>> it right. I can't help with that, but those who can and have so far
> >>> partially done it should end it.  Otherwise it doesn't make any sense
> ...
> >>> right?
> >>
> >> Creating and integrating codecs is not done easily. If you can't
> >> contribute with code, you can surely sponsor a group of developers.
> >>
> >> It does make sense though: HEVC is still being established, so
> >> widespread use of VVC seems far away. Sure, a leading codec would be
> >> nice, and I'm sure it's in the making, but it doesn't just appear
> >> magically.
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Reindl Harald




Am 15.08.21 um 22:28 schrieb Android PowerUser:

I forgot to mention that I am referring to the FFMPEG Android app.  Codec2
cannot be used there.  On the desktop, of course, yes.  Since there is no
description of how to integrate this, if that is even possible.  And AVC
and HEVC can be used natively in FFMPEG in Android and it's super easy.
And the codecs I mentioned are the best for their purposes.  In addition,
if HEVC with the extremely complicated license invoice, in which the prices
cannot even be calculated correctly because they constantly differ
(depending on use) and a lot of companies are involved that you seem to
have to ask all questions, then that will not be a problem with VVC
because this time a network should take care that this should make this
much easier.  He-aac is also added, why not xhe-aac too?  Even if USAC has
strict patents, I would be surprised why a station wagon with he-aac is
possible, but not the integration in FFMPEG.


i still need to see a real world usecase for video-encoding on a damned 
smartphone besides "because i can"


i still need to see a real world usecase for that codecs given that H264 
plays on every client, is efficient and fast



Moritz Barsnick  schrieb am So., 15. Aug. 2021, 21:47:


On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:

If FFMPEG is a collection of codecs then why are the most memory

efficient

codecs not available. The most memory-efficient waveform encoder xhe-aac,
the most memory-efficient video codec VVC, the most memory-efficient

image

codec AVIF


What are you trying to say? Which media framework are you using instead
which supports these?


ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2

can

be used without other downloads.


"without other downloads"? If you mean libocdec2: Some other team made
an effort to create a usable library, and ffmpeg makes use of it.
Where's the problem? The same is the case for H.264 via libx264 and
HEVC via libx265. (ffmpeg has no native encoders for these either.)


So a cross-device codec collection is a good idea, but then you should do
it right. I can't help with that, but those who can and have so far
partially done it should end it.  Otherwise it doesn't make any sense ...
right?


Creating and integrating codecs is not done easily. If you can't
contribute with code, you can surely sponsor a group of developers.

It does make sense though: HEVC is still being established, so
widespread use of VVC seems far away. Sure, a leading codec would be
nice, and I'm sure it's in the making, but it doesn't just appear
magically.

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
I forgot to mention that I am referring to the FFMPEG Android app.  Codec2
cannot be used there.  On the desktop, of course, yes.  Since there is no
description of how to integrate this, if that is even possible.  And AVC
and HEVC can be used natively in FFMPEG in Android and it's super easy.
And the codecs I mentioned are the best for their purposes.  In addition,
if HEVC with the extremely complicated license invoice, in which the prices
cannot even be calculated correctly because they constantly differ
(depending on use) and a lot of companies are involved that you seem to
have to ask all questions, then that will not be a problem with VVC
because this time a network should take care that this should make this
much easier.  He-aac is also added, why not xhe-aac too?  Even if USAC has
strict patents, I would be surprised why a station wagon with he-aac is
possible, but not the integration in FFMPEG.

Moritz Barsnick  schrieb am So., 15. Aug. 2021, 21:47:

> On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:
> > If FFMPEG is a collection of codecs then why are the most memory
> efficient
> > codecs not available. The most memory-efficient waveform encoder xhe-aac,
> > the most memory-efficient video codec VVC, the most memory-efficient
> image
> > codec AVIF
>
> What are you trying to say? Which media framework are you using instead
> which supports these?
>
> > ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2
> can
> > be used without other downloads.
>
> "without other downloads"? If you mean libocdec2: Some other team made
> an effort to create a usable library, and ffmpeg makes use of it.
> Where's the problem? The same is the case for H.264 via libx264 and
> HEVC via libx265. (ffmpeg has no native encoders for these either.)
>
> > So a cross-device codec collection is a good idea, but then you should do
> > it right. I can't help with that, but those who can and have so far
> > partially done it should end it.  Otherwise it doesn't make any sense ...
> > right?
>
> Creating and integrating codecs is not done easily. If you can't
> contribute with code, you can surely sponsor a group of developers.
>
> It does make sense though: HEVC is still being established, so
> widespread use of VVC seems far away. Sure, a leading codec would be
> nice, and I'm sure it's in the making, but it doesn't just appear
> magically.
>
> Cheers,
> Moritz
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Moritz Barsnick
On Sun, Aug 15, 2021 at 21:28:12 +0200, Android PowerUser wrote:
> If FFMPEG is a collection of codecs then why are the most memory efficient
> codecs not available. The most memory-efficient waveform encoder xhe-aac,
> the most memory-efficient video codec VVC, the most memory-efficient image
> codec AVIF

What are you trying to say? Which media framework are you using instead
which supports these?

> ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2 can
> be used without other downloads.

"without other downloads"? If you mean libocdec2: Some other team made
an effort to create a usable library, and ffmpeg makes use of it.
Where's the problem? The same is the case for H.264 via libx264 and
HEVC via libx265. (ffmpeg has no native encoders for these either.)

> So a cross-device codec collection is a good idea, but then you should do
> it right. I can't help with that, but those who can and have so far
> partially done it should end it.  Otherwise it doesn't make any sense ...
> right?

Creating and integrating codecs is not done easily. If you can't
contribute with code, you can surely sponsor a group of developers.

It does make sense though: HEVC is still being established, so
widespread use of VVC seems far away. Sure, a leading codec would be
nice, and I'm sure it's in the making, but it doesn't just appear
magically.

Cheers,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Carl Zwanzig

Well. since you asked.

On 8/15/2021 12:28 PM, Android PowerUser wrote:

If FFMPEG is a collection of codecs then why are the most memory efficient
codecs not available. 


Could be than they're not freely available or license-compatible with 
ffmpeg? (Quite likely, actually.) Or that those codecs are not the best for 
the actual purpose (the output, not the process).



If the best codecs for storage efficiency are not there, and thus
probably the most important codecs, why use FFMPEG at all?
Because for many people it does what's needed ("most important codecs"? like 
mpeg2, h264/265, jpeg, etc).



And it's not even useful for text. You are better served with 7zip
or xz.  


zip/g-zip/7-zip are _file_ compressors, not media codecs or muxers. (Text? 
That's not a "media" format) And many uses are well-fulfilled by the 
codecs/formats/containers that ffmpeg does support.



So a cross-device codec collection is a good idea, but then you should do
it right. I can't help with that, but those who can and have so far
partially done it should end it.  


What is "right" in this case? Sure, ffmpeg has its shortcomings, but many 
people will never run into them.



Otherwise it doesn't make any sense ... right?


Wrong. Anyway, anonymous complaints that can't or won't help with fixing 
perceived deficiencies are worth the paper they're printed on. Add to that a 
misunderstanding of ffmpeg's purpose and license (see 
https://ffmpeg.org/about.html).


Later,

z!
just a usually-happy ffmpeg user
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Why FFMPEG?

2021-08-15 Thread Android PowerUser
If FFMPEG is a collection of codecs then why are the most memory efficient
codecs not available. The most memory-efficient waveform encoder xhe-aac,
the most memory-efficient video codec VVC, the most memory-efficient image
codec AVIF (VVC does not seem to offer any image coding options, e.g. via
ISOBMFF as in HEIF), not even the most memory-efficient vocoder Codec2 can
be used without other downloads. If the best codecs for storage efficiency
are not there, and thus probably the most important codecs, why use FFMPEG
at all? And it's not even useful for text. You are better served with 7zip
or xz.  And with that I think I got through all the media ...

So a cross-device codec collection is a good idea, but then you should do
it right. I can't help with that, but those who can and have so far
partially done it should end it.  Otherwise it doesn't make any sense ...
right?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Andriy Gelman
On Sun, 15 Aug 2021 at 10:15, Adam Nielsen  wrote:

> > > I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on
> > > a Raspberry Pi.  This is working well, except I am unable to set any
> > > encoder options such as bitrate, as I cannot find how to tell ffmpeg to
> > > set V4L2 control options.
> >
> > You can use -b:v option to set the bitrate, i.e.
> > ./ffmpeg -i input -codec:v h264_v4l2m2m -b:v 2M out.mp4
> >
> > There is a patch for documentation that I need to update. It may be
> useful
> > to you:
> >
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200117034211.12142-1-andriy.gel...@gmail.com/
>
> Ah excellent, many thanks for that, that does work for setting the
> bitrate.
>
> Unfortunately the most important option I need to change is the
> "repeat_sequence_header" control, which I need to set to 1 as the
> default of 0 means if you miss the initial frame of the video, you can
> never join the stream mid-way through, as ffplay just produces heaps of
> "non-existing PPS 0 referenced" messages and never opens the video
> window.
>
>

> Does this option have an equivalent to set on the ffmpeg command line,
> now v4l2-ctl will no longer work?


Not yet.
Can you test the attached patch, please? It will init the
repeat_sequence_header option to 1.

Thanks,
Andriy
diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index f644b50133..4b2ca7bdf4 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -197,6 +197,7 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)
 v4l2_set_ext_ctrl(s, MPEG_CID(BITRATE) , avctx->bit_rate, "bit rate", 1);
 v4l2_set_ext_ctrl(s, MPEG_CID(FRAME_RC_ENABLE), 1, "frame level rate control", 0);
 v4l2_set_ext_ctrl(s, MPEG_CID(GOP_SIZE), avctx->gop_size,"gop size", 1);
+v4l2_set_ext_ctrl(s, MPEG_CID(REPEAT_SEQ_HEADER), 1,"repeat parameter sets", 1);
 
 av_log(avctx, AV_LOG_DEBUG,
 "Encoder Context: id (%d), profile (%d), frame rate(%d/%d), number b-frames (%d), "
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Adam Nielsen via ffmpeg-user
> > I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on
> > a Raspberry Pi.  This is working well, except I am unable to set any
> > encoder options such as bitrate, as I cannot find how to tell ffmpeg to
> > set V4L2 control options.
> 
> You can use -b:v option to set the bitrate, i.e.
> ./ffmpeg -i input -codec:v h264_v4l2m2m -b:v 2M out.mp4
> 
> There is a patch for documentation that I need to update. It may be useful
> to you:
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200117034211.12142-1-andriy.gel...@gmail.com/

Ah excellent, many thanks for that, that does work for setting the
bitrate.

Unfortunately the most important option I need to change is the
"repeat_sequence_header" control, which I need to set to 1 as the
default of 0 means if you miss the initial frame of the video, you can
never join the stream mid-way through, as ffplay just produces heaps of
"non-existing PPS 0 referenced" messages and never opens the video
window.

Does this option have an equivalent to set on the ffmpeg command line,
now v4l2-ctl will no longer work?

Thanks again,
Adam.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Andriy Gelman
Hi,

On Sun, 15. Aug 18:32, Adam Nielsen via ffmpeg-user wrote:
> Hi all,
> 
> I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on
> a Raspberry Pi.  This is working well, except I am unable to set any
> encoder options such as bitrate, as I cannot find how to tell ffmpeg to
> set V4L2 control options.
> 

You can use -b:v option to set the bitrate, i.e.
./ffmpeg -i input -codec:v h264_v4l2m2m -b:v 2M out.mp4

There is a patch for documentation that I need to update. It may be useful
to you:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200117034211.12142-1-andriy.gel...@gmail.com/

-- 
Andriy
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] How to set V4L2 M2M codec options like bitrate

2021-08-15 Thread Adam Nielsen via ffmpeg-user
Hi all,

I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on
a Raspberry Pi.  This is working well, except I am unable to set any
encoder options such as bitrate, as I cannot find how to tell ffmpeg to
set V4L2 control options.

When I run ffmpeg, it says:

  [h264_v4l2m2m @ 0x5d1180] Using device /dev/video11

And if I look at that device, there are a number of encoding options
available:

  # v4l2-ctl -d /dev/video11 -l
video_bitrate 0x009909cf (int): min=25000 max=2500 step=25000 
default=1000 value=1000
  h264_i_frame_period 0x00990a66 (int): min=0 max=2147483647 step=1 
default=60 value=60
  [...]

The problem is that I cannot use v4l2-ctl to set these values, as the
values only remain set until the file handle is closed, as per the
docs[1]:

  Memory-to-memory devices function as a shared resource: you can open
  the video node multiple times, each application setting up their own
  properties that are local to the file handle, and each can use it
  independently from the others. The driver will arbitrate access to
  the hardware and reprogram it whenever another file handler gets
  access. This is different from the usual video node behavior where
  the video properties are global to the device (i.e. changing
  something through one file handle is visible through another file
  handle).

So v4l2-ctl can set the values but as soon as it closes the file handle
the values are lost, and ffmpeg never sees them as it has a different
file handle (i.e. an independent M2M instance to the one v4l2-ctl is
using).

This means that only ffmpeg is able to set the V4L2 controls as it is
the only one that has the open file handle.

I can't see anything in the docs about how to pass V4L2 control values
to ffmpeg, so is this something I have missed, or is it a feature
missing from ffmpeg, for now limiting the usefulness of M2M hardware
acceleration?

Many thanks,
Adam.

[1] 
https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/dev-mem2mem.html
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".