Re: [FFmpeg-user] field_sequence from H.262

2024-05-24 Thread Andrew Randrianasulu
пт, 24 мая 2024 г., 20:16 Mark Filipak :

> This is from H.262.
>   ___
> |   |
> | field_sequence – A 3-bit integer which defines the number of the  |
> | field in the eight field sequence used in PAL systems or the four |
> | field sequence used in NTSC systems as defined in the Table 6-15. |
> |   |
> | Table 6-15 – Definition of field_sequence |
> | Field sequence  Frame  Field  |
> |  000  1  1|
> |  001  1  2|
> |  010  2  3|
> |  011  2  4|
> |  100  3  5|
> |  101  3  6|
> |  110  4  7|
> |  111  4  8|
> |___|
>
> That is a quote of the complete section.
>
> Does anyone know what MPEG is trying to say?
>



my guess: telecine pattern?

>
> --Mark.
> ___
> 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] Correct configuration for Mac Pro 6, 1 AMD FirePro D500s?

2024-05-24 Thread Andrew Randrianasulu
пт, 24 мая 2024 г., 12:07 Scott Lutz :

> I have been trying for a couple of days to leverage the h264_videotoolbox
> hardware acceleration capabilities of ffmpeg on dual AMD FirePro D500s of
> my Mac Pro 6,1, but without success.


Does hw acceleration working anywhere in macos?

google put this short thread first

https://discussions.apple.com/thread/8559293?sortBy=best

there is also forum post about some light hacking for getting hw accel on
AMD Polaris+ GPU but this seems to be few gens above VCN 1.0 / VCE 1.0
architecture of your FirePRO.

https://forums.macrumors.com/threads/activate-amd-hardware-acceleration.2180095/

https://www.techpowerup.com/gpu-specs/firepro-d500.c2556

Does it work under linux? :)

If you will try with Linux please note that you need amd firmware package
and may be switching kernel driver between radeon and amdgpu ... :

https://discourse.nixos.org/t/how-to-driver-setup-mac-pro-2013-firepro-d500-and-intel-hd-graphics-520-for-wayland-sway/34620/2

 "radeon.si_support=0" "amdgpu.si_support=1" part of kernel command line
(not sure, amdgpu might not give you  especially hw encoder on such old
card, but in general  this gen of GPU was supported for h264 encoding via
mesa's vaapi state tracker. )

I do not think hw supports HEVC encoding



Here is an example of the output I've
> been getting most recently:
>
> ffmpeg -i infile.mkv -s hd720 -c:v h264_videotoolbox  -c:a aac outfile.mkv
>
> [h264_videotoolbox @ 0x7f8494b06b40] Error: cannot create compression
> session: -12903
> [h264_videotoolbox @ 0x7f8494b06b40] Try -allow_sw 1. The hardware encoder
> may be busy, or not supported.
> [vost#0:0/h264_videotoolbox @ 0x7f8494b074c0] Error while opening encoder -
> maybe incorrect parameters such as bit_rate, rate, width or height.
> [vf#0:0 @ 0x7f8493f065c0] Error sending frames to consumers: Generic error
> in an external library
> [vf#0:0 @ 0x7f8493f065c0] Task finished with error code: -542398533
> (Generic error in an external library)
> [vf#0:0 @ 0x7f8493f065c0] Terminating thread with return code -542398533
> (Generic error in an external library)
> [vost#0:0/h264_videotoolbox @ 0x7f8494b074c0] Could not open encoder before
> EOF
> [vost#0:0/h264_videotoolbox @ 0x7f8494b074c0] Task finished with error
> code: -22 (Invalid argument)
> [vost#0:0/h264_videotoolbox @ 0x7f8494b074c0] Terminating thread with
> return code -22 (Invalid argument)
> [out#0/matroska @ 0x7f8483f04080] Nothing was written into output file,
> because at least one of its streams received no packets.
>
> Possibly due to the age of these machines, there isn't a load of info on
> the wider interwebs, so I was wondering if anyone has any suggestions on
> how to make this work, ideally for both x264 and x265?
>
> Thanks!
> Scott
> ___
> 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] ffmpeg wav lossless to youtube mov?

2024-05-23 Thread Andrew Randrianasulu
пт, 24 мая 2024 г., 01:37 Reindl Harald :

>
>
> Am 24.05.24 um 00:34 schrieb Zathras Yes:
> > Yes, I know that. Just add a picture and it's fine.
>
> MOV with PCM/WAV is never fine
>

from compatibility with older software? yes. Youtube probably does not want
to serve relatively huge lossless uncompressed audio files, even if that
was perfectly possible.

but for experimenting you can use ffbrobe on wav file and try to put -c:a
pcm_s32le for example if ffprobe indicated this format for your wav.




> > Please don't repeat all this over and over, because it is tiresome.
>
> if you won't be an idiot you would understand it by telling once
>
> > For this now, I will not further answer to you!
>
> i hope so
>
> > On Fri, May 24, 2024 at 12:32 AM Reindl Harald 
> > wrote:
> >
> >>
> >>
> >> Am 24.05.24 um 00:29 schrieb Zathras Yes:
> >>> Supported file formats:
> >>>
> >>>  -
> >>>  - PCM audio in WAV container
> >>>
> >>>
> >>> So, it seems possible to put a wav into a youtube-video, right?
> >>>
> >>> How to do it?
> >>
> >> https://support.google.com/youtube/troubleshooter/2888402?hl=en
> >>
> >> Note: Audio files, like MP3, WAV, or PCM files, can’t be uploaded to
> >> create a YouTube video. You can use video editing software to convert
> >> your audio file to a video. Audio files can only be uploaded as extra
> >> languages for your video.
>
> ___
> 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] ffmpeg wav lossless to youtube mov?

2024-05-23 Thread Andrew Randrianasulu
пт, 24 мая 2024 г., 01:00 Reindl Harald :

>
>
> Am 23.05.24 um 23:44 schrieb Zathras Yes:
> > And yes, a conversion of the soundfiles is not wanted, exactly.
> >
> > In a picky manner of speaking, it is a conversion of one file to another,
> > but let''s not go into this nitpicking here.
>
> again: "-acodec copy" is NOT a conversion - you are pumping a
> unsupported audio-stream into a container with the result of an invalid
> file
>
> this is not a ffmpeg problem - it's PEBCAK
>


/* ISO/IEC 23003-5 integer formats */
{ AV_CODEC_ID_PCM_S16BE,   MOV_MP4_IPCM_TAG  },
{ AV_CODEC_ID_PCM_S16LE,   MOV_MP4_IPCM_TAG  },
{ AV_CODEC_ID_PCM_S24BE,   MOV_MP4_IPCM_TAG  },
{ AV_CODEC_ID_PCM_S24LE,   MOV_MP4_IPCM_TAG  },
{ AV_CODEC_ID_PCM_S32BE,   MOV_MP4_IPCM_TAG  },
{ AV_CODEC_ID_PCM_S32LE,   MOV_MP4_IPCM_TAG  },
/* ISO/IEC 23003-5 floating-point formats */
{ AV_CODEC_ID_PCM_F32BE,   MOV_MP4_FPCM_TAG  },
{ AV_CODEC_ID_PCM_F32LE,   MOV_MP4_FPCM_TAG  },
{ AV_CODEC_ID_PCM_F64BE,   MOV_MP4_FPCM_TAG  },
{ AV_CODEC_ID_PCM_F64LE,   MOV_MP4_FPCM_TAG  },

from libavformat/movenc.c

so I guess it should be muxable, but may be yt  not really likes increased
total bitrate in this case, and whole thing (vid + aud) served now as  many
little pieces mostly ...? I think ALAC also exist as experimental (strict
-2) codec in ffmpeg.


>
> ___
> 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] ffmpeg 6.1.1 fails to compile with mingw-w64 gcc 14

2024-05-17 Thread Andrew Randrianasulu
пт, 17 мая 2024 г., 20:02 Reindl Harald :

>
>
> Am 17.05.24 um 17:58 schrieb Biswapriyo Nath:
> >> what about trying the latest version instead 6.1.1 from last year when
> >> you use a compiler even newer than on Fedora 39?
> >
> > The same issue was reported with 7.0 release
> > https://trac.ffmpeg.org/ticket/11004. I am using msys2/mingw-w64
> > toolchain to compile ffmpeg. I guess the same compiler error should
> > happen with any other gcc 14 irrespective of software distribution.
>
> maybe - but it's nonsense to start a topic with an older version - the
> first thing you have to do in case of compiler errors is to try the
> latest version
>
> why?
>
> because it maybe already fixed and you waste everyobdys time playing
> yround and asking questions about outdated software
> ___
> 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".
>


пт, 17 мая 2024 г., 20:02 Reindl Harald :

>
>
> Am 17.05.24 um 17:58 schrieb Biswapriyo Nath:
> >> what about trying the latest version instead 6.1.1 from last year when
> >> you use a compiler even newer than on Fedora 39?
> >
> > The same issue was reported with 7.0 release
> > https://trac.ffmpeg.org/ticket/11004. I am using msys2/mingw-w64
> > toolchain to compile ffmpeg. I guess the same compiler error should
> > happen with any other gcc 14 irrespective of software distribution.
>
> maybe - but it's nonsense to start a topic with an older version - the
> first thing you have to do in case of compiler errors is to try the
> latest version
>
> why?
>
> because it maybe already fixed and you waste everyobdys time playing
> yround and asking questions about outdated software
>


But regressions exists, so I usually try with versions I have at hand, if
it fails - with newer and sometimes older versions too ...




___
> 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] How to play stereo stream as stereo on Windows 10

2024-03-15 Thread Andrew Randrianasulu
пт, 15 мар. 2024 г., 11:37 Mice Tecumseh via ffmpeg-user <
ffmpeg-user@ffmpeg.org>:

> Hello;
>
> I stream stereo FLAC from Ubuntu 22.04 with command:
>
> ffmpeg -f pulse -i "remote.monitor" -acodec pcm_s16le -ar 48000 -f s16le
> -ac 2 "udp://192.168.1.99:18181"
> and play this stereo stream correctly on macOS with this command:
>
> ffplay -nodisp -acodec -ac 2 pcm_s16le -ar 48000 -f s24le -i udp://
> 192.168.1.100:18181?listen=1
> But if I try to play this stereo strem (with the same command) on Windows
> 10 ffmpge says:
>
> "Failed to set value '2' for option 'ac': Option not found" - and plays
> only one channel mono
>

may be put "-ac 2" part before "-acodec pcm_s16le" part?


> I will also add that when I play the same FLAC file locally in this
> Windows 10 installation both channels plays correctly in stereo.
>
> Would you help me please how to convince ffmpge (ffplay) to play that
> stereo stream as stereo on Windows 10.
>
> Kind regards
> Mice
> ___
> 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] Packet corrupt on cut, notice on concat

2024-02-19 Thread Andrew Randrianasulu
вт, 20 февр. 2024 г., 05:02 amindfv--- via ffmpeg-user <
ffmpeg-user@ffmpeg.org>:

> On Mon, Feb 19, 2024 at 08:49:14PM +0100, Paul B Mahol wrote:
>
> > Best to create minimal reproducible usecase with all required files to
> reproduce it
>
> By the way, this isn't just for reporting on Trac. For most recipients of
> these messages (i.e. the people subscribed here) to get anything out of
> them, we need something to hold on to.
>
> For example, "Based on the docs here (link), I'd expect -ss to produce the
> same output whether provided as an input argument or an output argument.
> Here's the command I ran, and here's an example file that produces
> different results."
>
> Without a reproducer, it's really hard for one's eyes not to glaze over
> (and I say this as someone who's actually taking the time to read emails
> about a stranger not getting the results they wanted from ffmpeg).
>
> Take the most extreme example:
>
> Person A: "I ran `ffmpeg -i foo.avi foo.mp4` with ffmpeg version X and it
> crashed."
> Person B: "I tried the same command with version X and didn't see a crash.
> Can you send foo.avi?"
> Person A: "No."
>


Mark, does any (bluray iso) file form 3d test clips section of Kodi wiki
exhibit same problem at truncation/joining as your main file?

https://kodi.wiki/view/Samples (files on google drive)



> If you could make a real reproducer, you'd get a lot more people looking
> into your problem. Pages and pages of information without a basic
> reproducer is of limited use to most people.
>
> You've really got to find a way to cut the excess out of your giant file.
> ffmpeg actually provides a lot of ways to chop files up!
>
> Tom
> ___
> 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] amr_nb in mp4 container?

2024-02-15 Thread Andrew Randrianasulu
On Thu, Feb 15, 2024 at 12:00 PM Ferdi Scholten  wrote:
>
> чт, 15 февр. 2024 г., 11:00 Andrew Randrianasulu :
> >>
> >> чт, 15 февр. 2024 г., 10:39 Ferdi Scholten:
> >>
> >>> The AMR audio format is not specified as a valid audio format for the
> >>> mp4 container (see *ISO
> >>> <
> >>> https://en.wikipedia.org/wiki/International_Organization_for_Standardization>/IEC
> >>>
> >>> <https://en.wikipedia.org/wiki/International_Electrotechnical_Commission>
> >>>
> >>> 14496-14:2003)*. So managing to get it in does not mean it can be played
> >>> or transcoded by other software that conforms to the mp4 specifications.
> >>>
> >>> Should you want it to be registered as such, you can do that here:
> >>> https://mp4ra.org/request
> >>> You can find all officially supported codecs and other streams on that
> >>> site as well.
> >>>
> >> not sure if individuals can do anything about it?
> >>
> >> found this thread from 6 years ago
> >>
> >> https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-May/211446.html
> >>
> >
> > anyway it does not mux correctly even in 3gp:
> >
> >
> > ffmpeg -i
> > /data/data/com.termux/files/home/storage/dcim/OpenCamera/VID_20240215_064913.mp4
> > -c:a copy -c:v copy vid-test.3gp
> >ffmpeg version 6.1.1 Copyright (c) 2000-2023 the
> > FFmpeg developers
> >   built with Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d)
> > clang version 17.0.2 (
> > https://android.googlesource.com/toolchain/llvm-project
> > d9f89f4d16663d5012e5c09495f3b30ece3d2362)configuration: --arch=aarch64
> > --as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang
> > --cxx=aarch64-linux-android-clang++ --nm=llvm-nm
> > --pkg-config=/home/builder/.termux-build/_cache/android-r26b-api-24-v1/bin/pkg-config
> > --strip=llvm-strip --cross-prefix=aarch64-linux-android- --disable-indevs
> > --disable-outdevs --enable-indev=lavfi --disable-static --disable-symver
> > --enable-cross-compile --enable-gnutls --enable-gpl --enable-version3
> > --enable-jni --enable-lcms2 --enable-libaom --enable-libass
> > --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgme
> > --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> > --enable-libopenmpt --enable-libopus --enable-librav1e --enable-libsoxr
> > --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora
> > --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc
> > --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
> > --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
> > --enable-mediacodec --enable-opencl --enable-shared
> > --prefix=/data/data/com.termux/files/usr --target-os=android
> > --extra-libs=-landroid-glob --disable-vulkan --enable-neon
> > --disable-libfdk-aac
> >
> > libavutil  58. 29.100 / 58. 29.100
> >
> >   libavcodec 60. 31.102 / 60. 31.102
> >
> > libavformat60. 16.100 / 60. 16.100
> >
> >libavdevice60.  3.100 / 60.  3.100
> >
> > libavfilter 9. 12.100 /  9. 12.100
> >
> >   libswscale  7.  5.100 /  7.  5.100
> >
> >   libswresample   4. 12.100 /  4. 12.100
> >
> >libpostproc57.  3.100 / 57.  3.100
> >
> >Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> > '/data/data/com.termux/files/home/storage/dcim/OpenCamera/VID_20240215_064913.mp4':
> >
> >   Metadata:
> >
> > major_brand : mp42
> >
> > minor_version   : 0
> >
> > compatible_brands: isommp42
> >
> >   creation_time   : 2024-02-15T03:54:16.00Z
> >  com.android.version: 11
> >Duration: 00:05:02.04, start:
> > 0.00, bitrate: 585 kb/s
> >Stream #0:0[0x1](eng): Video: h264 (Constrained Baseline) (avc1 /
> > 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x480,
> > 562 kb/s, SAR 1:1 DAR 4:3, 19.93 fps, 60 tbr, 90k tbn (default)
> >
> >
> >Metadata:
> >  creation_time   : 2024-02-15T03:54:16.00Z
> >  handler_name:
> > VideoHandle
> >vendor_id   : [0][0][0][0]
> >
> > Stream #0:1[0x2](eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono,
> > fltp, 12 kb/s (default) Metadata:
> >

Re: [FFmpeg-user] amr_nb in mp4 container?

2024-02-15 Thread Andrew Randrianasulu
чт, 15 февр. 2024 г., 11:00 Andrew Randrianasulu :

>
>
> чт, 15 февр. 2024 г., 10:39 Ferdi Scholten :
>
>> The AMR audio format is not specified as a valid audio format for the
>> mp4 container (see *ISO
>> <
>> https://en.wikipedia.org/wiki/International_Organization_for_Standardization>/IEC
>>
>> <https://en.wikipedia.org/wiki/International_Electrotechnical_Commission>
>>
>> 14496-14:2003)*. So managing to get it in does not mean it can be played
>> or transcoded by other software that conforms to the mp4 specifications.
>>
>> Should you want it to be registered as such, you can do that here:
>> https://mp4ra.org/request
>> You can find all officially supported codecs and other streams on that
>> site as well.
>>
>
> not sure if individuals can do anything about it?
>
> found this thread from 6 years ago
>
> https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-May/211446.html
>


anyway it does not mux correctly even in 3gp:


ffmpeg -i
/data/data/com.termux/files/home/storage/dcim/OpenCamera/VID_20240215_064913.mp4
-c:a copy -c:v copy vid-test.3gp
  ffmpeg version 6.1.1 Copyright (c) 2000-2023 the
FFmpeg developers
 built with Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d)
clang version 17.0.2 (
https://android.googlesource.com/toolchain/llvm-project
d9f89f4d16663d5012e5c09495f3b30ece3d2362)configuration: --arch=aarch64
--as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang
--cxx=aarch64-linux-android-clang++ --nm=llvm-nm
--pkg-config=/home/builder/.termux-build/_cache/android-r26b-api-24-v1/bin/pkg-config
--strip=llvm-strip --cross-prefix=aarch64-linux-android- --disable-indevs
--disable-outdevs --enable-indev=lavfi --disable-static --disable-symver
--enable-cross-compile --enable-gnutls --enable-gpl --enable-version3
--enable-jni --enable-lcms2 --enable-libaom --enable-libass
--enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgme
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenmpt --enable-libopus --enable-librav1e --enable-libsoxr
--enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora
--enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-mediacodec --enable-opencl --enable-shared
--prefix=/data/data/com.termux/files/usr --target-os=android
--extra-libs=-landroid-glob --disable-vulkan --enable-neon
--disable-libfdk-aac

libavutil  58. 29.100 / 58. 29.100

 libavcodec 60. 31.102 / 60. 31.102

   libavformat60. 16.100 / 60. 16.100

  libavdevice60.  3.100 / 60.  3.100

   libavfilter 9. 12.100 /  9. 12.100

 libswscale  7.  5.100 /  7.  5.100

 libswresample   4. 12.100 /  4. 12.100

  libpostproc57.  3.100 / 57.  3.100

  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/data/data/com.termux/files/home/storage/dcim/OpenCamera/VID_20240215_064913.mp4':

 Metadata:

major_brand : mp42

minor_version   : 0

compatible_brands: isommp42

 creation_time   : 2024-02-15T03:54:16.00Z
com.android.version: 11
  Duration: 00:05:02.04, start:
0.00, bitrate: 585 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x480,
562 kb/s, SAR 1:1 DAR 4:3, 19.93 fps, 60 tbr, 90k tbn (default)


  Metadata:
creation_time   : 2024-02-15T03:54:16.00Z
handler_name:
VideoHandle
  vendor_id   : [0][0][0][0]

Stream #0:1[0x2](eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono,
fltp, 12 kb/s (default) Metadata:
  creation_time   :
2024-02-15T03:54:16.00Z
  handler_name: SoundHandle
  vendor_id   : [0][0][0][0]
   [3gp @ 0xb4789b073d70]
track 1: codec frame size is not set
Output #0, 3gp, to 'vid-test.3gp':

Metadata:

major_brand : mp42

minor_version   : 0

compatible_brands: isommp42
com.android.version: 11
encoder :
Lavf60.16.100
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 /
0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x480
[SAR 1:1 DAR 4:3], q=2-31, 562 kb/s, 19.93 fps, 60 tbr, 90k tbn (default)


Metadata:

 creation_time   : 2024-02-15T03:54:16.00Z

handler_name: VideoHandle

 vendor_id   : [0][0][0][0]

Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, fltp,
12 kb/s (default)  Metadata:
 

Re: [FFmpeg-user] amr_nb in mp4 container?

2024-02-15 Thread Andrew Randrianasulu
чт, 15 февр. 2024 г., 10:39 Ferdi Scholten :

> The AMR audio format is not specified as a valid audio format for the
> mp4 container (see *ISO
> <
> https://en.wikipedia.org/wiki/International_Organization_for_Standardization>/IEC
>
> 
> 14496-14:2003)*. So managing to get it in does not mean it can be played
> or transcoded by other software that conforms to the mp4 specifications.
>
> Should you want it to be registered as such, you can do that here:
> https://mp4ra.org/request
> You can find all officially supported codecs and other streams on that
> site as well.
>

not sure if individuals can do anything about it?

found this thread from 6 years ago

https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2017-May/211446.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".
>
___
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] amr_nb in mp4 container?

2024-02-14 Thread Andrew Randrianasulu
I managed to make video with amr_nb codec  in openCamera (android 11)


mediainfo /dev/shm/VID_20240215_064913.mp4
General
Complete name: /dev/shm/VID_20240215_064913.mp4
Format   : MPEG-4
Format profile   : Base Media / Version 2
Codec ID : mp42 (isom/mp42)
File size: 21.1 MiB
Duration : 5 min 2 s
Overall bit rate mode: Variable
Overall bit rate : 586 kb/s
Frame rate   : 19.929 FPS
Encoded date : 2024-02-15 03:54:16 UTC
Tagged date  : 2024-02-15 03:54:16 UTC
com.android.version  : 11

Video
ID   : 1
Format   : AVC
Format/Info  : Advanced Video Codec
Format profile   : Constrained Baseline@L2
Format settings  : 1 Ref Frames
Format settings, CABAC   : No
Format settings, Reference frames: 1 frame
Format settings, GOP : M=1, N=30
Codec ID : avc1
Codec ID/Info: Advanced Video Coding
Duration : 5 min 2 s
Source duration  : 5 min 1 s
Bit rate : 562 kb/s
Width: 640 pixels
Height   : 480 pixels
Display aspect ratio : 4:3
Frame rate mode  : Variable
Frame rate   : 19.929 FPS
Minimum frame rate   : 9.998 FPS
Maximum frame rate   : 30.010 FPS
Standard : Component
Color space  : YUV
Chroma subsampling   : 4:2:0
Bit depth: 8 bits
Scan type: Progressive
Bits/(Pixel*Frame)   : 0.092
Stream size  : 20.2 MiB (96%)
Source stream size   : 20.2 MiB (96%)
Title: VideoHandle
Language : English
Encoded date : 2024-02-15 03:54:16 UTC
Tagged date  : 2024-02-15 03:54:16 UTC
Color range  : Limited
Color primaries  : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients  : BT.601
mdhd_Duration: 302037
Codec configuration box  : avcC

Audio
ID   : 2
Format   : AMR
Format/Info  : Adaptive Multi-Rate
Format profile   : Narrow band
Codec ID : samr
Duration : 5 min 2 s
Bit rate mode: Variable
Bit rate : 12.8 kb/s
Channel(s)   : 1 channel
Sampling rate: 8 000 Hz
Bit depth: 13 bits
Stream size  : 472 KiB (2%)
Title: SoundHandle
Writing library  :
Language : English
Encoded date : 2024-02-15 03:54:16 UTC
Tagged date  : 2024-02-15 03:54:16 UTC




ffmpeg (both 4.4.4 on Slackware 15.0 i586 and 6.1.1 on aarch64 Termux)
refuse to copy audio stream:

ffmpeg -i  /dev/shm/VID_20240215_064913.mp4 -c:a copy -c:v copy /dev/shm/ccc.mp4
ffmpeg version 4.4.4 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib
--docdir=/usr/doc/ffmpeg-4.4.4/html --mandir=/usr/man --disable-debug
--enable-shared --disable-static --enable-gpl --enable-version3
--enable-avresample --arch=i586 --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-gnutls
--enable-libass --enable-libbluray --enable-libcdio --enable-frei0r
--enable-libgsm --enable-openal --enable-libopus --enable-librtmp
--enable-libsnappy --enable-libspeex --enable-libssh
--enable-libtheora --enable-libtwolame --enable-libv4l2
--enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid
--enable-libmp3lame --enable-opencl --enable-opengl
--enable-libopenjpeg --disable-libpulse --enable-libsmbclient
--enable-libsvtav1 --enable-libxml2 --enable-librsvg --enable-libdrm
--enable-libaom --enable-libdav1d --enable-libsoxr --enable-libzimg

[FFmpeg-user] where ffmpeg parses mpeg audio headers?

2024-02-01 Thread Andrew Randrianasulu
I was looking into https://trac.ffmpeg.org/ticket/1258#comment:12
(mpeg2 multichannel audio in HDV) and reading documents linked  in
this ticket.

I still have very vague understanding  on where ffmpeg audio (PES?)
headers read by ffmpeg

somewhere in ffmpeg/libavformat/mpeg.c ?

According to this picture https://ericdevos.be/kask/2BA/2BA
videoformaten/MPEG-2 description.htm

Figure 2 -- Structure of an MPEG-2 Audio block of data

multichannel extension can be carried (partially!) in IEC 11172-3
layer II frame. You just need to search in very beginning of ancillary
data for Multichannel header.

Extension stream,  touched in more details in  "An Implementation of the
MPEG—2 Audio Decoding Specification by Chad Mikkelson" (p. 38) sounds a
bit more mysterious to me: mc-capable encoder from dist10 [1] output
extension stream as separate file only their decoder can read. I
wonder how it must be interleaved in real system mpeg stream? And how
it may work in transport stream (as used in HDV) ?

[1] -  https://github.com/Randrianasulu/iso-dist10 (hopefully read
sox-generated uncompressed multichannel 16 bit AIFF correctly).
___
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] LPCM in DVD - 44.1/32khz sample rate?

2024-01-21 Thread Andrew Randrianasulu
On Sun, Jan 21, 2024 at 2:47 PM Paul B Mahol  wrote:
>
> /* no traces of 44100 and 32000Hz in any commercial software or player */

well, but mpv (and vlc?) supports it 

>
> On Sun, Jan 21, 2024 at 3:44 AM Andrew Randrianasulu <
> randrianas...@gmail.com> wrote:
>
> > According to this source (vlc) lpcm dvd audio supports lower frequencies
> > like 44100/32000 hz - useful for direct dv transcoding for example 
> >
> > https://github.com/videolan/vlc/blob/master/modules/codec/lpcm.c
> >
> > see lines 524, 608
> >
> > Does this mean that libavcodec/pcm-dvdenc.c can be trivially extended to
> > support those ?
> >
> > Same question for mplex. (it only supports 48/96 khz lpcm audio).
> >
> > I also found this table via mjpeg-users archives:
> >
> > https://dvd.sourceforge.net/dvdinfo/lpcm.html
> >
> > it lists dynamic range/gain (?) setting equations.
> >
> > Not mplex nor ffmpeg support setting this to anything but hardcoded 0x80
> >
> > This might be source of my "too loud" lpcm dvd experiments because I was
> > making lpcm file via cinelerra-gg's raw pcm output format (using libsndfile
> > internally).
> > ___
> > 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 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] patch for 44.1/32 khz pcm input in pcm dvd encoder

2024-01-20 Thread Andrew Randrianasulu
relative to ffmpeg.git commit 6c4388b468bf92c0c1e7733c6cfe4ff3f9ca9723

lightly tested with mpv and mediainfo like this:

./ffmpeg -i ~/f9518976.mp4 -target pal-dvd -ar 44100 -c:a pcm_dvd -f dvd
t.mpg

mpv plays sound correctly, mediainfo does not know those frequencies and
display 0khz. ;)
From 0438f90d10ef7f5162d6b7221a02ad240c1e99dd Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu 
Date: Sun, 21 Jan 2024 06:10:32 +0300
Subject: [PATCH] Add 32/44.1 khz sampling frequencies to pcm-dvd encoder

Signed-off-by: Andrew Randrianasulu 
---
 libavcodec/pcm-dvdenc.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavcodec/pcm-dvdenc.c b/libavcodec/pcm-dvdenc.c
index a2e5cbdc2e..67121e31b4 100644
--- a/libavcodec/pcm-dvdenc.c
+++ b/libavcodec/pcm-dvdenc.c
@@ -38,6 +38,12 @@ static av_cold int pcm_dvd_encode_init(AVCodecContext *avctx)
 int quant, freq, frame_size;
 
 switch (avctx->sample_rate) {
+case 32000:
+	freq = 3;
+	break;
+case 44100:
+	freq = 2;
+	break;
 case 48000:
 freq = 0;
 break;
@@ -181,7 +187,7 @@ const FFCodec ff_pcm_dvd_encoder = {
 .priv_data_size = sizeof(PCMDVDContext),
 .init   = pcm_dvd_encode_init,
 FF_CODEC_ENCODE_CB(pcm_dvd_encode_frame),
-.p.supported_samplerates = (const int[]) { 48000, 96000, 0},
+.p.supported_samplerates = (const int[]) { 32000, 44100, 48000, 96000, 0},
 CODEC_OLD_CHANNEL_LAYOUTS(AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO,
   AV_CH_LAYOUT_5POINT1, AV_CH_LAYOUT_7POINT1)
 .p.ch_layouts   = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO,
-- 
2.43.0

___
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] LPCM in DVD - 44.1/32khz sample rate?

2024-01-20 Thread Andrew Randrianasulu
According to this source (vlc) lpcm dvd audio supports lower frequencies
like 44100/32000 hz - useful for direct dv transcoding for example 

https://github.com/videolan/vlc/blob/master/modules/codec/lpcm.c

see lines 524, 608

Does this mean that libavcodec/pcm-dvdenc.c can be trivially extended to
support those ?

Same question for mplex. (it only supports 48/96 khz lpcm audio).

I also found this table via mjpeg-users archives:

https://dvd.sourceforge.net/dvdinfo/lpcm.html

it lists dynamic range/gain (?) setting equations.

Not mplex nor ffmpeg support setting this to anything but hardcoded 0x80

This might be source of my "too loud" lpcm dvd experiments because I was
making lpcm file via cinelerra-gg's raw pcm output format (using libsndfile
internally).
___
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] cutting mp4 with ffmpeg

2024-01-14 Thread Andrew Randrianasulu
On Sun, Jan 14, 2024 at 8:24 AM Mark Filipak  wrote:
>
> This is not the way to do things, Andrew.
>
> Please do not add your notice of a trac ticket submission to my reply. It has 
> nothing to do with my
> reply.
>
> Your ticket has justifiably been closed.
>
> Trac is not a place to get extra help. It is for bug reporting. Instead to a 
> trac ticket, post your
> concerns here and try to gain help/confirmation/clarification here.

well, at least it was closed with explanation:



There is a limitation with time value displays in showinfo but this is
not it. showinfo uses a field width of 7 characters, so it can and
does display e.g. 2.96667. When there are fewer characters shown, it
means the remaining digits are 0 i.e. pts_time:1 indicates 1.0.

As for ffprobe, using the bare command will just show the input dump
(same as ffmpeg) which is meant to be a summary display. For
precision, you should use the sectional display. For input container
duration, you would use

ffprobe -show_entries format=duration -i INPUT which will print with
microsecond precision, e.g.

[FORMAT]
duration=179.468005
[/FORMAT]

==

this is valuable information

>
> --Mark.
>
> On 13/01/2024 22.11, Andrew Randrianasulu wrote:
> > On Sat, Jan 13, 2024 at 10:27 PM Mark Filipak
> >  wrote:
> >>
> >> On 13/01/2024 12.50, Andrew Randrianasulu wrote:
> >>> On Sat, Jan 13, 2024 at 8:57 PM Def Etienne  wrote:
> >> -snip-
> >>>> ffmpeg -i ~/6029.mp4  -copyts  c:v copy -c:acopy -t 64.600 
> >>>> dev/shm/6029_cut.mp4
> >>
> >> According to Devon Heitmueller -- thanks again, Devon -- '-copyts' and 
> >> '-muxdelay 0' are _both_ needed.
> >>
> >> '-copyts' -- before the input -- bypasses a routine that apparently is 
> >> named "tsfixup".
> >>
> >> '-muxdelay 0' -- after the input -- bypasses another ts fixup that 
> >> defaults to adding 0.7 seconds to
> >> the timestamps.
> >>
> >> Exactly why ffmpeg does those fixups is a mystery.
> >>
> >> I can confirm that when cutting off the beginning:
> >> ffmpeg -copyts -ss ... -i ... -c copy -muxdelay 0 ...
> >> works. It preserves the timestamps (DTS, PTS).
> >>
> >>
> >> Regarding cutting off the ending:
> >> ffmpeg -to ... -i ... -c copy ...
> >> I am trying to determine the behavior of '-to'. Is it PTS? Or is it ticks 
> >> (i.e., duration in
> >> timebase units)? And does ffmpeg do fixups for '-to' clauses, also? It 
> >> appears there are such '-to'
> >> fixups.
> >>
> >>
> >> Also be aware that MPV rounds time, and rounds to milliseconds whereas 
> >> ffmpeg truncates time and
> >> truncates frame numbers, DTSs, and PTSs. So times from MPV may miss an 
> >> I-frame in ffmpeg. What I do
> >> is use MPV times to find approximate frame number. Then I use '-vf 
> >> showinfo' to find exact frame
> >> number. Then I compute exact DTS and exact PTS from exact frame number. 
> >> Then I convert DTS and PTS
> >> to nanoseconds in the '-ss' clause.
> >
> > I added ticket about ffprobe/vf_showinfo displaying truncated duration:
> >
> > https://trac.ffmpeg.org/ticket/10799#ticket
> >
> >
> >>
> >> Why does 'ffmpeg -ss' use times instead of relative timebase ticks (i.e. 
> >> durations) or absolute DTSs
> >> and PTSs? Your guess is as good as mine, but it is a super PITA.
> >>
> >> Why does ffmpeg apply ts fixups? Your guess is as good as mine, but it is 
> >> a super PITA.
> >>
> >>
> >> Also, be aware that in this listing:
> >>
> >>> [Parsed_showinfo_0 @ 0xee202580] n:1612 pts:5803200 ...
> >>
> >> the reported PTS is _not_ PTS. It is ticks (i.e., duration in timebase 
> >> units) that is marked "pts"
> >> but isn't -- another super PITA.
> >>
> >>
> >> Also, remuxing from M2TS to MP4 for example, applies more unknown fixups 
> >> even when they have the
> >> exact same timebase -- another super PITA -- so don't change packet type 
> >> until the very end of your
> >> timming and concatenating.
> >>
> >> --Mark.
>
>
> ___
> 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] cutting mp4 with ffmpeg

2024-01-13 Thread Andrew Randrianasulu
вс, 14 янв. 2024 г., 06:51 Mark Filipak :

> On 13/01/2024 22.11, Andrew Randrianasulu wrote:
> -snip-
> > I added ticket about ffprobe/vf_showinfo displaying truncated duration:
> >
> > https://trac.ffmpeg.org/ticket/10799#ticket
>
> Andrew, please remove that ticket. It is too early.
>

This is ONLY about duration field in ffprobe/vf_showtime truncating time to
N.xx instead of N.xxx

hopefully just two printf arguments somewhere.

Actual cutting problems are not yet logged.


> Your "How to reproduce" command line is incomplete and it doesn't include
> '-muxdelay 0'.
>

Does it magically enlarge ffprobe/vf_showtime output ? :)


> Your ticket cites other applications as though they are authoritative.
>

More as example of time format.


> The end result of your ticket will be to sour the milk for my work.
>

Do not panic! There are enough bugs for everyone :)


> --Mark.
>
>
> ___
> 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] cutting mp4 with ffmpeg

2024-01-13 Thread Andrew Randrianasulu
On Sat, Jan 13, 2024 at 10:27 PM Mark Filipak
 wrote:
>
> On 13/01/2024 12.50, Andrew Randrianasulu wrote:
> > On Sat, Jan 13, 2024 at 8:57 PM Def Etienne  wrote:
> -snip-
> >> ffmpeg -i ~/6029.mp4  -copyts  c:v copy -c:acopy -t 64.600 
> >> dev/shm/6029_cut.mp4
>
> According to Devon Heitmueller -- thanks again, Devon -- '-copyts' and 
> '-muxdelay 0' are _both_ needed.
>
> '-copyts' -- before the input -- bypasses a routine that apparently is named 
> "tsfixup".
>
> '-muxdelay 0' -- after the input -- bypasses another ts fixup that defaults 
> to adding 0.7 seconds to
> the timestamps.
>
> Exactly why ffmpeg does those fixups is a mystery.
>
> I can confirm that when cutting off the beginning:
> ffmpeg -copyts -ss ... -i ... -c copy -muxdelay 0 ...
> works. It preserves the timestamps (DTS, PTS).
>
>
> Regarding cutting off the ending:
> ffmpeg -to ... -i ... -c copy ...
> I am trying to determine the behavior of '-to'. Is it PTS? Or is it ticks 
> (i.e., duration in
> timebase units)? And does ffmpeg do fixups for '-to' clauses, also? It 
> appears there are such '-to'
> fixups.
>
>
> Also be aware that MPV rounds time, and rounds to milliseconds whereas ffmpeg 
> truncates time and
> truncates frame numbers, DTSs, and PTSs. So times from MPV may miss an 
> I-frame in ffmpeg. What I do
> is use MPV times to find approximate frame number. Then I use '-vf showinfo' 
> to find exact frame
> number. Then I compute exact DTS and exact PTS from exact frame number. Then 
> I convert DTS and PTS
> to nanoseconds in the '-ss' clause.

I added ticket about ffprobe/vf_showinfo displaying truncated duration:

https://trac.ffmpeg.org/ticket/10799#ticket


>
> Why does 'ffmpeg -ss' use times instead of relative timebase ticks (i.e. 
> durations) or absolute DTSs
> and PTSs? Your guess is as good as mine, but it is a super PITA.
>
> Why does ffmpeg apply ts fixups? Your guess is as good as mine, but it is a 
> super PITA.
>
>
> Also, be aware that in this listing:
>
> > [Parsed_showinfo_0 @ 0xee202580] n:1612 pts:5803200 ...
>
> the reported PTS is _not_ PTS. It is ticks (i.e., duration in timebase units) 
> that is marked "pts"
> but isn't -- another super PITA.
>
>
> Also, remuxing from M2TS to MP4 for example, applies more unknown fixups even 
> when they have the
> exact same timebase -- another super PITA -- so don't change packet type 
> until the very end of your
> timming and concatenating.
>
> --Mark.
>
> ___
> 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] cutting mp4 with ffmpeg

2024-01-13 Thread Andrew Randrianasulu
On Sat, Jan 13, 2024 at 9:22 PM DEF  wrote:
>
> On Sat, 13 Jan 2024 at 19:09, Andrew Randrianasulu
>  wrote:
> >
>
> >
> > also
> >
> > /dev/shm/ffmpeg/ffmpeg -i /dev/shm/6029_cut_2.mp4 -vf showinfo -f null
> > /dev/null
> >
> > last lines were
> >
> > [Parsed_showinfo_0 @ 0xee202580] n:1612 pts:5803200 pts_time:64.48
> > duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
> > s:720x400 i:P iskey:0 type:B checksum:498D7D18
> > plane_checksum:[7C011A9A 72D078F0 1749E97F] mean:[84 158 80]
> > stdev:[10.1 3.4 8.2]
> > [Parsed_showinfo_0 @ 0xee202580] color_range:tv color_space:smpte170m
> > color_primaries:smpte170m color_trc:bt709
> > [Parsed_showinfo_0 @ 0xee202580] n:1613 pts:5806800 pts_time:64.52
> > duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
> > s:720x400 i:P iskey:0 type:B checksum:FB6C528A
> > plane_checksum:[BC0C2674 7A2A71F8 E2E7BA0F] mean:[84 158 80]
> > stdev:[10.1 3.3 8.1]
> > [Parsed_showinfo_0 @ 0xee202580] color_range:tv color_space:smpte170m
> > color_primaries:smpte170m color_trc:bt709
> > [Parsed_showinfo_0 @ 0xee202580] n:1614 pts:5810400 pts_time:64.56
> > duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
> > s:720x400 i:P iskey:0 type:P checksum:32E560F5
> > plane_checksum:[237A0A01 F76B8D20 1D72C9C5] mean:[84 158 80]
> > stdev:[10.1 3.2 8.0]
> > [Parsed_showinfo_0 @ 0xee202580] color_range:tv color_space:smpte170m
> > color_primaries:smpte170m color_trc:bt709
> > [Parsed_showinfo_0 @ 0xee202580] n:1615 pts:5814000 pts_time:64.6
> > duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
> > s:720x400 i:P iskey:1 type:I checksum:C9E56CD5
> > plane_checksum:[1254795B 75287B1F 720B784C] mean:[83 158 80]
> > stdev:[10.1 3.0 7.8]
> > [Parsed_showinfo_0 @ 0xee202580] color_range:tv color_space:smpte170m
> > color_primaries:smpte170m color_trc:bt709
> > [Parsed_showinfo_0 @ 0xee202580] n:1616 pts:5828400 pts_time:64.76
> > duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
> > s:720x400 i:P iskey:0 type:P checksum:07418607
> > plane_checksum:[A672B48D A7D7BD5B 3D4D1410] mean:[83 158 79]
> > stdev:[9.7 2.3 7.0]
> > [Parsed_showinfo_0 @ 0xee202580] color_range:tv color_space:smpte170m
> > color_primaries:smpte170m color_trc:bt709
> > [out#0/null @ 0xbf59800] video:543kB audio:12112kB subtitle:0kB other
> > streams:0kB global headers:0kB muxing overhead: unknown
> > frame= 1617 fps=493 q=-0.0 Lsize=N/A time=00:01:04.61 bitrate=N/A 
> > speed=19.7x
> >
> >
> > doesn't this mean ffmpeg cut one frame too much ?
>
> Yes it will and it could.
> As long as you are not encoding the video, ffmpeg will cut at the
> nearest iframes.
> If you are particular then you need to re-encode the video.
>
> /dev/shm/ffmpeg/ffmpeg -i ~/6029.mp4   -c:v libx264 -c:a pcm_s16le
> -t 64.600 /dev/shm/6029_cut_2.mp4
>
> avoid using "-to" in the place of "-t" like i explained.
>
> if you must not reencode and you want to use copyts then you must add
> the option
> "-avoid_negative_ts make_zero"  after your copyts.

bash-5.1$ /dev/shm/ffmpeg/ffmpeg -i ~/6029.mp4  -copyts
-avoid_negative_ts make_zero -c:v copy -c:a pcm_s16le -to 64.600
/dev/shm/6029_cut_2.mp4
ffmpeg version N-112149-ga87a52ed0b Copyright (c) 2000-2024 the FFmpeg
developers
  built with gcc 11.2.0 (GCC)
  configuration:
  libavutil  58. 36.101 / 58. 36.101
  libavcodec 60. 37.100 / 60. 37.100
  libavformat60. 20.100 / 60. 20.100
  libavdevice60.  4.100 / 60.  4.100
  libavfilter 9. 17.100 /  9. 17.100
  libswscale  7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/6029.mp4':
  Metadata:
major_brand : mp42
minor_version   : 0
compatible_brands: mp42isomavc1
creation_time   : 2011-06-24T09:52:37.00Z
encoder : HandBrake 0.9.5 2011043000
  Duration: 01:28:31.60, start: 0.00, bitrate: 789 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, 657
kb/s, 25 fps, 25 tbr, 90k tbn (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
encoder : JVT/AVC Coding
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, 127 kb/s (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
File '/dev/shm/6029_cut_2.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac (native) -&g

Re: [FFmpeg-user] cutting mp4 with ffmpeg

2024-01-13 Thread Andrew Randrianasulu
On Sat, Jan 13, 2024 at 8:57 PM Def Etienne  wrote:
>
>
> Sent from my iPhone
>
> > On 13 Jan 2024, at 15:44, Andrew Randrianasulu  
> > wrote:
> >
> > I compiled new ffmpeg I tried to cut mp4
> >
> > -to parameter was coming from mpv:
> >
> > bash-5.1$ mpv ~/6029.mp4
> > (+) Video --vid=1 (*) (h264 720x400 25.000fps)
> > (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
> > AO: [alsa] 48000Hz stereo 2ch float
> > VO: [gpu] 720x400 yuv420p
> > (Paused) AV: 00:01:04.600 / 01:28:31.600 (1%) A-V:  0.000
> >
> > 1 min + 4 seconds +0.600 milliseconds = 64.600 ?
> >
> > bash-5.1$ /dev/shm/ffmpeg/ffmpeg -i ~/6029.mp4  -copyts -c:v copy -c:a
> > copy -ss 0.0 -to 64.600 /dev/shm/6029_cut.mp4
>
> I think the command intends a logic in its use.
>
> If you intend to cut out the first 64.6 seconds then you do not need to use  
> the “-ss” parameter.
>
> Using -t 64.6  before the output file would have been good enough.
>
> If you had needed to start from another time which is not the 0th second then 
> an -ss parameter is needed which _must come_ before the input file on the 
> command line and the “-to” mist have followed the -ss command before the 
> input file.
>
> Try
>
> ffmpeg -i ~/6029.mp4  -copyts  c:v copy -c:acopy -t 64.600 
> dev/shm/6029_cut.mp4

I tried to see if audio encoded as aac was at fault, because now
ffmpeg can encode PCM in mp4 I used

/dev/shm/ffmpeg/ffmpeg -i ~/6029.mp4  -copyts -c:v copy -c:a pcm_s16le
-to 64.600 /dev/shm/6029_cut_2.mp4

bash-5.1$ MP4Box -info  /dev/shm/6029_cut_2.mp4
* Movie Info *
Timescale 1000 - 2 tracks
Computed Duration 00:01:04.800 - Indicated Duration 00:01:04.800
Fragmented File: no
File Brand isom - version 512
Compatible brands: isom iso2 avc1 mp41
Created: UNKNOWN DATE   Modified: UNKNOWN DATE
File has no MPEG4 IOD/OD

iTunes Info:
Encoder Software: Lavf60.20.100
1 UDTA types: meta (1)

Track # 1 Info - TrackID 1 - TimeScale 9
Media Duration 00:01:04.680 - Indicated Duration 00:01:04.800
Track has 1 edit lists: track duration is 00:01:04.800
Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 1617 samples
Visual Sample Entry Info: width=720 height=400 (depth=24 bits)
Visual Track layout: x=0 y=0 width=720 height=400
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 720 x 400
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 3
NAL Unit length bits: 32
Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
SPS#1 hash: E2ADECEA8531A9FC07EE08593AF65A2AD75A3533
PPS#1 hash: 6BBE60BFBE383CE9144FA78B782534A704912778
Self-synchronized
RFC6381 Codec Parameters: avc1.64001E
Average GOP length: 231 samples
Max sample duration: 3600 / 9

Track # 2 Info - TrackID 2 - TimeScale 48000
Media Duration 00:01:04.597 - Indicated Duration 00:01:04.597
Track has 2 edit lists: track duration is 00:01:04.619
Media Info: Language "Undetermined (und)" - Type "soun:ipcm" - 3100672 samples
Unknown track type
RFC6381 Codec Parameters: ipcm
Alternate Group ID 1
All samples are sync
Max sample duration: 1 / 48000

===

bash-5.1$ /dev/shm/ffmpeg/ffprobe  /dev/shm/6029_cut_2.mp4
ffprobe version N-112149-ga87a52ed0b Copyright (c) 2007-2024 the
FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration:
  libavutil  58. 36.101 / 58. 36.101
  libavcodec 60. 37.100 / 60. 37.100
  libavformat60. 20.100 / 60. 20.100
  libavdevice60.  4.100 / 60.  4.100
  libavfilter 9. 17.100 /  9. 17.100
  libswscale  7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dev/shm/6029_cut_2.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf60.20.100
  Duration: 00:01:04.68, start: 0.00, bitrate: 2273 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, 734
kb/s, 25 fps, 25 tbr, 90k tbn (default)
  Metadata:
handler_name: VideoHandler
vendor_id   : [0][0][0][0]
encoder : JVT/AVC Coding
  Stream #0:1[0x2](und): Audio: pcm_s16le (ipcm / 0x6D637069), 48000
Hz, stereo, s16, 1536 kb/s (default)
  Metadata:
handler_name: SoundHandler
vendor_id   : [0][0][0][0]
===

also

/dev/shm/ffmpeg/ffmpeg -i /dev/shm/6029_cut_2.mp4 -vf showinfo -f null
/dev/null

last lines were

[Parsed_showinfo_0 @ 0xee202580] n:1612 pts:5803200 pts_time:64.48
duration:  0 duration_time:0   fmt:yuv420p cl:left sar:0/1
s:720x400 i:P iskey:0 type:B checksum:498D7D18
plane_checksum:[7C011A9A 72D078F0 1749E97F] mean:[84 158 8

[FFmpeg-user] cutting mp4 with ffmpeg

2024-01-13 Thread Andrew Randrianasulu
I compiled new ffmpeg I tried to cut mp4

-to parameter was coming from mpv:

bash-5.1$ mpv ~/6029.mp4
 (+) Video --vid=1 (*) (h264 720x400 25.000fps)
 (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
AO: [alsa] 48000Hz stereo 2ch float
VO: [gpu] 720x400 yuv420p
(Paused) AV: 00:01:04.600 / 01:28:31.600 (1%) A-V:  0.000

1 min + 4 seconds +0.600 milliseconds = 64.600 ?

bash-5.1$ /dev/shm/ffmpeg/ffmpeg -i ~/6029.mp4  -copyts -c:v copy -c:a
copy -ss 0.0 -to 64.600 /dev/shm/6029_cut.mp4
ffmpeg version N-112149-ga87a52ed0b Copyright (c) 2000-2024 the FFmpeg
developers
  built with gcc 11.2.0 (GCC)
  configuration:
  libavutil  58. 36.101 / 58. 36.101
  libavcodec 60. 37.100 / 60. 37.100
  libavformat60. 20.100 / 60. 20.100
  libavdevice60.  4.100 / 60.  4.100
  libavfilter 9. 17.100 /  9. 17.100
  libswscale  7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/guest/6029.mp4':
  Metadata:
major_brand : mp42
minor_version   : 0
compatible_brands: mp42isomavc1
creation_time   : 2011-06-24T09:52:37.00Z
encoder : HandBrake 0.9.5 2011043000
  Duration: 01:28:31.60, start: 0.00, bitrate: 789 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, 657
kb/s, 25 fps, 25 tbr, 90k tbn (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
encoder : JVT/AVC Coding
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, 127 kb/s (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Output #0, mp4, to '/dev/shm/6029_cut.mp4':
  Metadata:
major_brand : mp42
minor_version   : 0
compatible_brands: mp42isomavc1
encoder : Lavf60.20.100
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x400, q=2-31,
657 kb/s, 25 fps, 25 tbr, 90k tbn (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
encoder : JVT/AVC Coding
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 127 kb/s (default)
  Metadata:
creation_time   : 2011-06-24T09:52:37.00Z
vendor_id   : [0][0][0][0]
Press [q] to stop, [?] for help
[out#0/mp4 @ 0xb79c180] video:5397kB audio:1009kB subtitle:0kB other
streams:0kB global headers:0kB muxing overhead: 0.732907%
size=6453kB time=01:17:29.80 bitrate=  11.4kbits/s speed=1.21e+03x
bash-5.1$ MP4Box -info /dev/shm/6029_cut.mp4
* Movie Info *
Timescale 1000 - 2 tracks
Computed Duration 00:01:04.800 - Indicated Duration 00:01:04.800
Fragmented File: no
File Brand isom - version 512
Compatible brands: isom iso2 avc1 mp41
Created: UNKNOWN DATE   Modified: UNKNOWN DATE
File has no MPEG4 IOD/OD

iTunes Info:
Encoder Software: Lavf60.20.100
1 UDTA types: meta (1)

Track # 1 Info - TrackID 1 - TimeScale 9
Media Duration 00:01:00.040 - Indicated Duration 00:01:00.160
Track has 2 edit lists: track duration is 00:01:04.800
Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 1501 samples
Visual Sample Entry Info: width=720 height=400 (depth=24 bits)
Visual Track layout: x=0 y=0 width=720 height=400
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 720 x 400
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 3
NAL Unit length bits: 32
Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
SPS#1 hash: E2ADECEA8531A9FC07EE08593AF65A2AD75A3533
PPS#1 hash: 6BBE60BFBE383CE9144FA78B782534A704912778
Self-synchronized
RFC6381 Codec Parameters: avc1.64001E
Average GOP length: 250 samples
Max sample duration: 3600 / 9

Track # 2 Info - TrackID 2 - TimeScale 48000
Media Duration 00:01:04.618 - Indicated Duration 00:01:04.618
Track has 1 edit lists: track duration is 00:01:04.619
Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 3029 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC (AOT=2 implicit) - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
RFC6381 Codec Parameters: mp4a.40.2
Alternate Group ID 1
All samples are sync
Max sample duration: 1024 / 48000

bash-5.1$ /dev/shm/ffmpeg/ffprobe /dev/shm/6029_cut.mp4
ffprobe version N-112149-ga87a52ed0b Copyright (c) 2007-2024 the
FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration:
  libavutil  58. 36.101 / 58. 36.101
  libavcodec 60. 37.100 / 60. 37.100
  libavformat60. 20.100 / 60. 20.100
  libavdevice60.  4.100 / 60.  4.100
  libavfilter 9. 17.100 

[FFmpeg-user] split from Mark's trimming thread

2024-01-13 Thread Andrew Randrianasulu
I was looking into loslesscut issue tracker and found two related issues:

https://github.com/mifi/lossless-cut/issues/126
" Implement "smart cut"

this branches into avcut and its explanation, and into

https://github.com/mifi/lossless-cut/issues/1216
"How to seek to and cut from a frame in ffmpeg?"

this discussion has interesting tip on how to convince ffmpeg to cut more
accurately on keyframes:

=
The only good solution and reproducible that I found it to set the -t to 2
frames before the keyframe wanted


So I wonder if *this* will work with Mark's files?

I tried ffmpeg's ss and to options on mp4 file and get around 3
milliseconds of difference between cut file and distance I tried to express
in milliseconds argument for " -to" switch from ss 0.0. For finding
keyframes I was using mpv's default seeking behavior {keyboard cursor
arrows will jump to keyframe} with osd-fractions option set in mpv.conf so
it displays milliseconds in both terminal output and OSD but it was with v
4.4.4 of ffmpeg, so may be not reproducible on new ffmpeg versions.

I want to thank Mark for his persistence in chasing this issue because it
turned out many open- and closed-source projects use ffmpeg/libav* for
framecut functionality, so fixing it at source is important.
___
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] Force target DTS == source DTS -- How?

2024-01-11 Thread Andrew Randrianasulu
пт, 12 янв. 2024 г., 05:18 Mark Filipak :

> On 1/10/24 16:50, Devin Heitmueller wrote:
> > On Wed, Jan 10, 2024 at 4:26 PM Mark Filipak 
> wrote:
> >> The change from 1048560 to 1174560 has to be happening inside the
> muxer, wouldn't you say? We now
> >> know that what's going into the muxer is right. Here is what went to
> the target file in the last run:
> >>
> >> 0,1170806,1174560, 3753,   640646, 0x900a1a7a, S=1,1
> >
> > Try setting -muxdelay 0 on the output options.  If not specified it
> > defaults to 0.7, and the delta between 1174560 and 1048560 is exactly
> > 1.4 seconds.  I don't know why you're getting exactly 2x the mux delay
> > rather than just being off by 0.7s, but I suspect it's the muxdelay
> > that is causing you to get PTS values which are not what you would
> > expect.
> >
> > Devin
> >
>
> When I wrote "That did it", I 'spoke' too soon. I'm still being driven
> nuts.
> There are 4 questions at the end.
> -- Mark.
>
> set TRIM=-ss 20.061708333 -to 40.12341
> set SOURCE=h:\BDMV\STREAM\00305.m2ts
> set CODE=-c copy -sn -dn
> set TARGET=c:\FANNY AND ALEXANDER [1982(1983)] 1of4.mp4
> ffmpeg -report %TRIM% -copyts -i %SOURCE% -map 0 %CODE% -muxdelay 0
> "%TARGET%"
> (The report is attached.)
>
> ___ THE INPUT M2TS (the cut is PTS=2854113)
> :
> 0,2839098,2839098, 3753,25719, 0x6f77b9b6
> 1,2839920,2839920,  960, 1084, 0xe54d2b6f
> 1,2840880,2840880,  960, 1084, 0xe54d2b6f
> 1,2841840,2841840,  960, 1084, 0xe54d2b6f
> 1,2842800,2842800,  960, 1084, 0xe54d2b6f
> 0,2842852,2842852, 3753,22455, 0xaa9655b8
> 1,2843760,2843760,  960, 1084, 0xe54d2b6f
> 1,2844720,2844720,  960, 1084, 0xe54d2b6f
> 1,2845680,2845680,  960, 1084, 0xe54d2b6f
> -cut-   +-+
> 0,2846606,  ¦ 2854113 ¦3753,   640646, 0x3a5a0c45
> 1,2846640,  +-+ 960, 1084, 0xe54d2b6f
> 1,2847600,2847600,  960, 1084, 0xe54d2b6f
> 1,2848560,2848560,  960, 1084, 0xe54d2b6f
> 1,2849520,  +-+ 960, 1084, 0xe54d2b6f
> 0,2850360,  ¦ 2850360 ¦3753,   640646, 0xfed1d09a <= TO BE CUT
> 1,2850480,  +-+ 960, 1084, 0xe54d2b6f
> 1,2851440,2851440,  960, 1084, 0xe54d2b6f
> 1,2852400,2852400,  960, 1084, 0xe54d2b6f
> 1,2853360,2853360,  960, 1084, 0xe54d2b6f
> 0,2854113,2861621, 3753,   640646, 0x02208727
> :
>
> ___ THE OUTPUT MP4 (the cut is PTS=2854080)
> 1,1492608,1492608,  512,   60, 0xec16103f
> : 50 audio packets, total
> 1,1517696,1517696,  512, 1084, 0xe54d2b6f
> -cut-   +-+
> 0,2846573,  ¦ 2854080 ¦3753,   640654, 0xb9811068
> 1,1518208,  +-+ 512, 1084, 0xe54d2b6f
> 1,1518720,1518720,  512, 1084, 0xe54d2b6f
> 1,1519232,1519232,  512, 1084, 0xe54d2b6f
> 1,1519744,  +-+ 512, 1084, 0xe54d2b6f
> 0,2850327,  ¦ 2850327 ¦3753,   640652, 0xbf9ad2d1 <= NOT CUT
> 1,1520256,  +-+ 512, 1084, 0xe54d2b6f
> 1,1520768,1520768,  512, 1084, 0xe54d2b6f
> 1,1521280,1521280,  512, 1084, 0xe54d2b6f
> 1,1521792,1521792,  512, 1084, 0xe54d2b6f
> 0,2854080,2861588, 3753,   640652, 0x8f98895e
> :
>
> Q1: How can I force the mp4 muxer to use the existing PTSs?
> Q2: Why are there 50 audio packets ahead of the -cut-?
> Q3: How can I force the mp4 audio time_base to 1/9?
>

https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavformat/movenc.c

(oh, it grow to 300 kb?) there are options

"movie_timescale", "set movie timescale"
and
video_track_timescale", "set timescale of all video tracks"

AND

"pts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = MOV_PRFT_SRC_PTS}, 0, 0,
AV_OPT_FLAG_ENCODING_PARAM, "prft"},

but you probably need to consult documentation on how exactly they used

https://ffmpeg.org/ffmpeg-formats.html#Options-4

but if you have some time it will be interesting to hear if script I found
on videohelp forums for testing open-gop/closed gop situations shows
something interesting for your source file?

Somewhere at second level someone said that blurays specifically not
mandate closed-gop video streams, and only  demand full decoder refres (IDR
frame) at chapter marks.

I wonder if your m2ts stream encoded like this ?

How exactly you determinated keyframe to cut at, initially?


Q4: Why wasn't INPUT PTS=2850360 cut off?
> ___
> 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

Re: [FFmpeg-user] Faster ffprobe-based detection of open GOP h264 ?

2024-01-11 Thread Andrew Randrianasulu
чт, 11 янв. 2024 г., 17:42 Nicolas Gaullier :

> >De : ffmpeg-user  De la part de Andrew
> Randrianasulu
> >
> >But as  it was said in forum post above - ffprobe  a bit slow, few
> minutes for whole video, eating one cpu core completely.
> >
> >Is there faster way to get this info ?
> Closed vs open gop is usually a local "keyframe" matter. It is not clear
> to me what is your intent : do you want to make sure 100% of the keyframes
> are closed gop ?
>

yes, I want to check my pre-existing videos for this, partially for testing
how various tools (avidemux, vidcut, ffmpeg) can cut them, partially
because I suspect this may play some role in how badly mesa's vdpau driver
on vp5 based nvidia hw decoder reacts to seeks (if majority of internet
streams today are closed-gop, then I might trigger some less-common
codepath with my home-encoded videos ).


If so, you have to parse the stream, so indeed, it takes a long time. I
> don't think there is another option. MP4 muxer only has the global
> "keyframe" info. With quicktime/mpeg2 you would have gotten stss/stps =
> closed/open gop distinction, but it is not your use case.
> Only one thing: as you noticed using MediaInfo, when encoding with
> libx264, there is an SEI describing the encoding parameters and you can get
> the "open_gop" field.
> If you get a very fresh (less than 2 weeks) ffmpeg build, there is an
> option to display this with the showinfo filter:
> ffmpeg -i xxx.mp4 -vf showinfo=udu_sei_as_ascii=1 -frames 1 -f null null
>

thanks, I have ffmpeg git as part of mplayer, but also can compile it
separately.

>
> Nicolas
> ___
> 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] Faster ffprobe-based detection of open GOP h264 ?

2024-01-10 Thread Andrew Randrianasulu
чт, 11 янв. 2024 г., 03:13 Andrew Randrianasulu :

> I was looking at videohelp forum
>
>
> https://web.archive.org/web/20201125203546/https://forum.videohelp.com/threads/398119-Cutting-Open-GOP-H264-videos-properly
>
> (web archive link because it hopefully will stay active for some time even
> if forum software will be upgraded and ruin old links in the future)
>
> It provides this ffprobe-based method of seeing if given h264 video stream
> is Open GOP or not :
>
> echo entry,pkt_pts_time,pict_type,coded_picture_number > "%~n1.csv"
>
> ffprobe -v 32 -stats -y -hide_banner -i %1 -select_streams v -print_format
> csv -of csv  -show_entries
> "frame=pkt_pts_time,pict_type,coded_picture_number" >> "%~n1.csv"
>
> === quote 
>
> You can see that the last frame of the first GOP is a B frame -- so that's
> an open GOP. Also, the coded picture number is higher than that of the I
> frame after it -- indicating that the I frame had to be decoded before the
> B frame, another indication of an open GOP.
>
> === quote ends ===
>
> I checked one of my videos:
>
> ffprobe -v 32 -stats -y -hide_banner -i
> ~/Sea_of_life_plus_Mikura_dolphins_test.mp4 -select_streams v -print_format
> csv -of csv  -show_entries
> "frame=pkt_pts_time,pict_type,coded_picture_number" >> "Sea_of_life-n1.csv"
>
> and it seems resulting cvs file show it as open GOP consistently with
> mediainfo:
>
> frame,8.308300,B,250
> frame,8.341667,I,249
> frame,8.375033,B,253
>
> mediainfo (v23.11) snip:
>
> === snip ===
>
> Video
>
> ID   : 1
>
> Format   : AVC
> Format/Info  : Advanced Video
> Codec
>  Format profile   : High@L4.1
> Format settings  : 4 Ref Frames
>
> Format settings, CABAC   : No
> Format settings, Reference frames: 4 frames
>
>  Codec ID : avc1
>
> Codec ID/Info: Advanced Video Coding
>
>  Duration : 5 min 4 s
> Bit rate : 16.0 Mb/s
> Width: 1 920 pixels
>
> Height   : 1 080 pixels
>
> Display aspect ratio : 16:9
>
> Frame rate mode  : Constant
>
> Frame rate   : 29.970 (3/1001) FPS
> Color space  : YUV
>
> Chroma subsampling   : 4:2:0
>
> Bit depth: 8 bits
>
> Scan type: Progressive
>
>  Bits/(Pixel*Frame)   : 0.257
> Stream size  : 575 MiB (99%)
>
> Writing library  : x264 core 148
>
> Encoding settings: cabac=0 / ref=3 / deblock=1:0:0
> / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 /
> mixed_ref=1 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=1 / cqm=0 /
> deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 /
> lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 /
> bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=0
> / b_bias=0 / direct=1 / weightb=1 / open_gop=1 / weightp=2 / keyint=250 /
> keyint_min=25 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=abr /
> mbtree=1 / bitrate=16000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 /
> qpstep=4 / ip_ratio=1.41 / aq=1:1.00
>
> Codec configuration box  : avcC
>
>  snip ends ===
>
> So,  at least I may try to cut this video at various intervals and see if
> cutting breaks on specifically open-gop h264 stream.
>
> But as  it was said in forum post above - ffprobe  a bit slow, few minutes
> for whole video, eating one cpu core completely.
>
> Is there faster way to get this info ?
>



Additionally, I tried to add  another variable  key_frame to see difference
between IDR frames (I type , key_frame=1) and just I type frames:

ffprobe -v 32 -stats -y -hide_banner -i
~/Sea_of_life_plus_Mikura_dolphins_test.mp4 -select_streams v -print_format
csv -of csv  -show_entries
"frame=pkt_pts_time,pict_type,key_frame,coded_picture_number" >>
"Sea_of_life-n1-v1.csv"

but resulting csv file grouped them like

 frame,1,8.341667,I,249

like key_frame come before pkt_pts_time.

May be this is bug due to ffprobe being from v. 4.4.4 and not latest. Not
sure. But interesting.

I also see few picture types in libavutil/avutil.h

enum AVPictu

[FFmpeg-user] Faster ffprobe-based detection of open GOP h264 ?

2024-01-10 Thread Andrew Randrianasulu
I was looking at videohelp forum

https://web.archive.org/web/20201125203546/https://forum.videohelp.com/threads/398119-Cutting-Open-GOP-H264-videos-properly

(web archive link because it hopefully will stay active for some time even
if forum software will be upgraded and ruin old links in the future)

It provides this ffprobe-based method of seeing if given h264 video stream
is Open GOP or not :

echo entry,pkt_pts_time,pict_type,coded_picture_number > "%~n1.csv"

ffprobe -v 32 -stats -y -hide_banner -i %1 -select_streams v -print_format
csv -of csv  -show_entries
"frame=pkt_pts_time,pict_type,coded_picture_number" >> "%~n1.csv"

=== quote 

You can see that the last frame of the first GOP is a B frame -- so that's
an open GOP. Also, the coded picture number is higher than that of the I
frame after it -- indicating that the I frame had to be decoded before the
B frame, another indication of an open GOP.

=== quote ends ===

I checked one of my videos:

ffprobe -v 32 -stats -y -hide_banner -i
~/Sea_of_life_plus_Mikura_dolphins_test.mp4 -select_streams v -print_format
csv -of csv  -show_entries
"frame=pkt_pts_time,pict_type,coded_picture_number" >> "Sea_of_life-n1.csv"

and it seems resulting cvs file show it as open GOP consistently with
mediainfo:

frame,8.308300,B,250
frame,8.341667,I,249
frame,8.375033,B,253

mediainfo (v23.11) snip:

=== snip ===

Video

ID   : 1

Format   : AVC
  Format/Info  : Advanced Video Codec

 Format profile   : High@L4.1
Format settings  : 4 Ref Frames

Format settings, CABAC   : No
Format settings, Reference frames: 4 frames

 Codec ID : avc1

Codec ID/Info: Advanced Video Coding

 Duration : 5 min 4 s
Bit rate : 16.0 Mb/s
Width: 1 920 pixels

Height   : 1 080 pixels

Display aspect ratio : 16:9

Frame rate mode  : Constant

Frame rate   : 29.970 (3/1001) FPS
Color space  : YUV

Chroma subsampling   : 4:2:0

Bit depth: 8 bits

Scan type: Progressive

 Bits/(Pixel*Frame)   : 0.257
Stream size  : 575 MiB (99%)

Writing library  : x264 core 148

Encoding settings: cabac=0 / ref=3 / deblock=1:0:0
/ analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 /
mixed_ref=1 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=1 / cqm=0 /
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 /
lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 /
bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=0
/ b_bias=0 / direct=1 / weightb=1 / open_gop=1 / weightp=2 / keyint=250 /
keyint_min=25 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=abr /
mbtree=1 / bitrate=16000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 /
qpstep=4 / ip_ratio=1.41 / aq=1:1.00

Codec configuration box  : avcC

 snip ends ===

So,  at least I may try to cut this video at various intervals and see if
cutting breaks on specifically open-gop h264 stream.

But as  it was said in forum post above - ffprobe  a bit slow, few minutes
for whole video, eating one cpu core completely.

Is there faster way to get this info ?
___
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] Towards better trims & concatenations

2024-01-09 Thread Andrew Randrianasulu
ср, 10 янв. 2024 г., 06:23 Andrew Randrianasulu :

>
>
> вт, 9 янв. 2024 г., 15:04 Rob Hallam :
>
>> On Mon, 8 Jan 2024 at 23:02, Mark Filipak 
>> wrote:
>>
>> > [explanation snipped]
>> > Oh, I think I see why your difficulty, Rob.
>>
>> Thank you for taking the time to write the explanations, they are much
>> appreciated.
>>
>> My difficulty, as you guessed, is I don't know about the internals of
>> video containers.
>>
>> I thought it might work like being handed pages from a book- annoying
>> if they're in the wrong order, but fixable to get the right order
>> since there are page numbers. From what you say, it sounds like in
>> this analogy not only are the pages (packets) in the wrong order, the
>> page numbers (timestamps) are wrong- and not even consistently wrong?
>>
>> > Trimming errors are wrecking concatenations ...
>> > [snip]
>> > trimming has to take PTS into account so that the cut happens in the
>> right spot with no leftover
>> > packets that shouldn't be there, but that apparently isn't happening
>> and I have the proof.
>>
>> That certainly sounds consistent with behaviour I saw in the past when
>> I tried to re-join trimmed clips.
>>
>> > To be frank, Rob, if you want to help yourself, you may want to help
>> me. I published my procedure.
>> > Duplicate it and apply it to some of the videos you've had problems
>> with. Learn how to use
>> > '-framecrc' and '-showinfo'. It will take you awhile, but it will be
>> time well spent. It will
>> > demystify a lot for you. I'll be here to help if you like.
>>
>> Thank you. The videos I've worked with in the past were simple
>> h264-in-mkv/mp4, but at the time having to do a full re-encode was
>> irksome. If I get a chance to replicate your procedure I'll post the
>> results.
>>
>> Regardless, good luck!
>>
>
>
> I looked again into "cut h264" (bluray stream often h264 encoded) video
> situation and found this answer on avidemux forum (from 2020 so may be
> ffmpeg end was fixed in meantime):
>
> https://avidemux.org/smif/index.php?topic=19284.0
>
> =
>
> In most H.264 and HEVC streams, each frame includes a counter in its
> header which reflects the order in which the decoded picture should be
> displayed – POC (picture order count). This counter is reset only on IDR
> (instant decoder refresh) frames.
>
> In a video stream with closed GOPs, each keyframe is an IDR frame and we
> can cut at every keyframe not caring about POC. But in H.264 and HEVC
> streams used for digital broadcast, the closed GOP mode is not viable
> because of huge variability in bitrate between frames in this mode.
> Therefore broadcasters use open GOP mode, where keyframes just mark a point
> in the stream which can be directly accessed (technically it means that
> parts of the picture which don't depend on other pictures to be decoded are
> spread over a number of frames, reducing bitrate fluctuations).
>
> When we cut at a non-IDR keyframe, we can run into the situation that the
> POC of the next frame after the cut is (much) less than the POC of previous
> frame. Here the trouble starts.
>
> Some if not most decoder libraries and hardware players discard such a
> sudden jump of POC and just carry on, so everything works fine. But the
> most important library at the heart of most popular players and video
> editors including Avidemux – libavcodec – actually evaluates the invalid
> POC jump at the boundary of the cut and will not continue with playback
> until a frame with POC higher than before the cut or an IDR frame arrives.
>
> As we cannot command millions of people to stop using VLC, we need to
> avoid triggering this problem by checking the POC values at the cut points.
>
> The only other option is to re-encode the video.
> 
>
> other forum post hints at possibility of doing bitstream analysis for
> re-creating some of missing info on cutting, but does not go into details:
>
>
> https://forum.videohelp.com/threads/398119-Cutting-Open-GOP-H264-videos-properly
>
> so may be those commercial programs sometimes work better for this
> specific task, but not sure if you want to dump money on them for one off
> job.
>


oh, according to this forum post main developer of said commercial program
(videoredo 5) moved to some other quests  after main (1 out of 2)
owner/business partner died in 2022 

https://forum.videohelp.com/threads/407142-VideoReDo-owner-passed-away-product-ceased-seeking-alternatives

  scratches head . at least another link to itu site still around
and encoder can be c

Re: [FFmpeg-user] Towards better trims & concatenations

2024-01-09 Thread Andrew Randrianasulu
вт, 9 янв. 2024 г., 15:04 Rob Hallam :

> On Mon, 8 Jan 2024 at 23:02, Mark Filipak 
> wrote:
>
> > [explanation snipped]
> > Oh, I think I see why your difficulty, Rob.
>
> Thank you for taking the time to write the explanations, they are much
> appreciated.
>
> My difficulty, as you guessed, is I don't know about the internals of
> video containers.
>
> I thought it might work like being handed pages from a book- annoying
> if they're in the wrong order, but fixable to get the right order
> since there are page numbers. From what you say, it sounds like in
> this analogy not only are the pages (packets) in the wrong order, the
> page numbers (timestamps) are wrong- and not even consistently wrong?
>
> > Trimming errors are wrecking concatenations ...
> > [snip]
> > trimming has to take PTS into account so that the cut happens in the
> right spot with no leftover
> > packets that shouldn't be there, but that apparently isn't happening and
> I have the proof.
>
> That certainly sounds consistent with behaviour I saw in the past when
> I tried to re-join trimmed clips.
>
> > To be frank, Rob, if you want to help yourself, you may want to help me.
> I published my procedure.
> > Duplicate it and apply it to some of the videos you've had problems
> with. Learn how to use
> > '-framecrc' and '-showinfo'. It will take you awhile, but it will be
> time well spent. It will
> > demystify a lot for you. I'll be here to help if you like.
>
> Thank you. The videos I've worked with in the past were simple
> h264-in-mkv/mp4, but at the time having to do a full re-encode was
> irksome. If I get a chance to replicate your procedure I'll post the
> results.
>
> Regardless, good luck!
>


I looked again into "cut h264" (bluray stream often h264 encoded) video
situation and found this answer on avidemux forum (from 2020 so may be
ffmpeg end was fixed in meantime):

https://avidemux.org/smif/index.php?topic=19284.0

=

In most H.264 and HEVC streams, each frame includes a counter in its header
which reflects the order in which the decoded picture should be displayed –
POC (picture order count). This counter is reset only on IDR (instant
decoder refresh) frames.

In a video stream with closed GOPs, each keyframe is an IDR frame and we
can cut at every keyframe not caring about POC. But in H.264 and HEVC
streams used for digital broadcast, the closed GOP mode is not viable
because of huge variability in bitrate between frames in this mode.
Therefore broadcasters use open GOP mode, where keyframes just mark a point
in the stream which can be directly accessed (technically it means that
parts of the picture which don't depend on other pictures to be decoded are
spread over a number of frames, reducing bitrate fluctuations).

When we cut at a non-IDR keyframe, we can run into the situation that the
POC of the next frame after the cut is (much) less than the POC of previous
frame. Here the trouble starts.

Some if not most decoder libraries and hardware players discard such a
sudden jump of POC and just carry on, so everything works fine. But the
most important library at the heart of most popular players and video
editors including Avidemux – libavcodec – actually evaluates the invalid
POC jump at the boundary of the cut and will not continue with playback
until a frame with POC higher than before the cut or an IDR frame arrives.

As we cannot command millions of people to stop using VLC, we need to avoid
triggering this problem by checking the POC values at the cut points.

The only other option is to re-encode the video.


other forum post hints at possibility of doing bitstream analysis for
re-creating some of missing info on cutting, but does not go into details:

https://forum.videohelp.com/threads/398119-Cutting-Open-GOP-H264-videos-properly

so may be those commercial programs sometimes work better for this specific
task, but not sure if you want to dump money on them for one off job.



> Cheers,
> Rob
> ___
> 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] sntsc

2024-01-09 Thread Andrew Randrianasulu
вт, 9 янв. 2024 г., 11:35 Mark Filipak :

> On 1/8/24 01:46, Andrew Randrianasulu wrote:
> > пн, 8 янв. 2024 г., 09:13 Mark Filipak :
> >
> >> On 1/8/24 00:26, Andrew Randrianasulu wrote:
> >>> пн, 8 янв. 2024 г., 05:14 Mark Filipak :
> >>>> What is it that you want to know?
> >>>
> >>> I think I like to try and see bigger picture behind acronyms.
> >>
> >> What acronyms?
> >
> > SAR, DAR, PAR .
>
> DAR is a physical aspect (i.e., a W/H). It is the dots-by-lines aspect of
> the view. Note that I
> don't use the word "display" because that makes many people think of a
> whole screen. I use the word
> "view", instead, as in "lines per view", not "lines per display".
>
> PAR is a physical aspect (i.e., a W/H). It is the pixels-by-rows aspect of
> the 'picture' matrix.
> Note that I use the word 'picture', an alias, because data matrices are
> not really pictures. But
> MPEG and the rest of the world call them "pictures" so I call them
> 'pictures'.
>
> SAR is not a physical aspect, it's an aspect transform. It transforms
> pixels-by-rows to
> dots-by-lines. SAR = DAR/PAR means view(W/H)/'picture'(W/H). For example,
> (1024/576)/(720/576).
>
> Details.
>
> "DAR" means "display aspect ratio" and you probably know all about that.
> It's dpl/lpv, i.e., (dots per line)/(lines per view).
> DAR
>   dpl/lpv
> 1024/576 = 16/9 for 16:9 'PAL',
>   768/576 =  4/3 for  4:3 'PAL',
>   853/480 = 16/9 for 16:9 'NTSC',
>   720/540 =  4/3 for  4:3 'NTSC'.
>
> "PAR' means "picture aspect ratio".
> It's ppr/rpp, i.e., (pixels per row)/(rows per 'picture').
>PAR
> ppr/rpp
> 720/576 = 5/4 for 16:9 'PAL',
> 720/576 = 5/4 for  4:3 'PAL',
> 720/480 = 3/2 for 16:9 'NTSC',
> 720/480 = 3/2 for  4:3 'NTSC'.
>
> "SAR" means "sample aspect ratio". That term is from the days of flying
> spot film scanners. Modern
> SAR is actually not an aspect at all. It's a transform.
> SAR transforms pixels-by-rows into dots-by-lines [note1].
> It's dpp/lpr, i.e., (dots per pixel)/(lines per row).
>  'SAR'
> dpp/lpr
>   (dpl/ppr)/(lpv/rpp) [note2]
> (1024/720)/(576/576) =  1024/720   =  64/45  for 16:9 'PAL'  -- 64 dots
> per 45 pixels,
>   (768/720)/(576/576) =   768/720   =  16/15  for  4:3 'PAL'  -- 16 dots
> per 15 pixels,
>   (853/720)/(480/480) =   853/720   =  32/27  for 16:9 'NTSC' -- 32 dots
> per 27 pixels,
>   (720/720)/(540/480) = 1/(540/480) = 1/(9/8) for  4:3 'NTSC' -- 9 lines
> per 8 rows [note3].
>
> [note1] Though modern SAR is actually a transform -- a 'picture'-to-view
> transform (PVT) -- the
> "SAR" acronym has become so entrenched in the art that it would be
> impossible to get people to
> change to "PVT". I try to get around the issue by calling
> SAR-as-transform, 'SAR' (meaning it's an
> alias, not a real aspect ratio).
>
> [note2] The following is not a 'stupid math trick', it is real.
> 'SAR' = dpp/lpr =  (dpl/ppr)/(lpv/rpp) =  (dpl/lpv)/(ppr/rpp) = DAR/PAR.
> For example,
> 'SAR' = dpp/lpr = (1024/720)/(576/576) = (1024/576)/(720/576) =
> (16/9)/(5/4) = DAR/PAR.
>
> [note3] Why is 4:3 'NTSC' so different? Well, there's two ways to look at
> it:
> 1, for 4:3 'NTSC', 'SAR' is less than one while for the others, 'SAR' is
> greater than one, and
> 2, turning 4:3 'NTSC' into 640x480 would lose resolution whereas 720x540
> preserves resolution.
> The difference is moot because TVs don't use 'SAR' anyway. What they do is
> look at the size of their
> screen (e.g., 1920x1080), look at DAR in the PES header (e.g. 4/3),
> compute the size of the view
> based on that DAR (e.g. 1440x1080), and scale directly (e.g., turn 4-by-4
> pixel blocks into 8-by-9
> dot blocks). That makes 'SAR' a kind of fiction (which it is in a way).
>
> If you're unhappy with 'SAR', then just forget it. Know DAR and PAR
> though. Know them well.
>

it hard to forgot if libav*  internals want it ;)

And I want to fix this little bug of ours when we not setting it (and thus
DAR indirectly) on encoding in some cases 

https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=summary

our git, just in case. (I posted link before but at least on mobile
(Android)  gmail client switching between mails is slow task in itself)

our current ah wondering about and around aspects:

https://lists.cinelerra-gg.org/pipermail/cin/2024-January/thread.html

cinelerra had interesting history down to very early 2000s, so some
"aspects" (pun intended) of it are not very obvious from variable names
used (just aspect_ratio for example)




> -- Mark.
>
>
___
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] Towards better trims & concatenations

2024-01-08 Thread Andrew Randrianasulu
вт, 9 янв. 2024 г., 02:02 Mark Filipak :

> On 1/8/24 08:08, Rob Hallam wrote:
> > On Mon, 8 Jan 2024 at 12:37, Mark Filipak 
> wrote:
> >>
> >> On 1/8/24 07:16, Rob Hallam wrote:
> >>> On Mon, 8 Jan 2024 at 12:07, Mark Filipak 
> wrote:
> >>>
>  For example, if 'v' (video) and 'a' (audio) packets go from
>  v-a-a-a-a-v-a-a-a-a-v... to
>  a-a-a-a-a-a-a-a-v-v-v..., then somethings wrong, eh? That's the kind
> of difference I'm seeing
>  between the two versions of 01.mp4.
> >>>
> >>> Forgive me for jumping in in the middle here, but is that strictly
> >>> true?
>
> Is what true? Is it true that the audio packets are bunched up, out of
> time sequence, and pushed to
> the front? Yes, it's true. That's why the MPV player has difficulty and
> doesn't start at
> 00:00:00.000. Part of that problem is that, for some unknown reason,
> ffmpeg creates one time_base
> for frame packets and a different time_base for audio packets. It seems to
> me that that's just
> looking for trouble.
>
> >>> Honest question, perhaps the spec says that they should be
> >>> identical.
>
> There is no spec that defines how to trim and concatenate.
>
> >> Sorry, I don't understand you. Are you asking if I'm lying? I doubt it,
> but I don't know the
> >> antecedent of "that". Also, when you wrote "the spec", what spec did
> you have in mind?
> >
> > For clarity, I wasn't accusing you of lying...
>
> For clarity, I didn't think you were, and said so.
>
> >... and it certainly wasn't my
> > intention to imply that; my apologies if it sounded that way!
> >
> > The 'that' in the above-quoted case was your example of packets-
> > clearly they are ordered differently, something has changed and
> > perhaps it shouldn't have changed.
>
> There is no 'perhaps' about it.
>
> > I wondered if there was a practical
> > difference; to go back to the multiplication example, if you get 120
> > either way, does it matter if you do 3*4*10 versus 10*3*4 ? Sometimes
> > it does matter -- like in cases of floating-point maths -- but  I am
> > wondering if ffmpeg here is producing something that appears different
> > but looks and sounds the same.
>
> I address this further down.
>
> > I didn't have a particular spec in mind, but candidates would be
> > ffmpeg specs...
>
> FFmpeg has specs? I'd surely like to see them.
>
> > ...and/or specs for the container and codec formats in use-
> > ie does this behaviour contradict those.
>
> I parse VOBs. I don't know the structures of M2TSs or MP4s or MKVs or
> anything else. But they all
> work off packet headers (e.g., PESs (packetized elemental streams)) that
> contain the structure and
> the settings that made the packet's payload what it is. There's no usage
> spec. Packet headers
> contain DTS, PTS, DAR, width, height, etc. Packet headers don't 'specify'
> how applications should
> create and maintain a valid packet table, nor do they specify packet table
> access methods. The specs
> just show structure. The H.262 spec goes a little further when it attempts
> to describe a virtual
> decoder machine for MPEG TS streams. That machine is a simple outline of
> how DTS & PTS work to
> render time ordered presentations from time disordered packets that are
> received. Illustrating such
> a small aspect of such a large procedure is like illustrating how the sun
> works by lighting a match.
> It's an important part, and the decoder model is good as far as it goes,
> but the rest is left up to
> the application and the specification is silent about that.
>
> >>> In much the same way a*b*c is equivalent to b*a*c, does the order of
> >>> packets necessarily matter if the output is perceptually the same?
>
> Yes, time order matters. If two videos are perceptually the same, then
> they're the same; they have
> the same internals. You can't move frames or audio samples around and it
> not be perceived. Things
> can get so bad that players drop packets. Is that perceivable? Yes, at
> some level of probing, it is.
>
> The frames and samples and chapters and subtitles are Legos. If you take
> the peak of a Lego building
> off and stick it onto the side of the building, is that perceivable?
>
> This is not brain surgery. It's Legos.
>
> Oh, I think I see why your difficulty, Rob. "a*b*c" happens at one
> instant. It doesn't matter in
> what order the multiplication happens because it's all in a single
> instant. With video frames, order
> matters. Frames are separated in time -- out of order is visible.
>
> >> The packets are in PTS order. Does the order of the packets matter? No,
> it's the order of the PTSs
> >> that matters.
> >>
> >>> If the output is not perceptually the same, or there are timing issues
> >>> / desync / other problems as a result then I can see that being a
> >>> potentially important bug.
> >>
> >> The MPV player misbehaves for all 6 of the sons. The starting running
> time is not "00:00:00.000".
> >
> > Does it matter that the starting running time is not "00:00:00.000" ?
>
> Yes.
>
> > 

Re: [FFmpeg-user] sntsc

2024-01-07 Thread Andrew Randrianasulu
пн, 8 янв. 2024 г., 09:13 Mark Filipak :

> On 1/8/24 00:26, Andrew Randrianasulu wrote:
> > пн, 8 янв. 2024 г., 05:14 Mark Filipak :
> >> What is it that you want to know?
> >>
> >
> > I think I like to try and see bigger picture behind acronyms.
>
> What acronyms?
>


SAR, DAR, PAR .



> > At least this page explains how some 640*480 files  might be born (it
> > should be 486, but some lines are cut).
>


I just found some intersection between  topic of this thread (sntsc -
square pixels  NTSC) and oroblem we facing.

Thanks for bring it up.


> Nonsense. If you're referring to DVD, there's no such thing as 640x480.
> There's 720x480. It decodes to 720x540.
>
> > https://lurkertech.com/lg/video-systems/#480i
>
> Total Lines Per Frame   525. Nobody has those TVs anymore.
>
> > This is all interesting and not really theoretical to me because at least
> > one our user still have a lot of HDV and DV material and he hopes to get
> > correct encoding results in those cases too!
>
> Sorry, I can't help there. I don't know what HDV & DV are.


DV in this context digital video as recorded by early camcoders. HDV is
from early mpeg2 tape-based cameras.



Is your friend trying to make a standards
> compliant DVD or BD? No? Then the correct encoding results are whatever
> can do the capture or the
> remux or the transcoding.
>
> I assume HDV & DV are analog, otherwise, why are you fussing about 704 &
> 525? If HDV & DV are
> digital, then 704 & 252 don't apply.
>
> All that analog capture stuff is moot. Get everything you can and then use
> ffmpeg to crop to
> whatever the image is. As long as the capture hardware is running at
> 60/1.001 fields per second, the
> field-to-field images should be stable and you'll be fine. If the videos
> are hand held camcorder,
> then the images will not be stable, but there are stabilizers you can use.
> Just get the images, then
> worry about presentation.
>

Well, here lies the problem for us!

Ffmpeg (command line utility) encodes those files straight away, so for
example VLC displays them correctly. But our software (cinelerra-gg) so far
was not setting st->sample_aspect_ratio so say webm encodes were by default
with wrong Display aspect ratio in  both VLC and GNOME filemanager previews.

I hope now (after my patches under testing) we set  sample aspect ratio in
both places (codecpar and st) so hopefully libav* based players will
display them correctly out of the box.

>
> ___
> 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] Towards better trims & concatenations

2024-01-07 Thread Andrew Randrianasulu
пн, 8 янв. 2024 г., 07:02 Mark Filipak :

> On 1/7/24 22:12, Jim DeLaHunt wrote:
>
> > For instance, this command:
> >
> >  > ffmpeg  -f lavfi -i "testsrc" -to 1:00 testpat.m2ts
> >
> > generates a 60-second video with a test pattern. Anyone with recent
> FFmpeg can generate a video like
> > this, though perhaps not identical. If you use this as your "mother"
> video, and apply your test
> > method to it, does ffmpeg demonstrate the same bugs? If yes, then you
> can include instructions to
> > generate that video in your bug reports.
>
> I don't think a synthetic video that ffmpeg creates is going do the job.
> I'll pass. Anyone could do
> it, and the developers would have done it. You could do it.
>


I think some of Mark's problems might steam from fact he apparently cuts
blu-ray transport stream, not something commonly cut with ffmpeg.

there is tsMuxer, it seems to have is own logic for dealing with mpeg
transport streams.

https://github.com/justdan96/tsMuxer


There is also another  libav* based cutter VidCut

https://github.com/kanehekili/VideoCut


May be they can cut / join a bit better?

May be stream is ... slightly broken in some way? Even costly pro software
at some version can produce slightly ... confusing stream.



> ___
> 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] sntsc

2024-01-07 Thread Andrew Randrianasulu
пн, 8 янв. 2024 г., 05:14 Mark Filipak :

> On 1/7/24 17:34, Andrew Randrianasulu wrote:
> >
> > Well, we (cinelerra-gg users/hackers/maintainers) run into aspect ratio
> > issues too , and I tried to demistify it for myself ... only to run into
> > much more complex explanation at
> >
> > https://lurkertech.com/lg/pixelaspect/
>
> I'm sorry, I couldn't get past the first sentence: "Pixels in the graphics
> world are square."
> They probably meant "dots" (aka "pels"). But I've read enough squirrely
> things in my time to know
> squirrely when I read it. My experience is that things that start
> squirrely get squirrelier.
>
> Some video folks who are stuck in analog TV write about 704x480 and
> 704x576 and 10:11 SAR and 59:54
> SAR, and they talk about overscan. It's all nonsense. DVDs are not TV and
> never was.


I guess early on they were meant to be displayed on TVs among other things




So, folks with
> analog TVs didn't see 720x480 because some of it got into the horizontal
> blanking. So what? There
> were no such SARs as 10:11 & 59:54. "59:54" isn't right even if 704
> existed.
>
> Some of those people who write those squirrely things, and more, write
> them into standards. It's all
> still nonsense. What is it that you want to know?
>

I think I like to try and see bigger picture behind acronyms.

At least this page explains how some 640*480 files  might be born (it
should be 486, but some lines are cut).

https://lurkertech.com/lg/video-systems/#480i

This is all interesting and not really theoretical to me because at least
one our user still have a lot of HDV and DV material and he hopes to get
correct encoding results in those cases too!





> ___
> 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] sntsc

2024-01-07 Thread Andrew Randrianasulu
чт, 28 дек. 2023 г., 08:54 Kieran O Leary :

> Hi Mark
>
> On Wed 27 Dec 2023 at 08:53, Mark Filipak 
> wrote:
>
> > On 12/27/23 01:58, Kieran O Leary wrote:
> > > On Tue 26 Dec 2023 at 22:53, Mark Filipak 
> > >> Oh, no! Mister Billipedia!  Hahahaha... (where people who are as ill
> > >> informed as you are, get to
> > >> pontificate)
>


Well, we (cinelerra-gg users/hackers/maintainers) run into aspect ratio
issues too , and I tried to demistify it for myself ... only to run into
much more complex explanation at

https://lurkertech.com/lg/pixelaspect/

Thing is, I was confused by lack of st->sample_aspect_ratio for HDV
sources, but

av_guess_sample_aspect_ratio() guessed SAR correctly anyway.

So in our "info" window I added two sar/dar pairs conditionally - one
guessed and one detected (as in libavformat/dump.c).

if (st->sample_aspect_ratio.num  &&
   av_cmp_q(st->sample_aspect_ratio,
st->codecpar->sample_aspect_ratio))



> >
> > >
> > > I think you must have misread the tone of Devin’s email, and I would
> > hardly
> > > call him ill informed. His post was constructive and your language will
> > > only derail threads like this.
> >
> > Oh, I did not mean it like that. I meant the general 'you' as in 'you,
> the
> > reader', as in 'people
> > who are as ill informed as _they_ are'. I sincerely didn't mean Devon.
>
>
> I re-read your post and I did indeed misread it. I understand what you mean
> now!
> Thanks for clarifying,
>
> Kieran.
> ___
> 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] libswresample patch on master but not in 6.1 branch?

2024-01-01 Thread Andrew Randrianasulu
"swr/swresample: avoid reapplication of firstpts"

Shouldn't it appear in 6.1 branch too?


http://git.ffmpeg.org/gitweb/ffmpeg.git/commit/be8a4f80b97222d99b4262c9230ca8a1db28973a
___
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] kmsgrab and audio problem

2023-12-19 Thread Andrew Randrianasulu
вс, 10 дек. 2023 г., 21:51 KoreanFanOfficial :

> Show me your code where kmsrab working with alsa/pulse without any issue on
> debian/arch system Cuz you cant, cuz this problem exist many years and
> dont fixed. Do you even try to install debian/arch??? If you already
> install arch/debian then you must know about this problem with kmsgrab and
> alsa/pulse. Other strings in output from my code is useless, if you want to
> help, install arch/debian, install ffmpeg from their repos, and test
> kmsgrab with alsa and pulse.
>


not sure about modern debian, but I digged up those two lines from year
2017:

ffmpeg -s 1280x1024 -r 30 -f x11grab -i :0.0 -f alsa -i hw:1,1 -vcodec
libx264 -crf 0 -preset ultrafast /dev/shm/output.mkv

ffmpeg -f x11grab -s 1280x1024 -r 30 -i :0.0 -f alsa -i hw:1,1 -acodec
pcm_s16le -vcodec msmpeg4 -qscale 4 -threads 4 /dev/shm/msmpeg4-2.mkv

but this was using alsa-loopback because for some reason my previous mb
integrated audio has no hw loopback mode ?!)

asoundrc from
https://bbs.archlinux.org/viewtopic.php?id=147852


> вс, 10 дек. 2023 г. в 10:11, Carl Zwanzig :
>
> > On 12/10/2023 1:58 AM, KoreanFanOfficial wrote:
> > > With this code:
> > [...]
> >
> > That is not the complete _unedited_ output which often contains important
> > information, like the ffmpeg build.
> >
> > Please read the FAQ at https://ffmpeg.org/mailing-list-faq.html.
> >
> > 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".
> >
> ___
> 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] resululotion probem

2023-12-02 Thread Andrew Randrianasulu
сб, 2 дек. 2023 г., 14:55 frhun :

>
> Hello
>
>
> I've posted a couple of times before, where it's for this reason or that
> reason, now my problem is that since q-scale was set to -g 2



well, every second frame is keyframe is kinda drastic on encoder! Try 15 or
25 .




the
> resolution has dropped drastically on the output.
> the interesting thing is that the speed out is the same as 720p, however
> on youtube it is good at a quarter of the resolution shown..
> what should i adjust to make it good?
> I have set the -g switch in vain, but it hasn't changed.
> only the -presets switch made a difference.
> But it's interesting that when youtube complained about the bad starting
> frame, the picture was perfect, now it doesn't complain and the picture
> is terrible
>
> I am looking forward to your ideas, thanks in advance!
>
> Robert
>
> this is the ffmpeg structure
>
>
> ffmpeg -rtsp_transport tcp -i
> rtsp://xxx:x@192.168.0.24/Streaming/Channels/1 -c:v libx264 -b:v 2M
> -c:a aac -vf "[in]drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='c\:\\kolibry2\\verseny\\T_D\\Piros.txt': x=115: y=20:
> reload=1: fontcolor=black: fontsize=30: box=1: boxborderw=5:
> boxcolor=red@0.8 , drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='c\:\\kolibry2\\verseny\\T_D\\Feher.txt': x=115: y=55:
> reload=1: fontcolor=black: fontsize=30: box=1: boxborderw=5:
> boxcolor=white@0.8 , drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='c\:\\kolibry2\\verseny\\T_D\\Ora.txt': x=20: y=20: reload=1:
> fontcolor=black: fontsize=35: box=1: boxborderw=5: boxcolor=aqua@0.8 ,
> drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='c\:\\kolibry2\\verseny\\T_D\\Merkozes.txt': x=20: y=53:
> reload=1: fontcolor=black: fontsize=28: box=1: boxborderw=5:
> boxcolor=yellow@0.8[out]" -preset medium -qscale 0 -g 2 -f flv
> rtmp://a.rtmp.youtube.com/live2/xx
> ___
> 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] Compiling FFmpeg for nvidia hardware encoding on Debian 12

2023-11-27 Thread Andrew Randrianasulu
пн, 27 нояб. 2023 г., 19:54 Lowell Friesen :

> Hi there,
>
> I’m trying to compile FFmpeg on Debian 12 to enable hardware encoding
> with an Nvidia graphics card, but am having some issues. I have
> installed the nvidia driver and cuda toolkit. This is the output of
> |nvidia-smi|:
>
> |+-+
>
> | NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
> |---+--+--+
>
> | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan
> Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG
> M. |
> |===+==+==|
>
> | 0 NVIDIA GeForce ... On | :01:00.0 On | N/A | | 0% 45C P2 46W
> / 163W | 1052MiB / 4096MiB | 2% Default | | | | N/A |
> +---+--+--+
>
> +-+
>
> | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID
> Usage |
> |=|
>
> | 0 N/A N/A 1697 G /usr/lib/xorg/Xorg 275MiB | | 0 N/A N/A 1862 G
> /usr/bin/gnome-shell 55MiB | | 0 N/A N/A 2086 G
> ...ud-3.10.1-x86_64.AppImage 2MiB | | 0 N/A N/A 3096 G
> /usr/lib/firefox/firefox 448MiB | | 0 N/A N/A 3905 G
> ...b/thunderbird/thunderbird 183MiB | | 0 N/A N/A 5558 G
> /usr/bin/nautilus 41MiB | | 0 N/A N/A 6235 G
> ...936111296816443610,262144 12MiB | | 0 N/A N/A 117598 G
> ...RendererForSitePerProcess 15MiB |
> +-+
>
> |
>
> Consulting the FFmpeg’s compilation guide
>  I am given a list
> of dependencies to install. Two of them (|libsdl2-dev| and
> |libvdpau-dev|) give me the following error when I attempt to install them:
>

libvdpau is only useful for decoding, and without libsdl2 you will not have
ffplay.

If you need only ffmpeg - you can try and skip those dependencies 



> |The following packages have unmet dependencies: libx11-dev : Depends:
> libx11-6 (= 2:1.8.4-2+deb12u1) but 2:1.8.7-1 is to be installed |
>
> I would install the older version of |libx11-dev| except that |sudo apt
> install libx11-6=2:1.8.4-2+deb12u1| gives me such a long list of
> packages that will be removed that I have the strong suspicion I would
> be left with an unusable system if I went ahead with it.
>
> |Reading package lists... Done Building dependency tree... Done Reading
> state information... Done The following packages were automatically
> installed and are no longer required: apg avahi-utils bogofilter
> bogofilter-bdb bogofilter-common brasero-common ca-certificates-java
> cdrdao cheese-common chromium-sandbox coinor-libcbc3 coinor-libcgl1
> coinor-libclp1 coinor-libcoinmp1v5 coinor-libcoinutils3v5
> coinor-libosi1v5 default-jre-headless docbook-xml espeak-ng-data
> evolution-common evolution-data-server-common firebird3.0-common
> firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils
> folks-common fonts-dejavu fonts-dejavu-extra fonts-font-awesome
> gimp-data gir1.2-accountsservice-1.0 gir1.2-atspi-2.0 gir1.2-evince-3.0
> gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdm-1.0 gir1.2-geocodeglib-2.0
> gir1.2-gmenu-3.0 gir1.2-gnomebluetooth-3.0 gir1.2-gnomedesktop-3.0
> gir1.2-grilo-0.3 gir1.2-gstreamer-1.0 gir1.2-gtksource-4 gir1.2-ibus-1.0
> gir1.2-javascriptcoregtk-4.0 gir1.2-javascriptcoregtk-4.1
> gir1.2-json-1.0 gir1.2-malcontent-0 gir1.2-mediaart-2.0 gir1.2-nm-1.0
> gir1.2-nma-1.0 gir1.2-polkit-1.0 gir1.2-rest-1.0 gir1.2-rsvg-2.0
> gir1.2-shumate-1.0 gir1.2-soup-2.4 gir1.2-soup-3.0 gir1.2-totem-1.0
> gir1.2-totemplparser-1.0 gir1.2-tracker-3.0 gir1.2-upowerglib-1.0
> gnome-control-center-data gnome-session-common
> gnome-settings-daemon-common gnome-shell-common graphviz
> grilo-plugins-0.3 gsfonts gstreamer1.0-x i965-va-driver ibus ibus-data
> ibus-gtk ibus-gtk3 ibus-gtk4 ibverbs-providers im-config
> imagemagick-6-common intel-media-va-driver java-common libaa1
> libabw-0.1-1 libamd2 libann0 libasyncns0 libavc1394-0 libbabl-0.1-0
> libblas3 libbotan-2-19 libbox2d2 libbrasero-media3-1 libbrlapi0.8
> libbs2b0 libburn4 libcaca0 libcamd2 libcamel-1.2-64 libccolamd2
> libcdr-0.1-1 libcdt5 libcgraph6 libcholmod3 libcjson1
> libclutter-1.0-common libcmark0.30.2 libcodec2-1.0 libcogl-common
> libcolamd2 libcolord-gtk4-1 libdbus-glib-1-2 libdc1394-25 libdca0
> libdecor-0-0 libdecor-0-plugin-1-cairo libdee-1.0-4 libdmapsharing-3.0-2
> libdotconf0 libdouble-conversion3 libdrm-amdgpu1 libdrm-intel1
> libdrm-nouveau2 libdrm-radeon1 libdv4 libdvdnav4 libe-book-0.1-1
> libebackend-1.2-11 libebook-1.2-21 libebook-contacts-1.2-4 libecal-2.0-2
> libedata-book-1.2-27 libedata-cal-2.0-2 libedataserver-1.2-27
> libel-api-java libenca0 libepubgen-0.1-1 

[FFmpeg-user] does swscale support rgbf32 conversions?

2023-11-20 Thread Andrew Randrianasulu
I am trying to add fp32 tiff reading via ffmpeg for cinelerra-gg.

we have this routine:

convert_ctx = sws_getCachedContext(convert_ctx, ip->width, ip->height,
pix_fmt,
 frame->get_w(), frame->get_h(), ofmt, SWS_POINT, NULL, NULL, NULL);

if( !convert_ctx ) {
   fprintf(stderr, "FFVideoConvert::convert_picture_frame:"
   " sws_getCachedContext() failed\n");
   fprintf(stderr, "pix_fmt %s \n",
av_get_pix_fmt_name(pix_fmt));
 fprintf(stderr, "output format %s \n", av_get_pix_fmt_name(ofmt));

return -1;
}


so for rgbaf32 tiff it prints:


FFMPEG::open_decoder: some stream have bad times:
/data/data/com.termux/files/home/test_color.tif  FFMPEG::open_decoder: some
stream have bad times: /data/data/com.termux/files/home/test_color.tif
FFVideoConvert::convert_picture_frame: sws_getCachedContext() failed
   pix_fmt rgbf32le
output format rgbaf32le
   FFVideoConvert::convert_picture_frame:
sws_getCachedContext() failed   pix_fmt
rgbf32le
 output format rgbf32le

for rgba-float pipeline, or


FFVideoConvert::convert_picture_frame: sws_getCachedContext() failed
   pix_fmt rgbf32le
 output format rgba

for rgba-8 pipeline.


tiff images from


https://github.com/imageio/imageio/files/7697625/TestImages_float32_Photoshop.zip

our ffmpeg.C

http://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/cinelerra/ffmpeg.C;h=e95cc87e6da6f8c835a199db8ea445d9696a8190;hb=HEAD

I just added mappings to

case BC_RGBA_FLOAT: return AV_PIX_FMT_RGBAF32LE;

and from libavcodec

case AV_PIX_FMT_RGBAF32LE:  return BC_RGBA_FLOAT;

did I miss something in setup parameters for this format?
___
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] A question about video encoding.

2023-11-13 Thread Andrew Randrianasulu
пн, 13 нояб. 2023 г., 14:35 Aditya Dandavate :

> On Sun, 12 Nov, 2023, 11:15 pm Andrew Randrianasulu, <
> randrianas...@gmail.com> wrote:
>
> > вс, 12 нояб. 2023 г., 20:23 Aditya Dandavate <
> adityadandavat...@gmail.com
> > >:
> >
> >
> > > So, Should I stick to h264_qsv or mpeg4 ? In general, which encoder
> gives
> > > higher quality at the same bitrate ?
> > >
> >
> > Hardware encoders used to be not good at 2-4-6 Mbs range for live
> > streaming, but from existence of some bluray compat option in nvenc
> wrapper
> > I can guess at BluRay bitrates they might be quite good?
>
>
> I am using Intel, so I can't use Nvenc. So, which encoder should I stick to
> for better quality or higher quality at same bitrate, h264_qsv or mpeg4 ?
>


well, from brief search g3240 Pentium from around  year 2014.

I have laptop with just slightly earlier Intel CPU/GPU (Sandybridge era),
but I only tried h264_vaapi, and not QSV.

for me 1080p 24 fps re-encode from yt-dlp download,  at default setting was
ok quality-wise, but I might be not best person to ask about visual quality.

Back in the day (2003-5) I used  ffmpeg (mencoder) for live-capturing tv /
vhs stream with mpeg4 or asv2 (Asus video codec 2). Probably not best
quality, but back then there was no hw encoders (for me, under Linux) so
only way to encode was lowering capture resolution until process become
realtime at 25 fps.

You probably do not need strictly realtime encode, so ...

I guess it also depend on where exactly you intend to play this stream. If
intended device only have mpeg4 (ASP) decoder, or can't decode h264 stream
at given resolution - then stick to mpeg4.

If on the contrary your hardware ONLY can accelerate h264 stream as encoded
by hw encoder - then go for it, if you are ok with quality (hw encoders
might behave a bit different comparing to software ones when scene abruptly
changes )

Honestly, people were writing multipage articles comparing various codecs
at various resolutions and input sequences. But for non-scientific use  -
just trust your eyes, I guess?

___
> 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] UVC Interlaced Video

2023-11-12 Thread Andrew Randrianasulu
сб, 11 нояб. 2023 г., 13:05 Zdravko Ćirić :

> Hello all,
>
> I'm trying to combine an alternating fields interlaced video stream from an
> UVC video device. The device is an analog (CVBS) to digital converter that
> supports Interlaced video through usage of the FID flag in the UVC data
> headers. USB Video Class documentation explanation "One field per sample:
> Each sample contains only one field and the FID bit is used to indicate
> whether a given video sample contains a top field or a bottom field".
> Stream frame size is 720x288pix at 50fps and the output video should be
> "combed" and result in a 720x576pix video at 25fps.
>
> I tried weave and tinterlace filters but it works on random as ffmpeg seems
> to miss the data regarding the field polarity.
>
> Could ffmpeg make use of this flag so that i can join two fields in one
> frame in correct order?
>

good question.

I looked into source and there seems to be some support for reading
interlace and esp. top field first signal in there?


if (fmt.fmt.pix.field == V4L2_FIELD_INTERLACED) {
av_log(ctx, AV_LOG_DEBUG,
   "The V4L2 driver is using the interlaced mode\n");
s->interlaced = 1;


but also

static int first_field(const struct video_data *s)
{
int res;
v4l2_std_id std;

res = v4l2_ioctl(s->fd, VIDIOC_G_STD, );
if (res < 0)
return 0;
if (std & V4L2_STD_NTSC)
return 0;

return 1;
}


does this mean this function always return "not a top field" if format ==
NTSC?

due to this chunk below ..
=
if ((res = mmap_init(ctx)) ||
(res = mmap_start(ctx)) < 0)
goto fail;

s->top_field_first = first_field(s);

st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
st->codecpar->codec_id = codec_id;
=


src is

ffmpeg-6.1/libavdevice/v4l2.c

>
>
> Thank you in advance
> ___
> 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] A question about video encoding.

2023-11-12 Thread Andrew Randrianasulu
вс, 12 нояб. 2023 г., 20:23 Aditya Dandavate :

> I have an Intel Pentium G3240 processor.
> This is a quite a low end processor and even x264 etc is cpu-intensive and
> even encoding with this encoder is really slow. (6.0 to 6.5 fps with medium
> preset).
>
> I encoded some videos with mpeg4 video encoder and h264_qsv encoder. The
> results I got was the speed of h264_qsv with preset veryslow, is almost the
> same to mpeg4 -q:v 5, with 15000k bitrate for both encoders. libopus was
> audio encoder with 320kbps bitrate for both encoding settings.
> (h264_qsv = 16-17 fps, mpeg4 = 18-19 fps).
>

well, isn't it depend on frame size and fps too?

15 Mbit/s  * h264 sounds quite good bitrate for say, 1080p30, but h264 in
general allows for less bitrate at similar quality. So watch them both and
decide? I think at 25+ MB/s even old standby like mpeg2 can deliver not so
bad quality at full hd? I used to think that empirically mpeg4 compress 1/3
better than mpeg2, then h264 shaves thid more, and so on, at progressively
highr cpu usage on both decode and encode. Of course there is plenty of
knobs to tune, vbr vs cbr vs two-pass vbr ... this rabbit hole goes deep!


> So, Should I stick to h264_qsv or mpeg4 ? In general, which encoder gives
> higher quality at the same bitrate ?
>

Hardware encoders used to be not good at 2-4-6 Mbs range for live
streaming, but from existence of some bluray compat option in nvenc wrapper
I can guess at BluRay bitrates they might be quite good?

watch water/fire scene - usually they hard to encode.

> ___
> 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] 6.1 is out but I have request

2023-11-11 Thread Andrew Randrianasulu
сб, 11 нояб. 2023 г., 18:20 Gyan Doshi :

>
>
> On 2023-11-11 08:03 pm, Andrew Randrianasulu wrote:
> > For announcement writer(s) - can you please at least list API changes
> with
> > pointer to documentation section?
>
> See doc/APIchanges
>

well, there is for example line


2023-03-xx - xx - lavfi 9.5.100 - avfilter.hAdd
AVFILTER_FLAG_HWDEVICE.

but it does not tell me what exactly this flag does. For exact usage I need
to dive in git log/mail list ... repeat for all entries .


btw, Cingg does support building with ffmpeg git, JUST this option
sometimes broke even w/o our patches!

--with-git-ffmpeg=https://git.ffmpeg.org/ffmpeg.git \

for  git url git://git.cinelerra-gg.org/goodguy/cinelerra.git


you can move put thirdparty/src/ffmpeg.git.patch* if they fail to build, so
far it was working modulo CUDA update in late September (do we need also
ffheaders update? will it work on legacy nvidia drivers?)

I try to handle build failures as fast as I can, but as my 20 years long
history of using Linux (Slackware since 2005, before that Alt Linux 2.x)
tell me - I can't just jump over ALL problems I encounter, only simple
ones! So especially for me there IS ceiling on what kind of adaptations I
can do, no matter how much time I can throw at it (and other components
tend to regress too - mesa, kernel, wine, llvm ...). At some point it
become overwhelming.



> Regards,
> Gyan
>
>
> >
> > As someone who tries to co-maintain software (cinelerra-gg) relying on
> > ffmpeg AND other libraries fishing out changes and examples out of git
> log
> > exhaust me and makes me sad.
> > ___
> > 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 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] 6.1 is out but I have request

2023-11-11 Thread Andrew Randrianasulu
For announcement writer(s) - can you please at least list API changes with
pointer to documentation section?

As someone who tries to co-maintain software (cinelerra-gg) relying on
ffmpeg AND other libraries fishing out changes and examples out of git log
exhaust me and makes me sad.
___
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] trying to save its output to the input

2023-11-10 Thread Andrew Randrianasulu
пт, 10 нояб. 2023 г., 22:01 Mark Filipak :

> Never mind. I see it. Duh?
>



you missed "-i" before input?

> ___
> 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] question about opencl use in decoders/encoders

2023-11-07 Thread Andrew Randrianasulu
ср, 8 нояб. 2023 г., 00:36 Dennis Mungai :

> On Tue, 7 Nov 2023 at 00:55, Andrew Randrianasulu  >
> wrote:
>
> > FFmpeg today support some opencl filters (but I was unable to use them
> > freely in Cinelerra-gg probably because they require not just
> > initialization of hw device but also manual up and download of data ...)
> >
> > but I wonder if same opencl infra can be used in decoders and encoders
> too?
> >
> >
> >
> https://cml.news/g/cml-raw-log-hdr/topic/braw_codec_analysis/25749037?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,25749037
> >
> > apparently those big player codecs use it, so it should be possible
> > technically, just at some dev time cost ...
> >
> > there is also some prores gpu accelerated decoder (closed source, win)
> >
> > https://mogurenko.com/2020/11/15/cuda-optimized-prores-decoder/
> >
> > and of course old standby mjpeg:
> >
> > https://github.com/nctu-pp/mjpeg-encoder
> >
> > (opencl part does not seems to work for me, but may be it basically
> > artefact of running in 32bit x86 mode , I filled mesa bug about it
> >
>
>
> Hello Andrew,
>
> I hope this email finds you well.
> In FFmpeg, OpenCL is primarily utilized in specific filters, a list of them
> which you can verify in your build(s) with OpenCL enabled via :
>
> ffmpeg -filters | grep opencl
>
> On the encoding side, to the best of my knowledge, the libx264 encoder
> wrapper implements lookahead (LA) bits that can be offloaded to an OpenCL
> capable GPU.
>


yeah, something to test! thanks for reminder.

Some users have reported potential performance gains in production, even
> upstream where there's still consensus on whether this feature should be
> deprecated.
> See this merge request's comments on the same:
> https://code.videolan.org/videolan/x264/-/merge_requests/66
>
> Separate from FFmpeg:
>
> 1. There are also implementations of VP9 encoders utilizing OpenCL-based
> offloading, such as the VP9 encoder by Ittiam systems:
>
> https://www.ittiam.com/resource/ittiam-enables-opencl-based-vp9-encode-for-mobile-and-consumer-applications/
> ,
> whose code can be viewed here https://github.com/ittiamvpx/libvpx



nice find, it even builds like this on my end

LDFLAGS="-lOpenCL" setarch i686 ./configure --enable-opencl

after I fixed little 32bit configure bug:

-check_cpp < 2. A VP8 OpenCL-based encoder: https://github.com/Aazmp/vp8oclenc
> 3. And other derivatives of (1) above:
> https://github.com/awatry/libvpx.opencl
>
> I had also posted on this mailing list earlier regarding OpenCL somewhere
> in ~2018, may require verification for correctness:
> https://ffmpeg.org/pipermail/ffmpeg-user/2018-April/039610.html
>
> Hope that helps :-)
>


surely!

___
> 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] Seeking Efficient Video Redaction Using FFMPEG with Limited Memory Usage

2023-11-07 Thread Andrew Randrianasulu
вт, 7 нояб. 2023 г., 20:57 Carl Zwanzig :

> On 11/7/2023 10:00 AM, Paul B Mahol wrote:
> > I can answer it,
>
> Then DO SO! There's no reason to hold back.
>

well, I am not sure if anything can pull 2000 filters ON TOP of each other
(src-> f1 -> f2 -> f3 ... -> f2000 ->end)

but applying dynamic selection of some (software, single input/output, same
kind) filters pissible over timeline in CinelerraGG


https://www.cinelerra-gg.org/

Paul also did make another GUI for complex filtergraphs (second link)

https://github.com/RomanSichkaruk/FFmpegGUI

https://github.com/richardpl/lavfi-preview





> > but I guess OP will listen to your usual misinformation.
>
> What is misinformation? Tell us. If you can't or won't, then maybe what I
> said is actually correct.
>
> 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".
>
___
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] question about opencl use in decoders/encoders

2023-11-06 Thread Andrew Randrianasulu
FFmpeg today support some opencl filters (but I was unable to use them
freely in Cinelerra-gg probably because they require not just
initialization of hw device but also manual up and download of data ...)

but I wonder if same opencl infra can be used in decoders and encoders too?

https://cml.news/g/cml-raw-log-hdr/topic/braw_codec_analysis/25749037?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,25749037

apparently those big player codecs use it, so it should be possible
technically, just at some dev time cost ...

there is also some prores gpu accelerated decoder (closed source, win)

https://mogurenko.com/2020/11/15/cuda-optimized-prores-decoder/

and of course old standby mjpeg:

https://github.com/nctu-pp/mjpeg-encoder

(opencl part does not seems to work for me, but may be it basically
artefact of running in 32bit x86 mode , I filled mesa bug about 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".


Re: [FFmpeg-user] bad video settings

2023-10-27 Thread Andrew Randrianasulu
пт, 27 окт. 2023 г., 15:14 frhun :

>
> Hello everyone
>
> I have a problem
>
> youtube say this:
>
> "
> ffmpeg For the keyframe frequency, set a maximum of four seconds.
> Currently sending frames is not frequent enough, which causes buffering.
> The current key frame rate is 9.0 seconds. Processing errors may cause
> incorrect GOP (group of pictures) size.
>
> "
>

may be try "-g 25" for keyframe every  25 frames, or up to 100 for 4
seconds of 25 fps video  I think default is 250?



> my ffmpeg command is :
>
> ffmpeg -r 25 -rtsp_transport tcp -i
> rtsp://admin:admin@192.168.2.21/Streaming/Channels/1 -c:v libx264 -b:v
> 2M -c:a aac -vf "[in]drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='Z\:\\kolibry2\\verseny\\T_A\\Piros.txt': x=115: y=20:
> reload=1: fontcolor=black: fontsize=30: box=1: boxborderw=5:
> boxcolor=red@0.8 , drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='Z\:\\kolibry2\\verseny\\T_A\\Feher.txt': x=115: y=55:
> reload=1: fontcolor=black: fontsize=30: box=1: boxborderw=5:
> boxcolor=white@0.8 , drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='Z\:\\kolibry2\\verseny\\T_A\\Ora.txt': x=20: y=20: reload=1:
> fontcolor=black: fontsize=35: box=1: boxborderw=5: boxcolor=aqua@0.8 ,
> drawtext=fontfile='C\:\\Windows\\Fonts\\cour.ttf':
> textfile='Z\:\\kolibry2\\verseny\\T_A\\Merkozes.txt': x=20: y=53:
> reload=1: fontcolor=black: fontsize=28: box=1: boxborderw=5:
> boxcolor=yellow@0.8[out]" -preset ultrafast -f flv
> rtmp://a.rtmp.youtube.com/live2/----
>
> I found many variations, none of them worked, youtube always complains
> about wrong settings.
>
> The point is to get the picture from the ethernet camera, add some text
> and send it to youtube
>
> If it is not transcoded this way, then direct copy will get youtube
> without errors.
>
>
> thanks in advance
> Robert
> ___
> 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] libcamera_android build fix?

2023-10-25 Thread Andrew Randrianasulu
diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c

 index 602b59047d..c981985f10 100644   ---
a/libavdevice/android_camera.c
+++ b/libavdevice/android_camera.c
 @@ -648,8 +648,8 @@ static int add_display_matrix(AVFormatContext *avctx,
AVStream *st)
 av_display_matrix_flip(display_matrix, 1, 0);
}

-side_data = av_packet_side_data_new(>codecpar->side_data,

->codecpar->nb_side_data,

 +side_data = av_packet_side_data_new(>codecpar->coded_side_data,

 +
>codecpar->nb_coded_side_data,
   AV_PKT_DATA_DISPLAYMATRIX,
 sizeof(display_matrix), 0);



something like this.

but it still does not work from console

configure:

./configure --enable-jni --enable-mediacodec --enable-neon
--target-os=android --disable-outdevs --disable-indev=xcbgrab

run:

./ffmpeg  -pixel_format nv12 -loglevel trace -f android_camera
-camera_index 1 -input_queue_size 5 -video_size 1280x720 -i 0:0 -c:v
libx264 -g 30 -b:v 980k -r 30 -s 1280x720 -b:a 28k 11test.mp4

it just sits here doing nothing, I guess waiting for application window?

[android_camera @ 0xb471aebc64d0] Android camera capture session is
active.


I found similar question at
https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg21783.html

and this explanation of  camera api:

https://www.sisik.eu/blog/android/ndk/camera
___
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] ffmpeg git and makeinfo 7.1 error?

2023-10-25 Thread Andrew Randrianasulu
I am trying to build new ffmpeg on my aarch64 termux installation.

pulled git long time ago, now tried to integrate libxcam filter (without
libxcam installed for now) but I think I run into unrelated build error:

makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine
::Config::set_from_init_file called at ./doc/t2h.pm line 24.

using

makeinfo --version
texi2any (GNU texinfo) 7.1


as packaged by termux.

configure line was

./configure --enable-jni --enable-mediacodec --enable-neon
--target-os=android --disable-devices

git log set at base a4877f1ec11e0327684eda37b15bc1ccb16f9ace

and just-compiled (with "make ffmpeg" after docs build err) ffmpeg says:

~/ffmpeg $ ./ffmpeg -h
   ffmpeg version N-112509-g265b40e489 Copyright (c) 2000-2023 the FFmpeg
developers
  built with clang version 17.0.3
  configuration: --enable-jni --enable-mediacodec --enable-neon
--target-os=android --disable-devices
  libavutil  58. 27.100 / 58. 27.100
libavcodec 60. 30.102 / 60. 30.102
  libavformat60. 15.100 / 60. 15.100
libavdevice60.  2.101 / 60.  2.101
libavfilter 9. 11.100 /  9. 11.100
  libswscale  7.  4.100 /  7.  4.100
  libswresample   4. 11.100 /  4. 11.100

libxcam filter at patchwork:

https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200731145710.114479-1-wei.z...@intel.com/#56952

I just added const keyword to libavfilter/allfilters.c change, like in
other cases
___
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] A question about video codecs.

2023-10-15 Thread Andrew Randrianasulu
вс, 15 окт. 2023 г., 23:17 Phil Rhodes via ffmpeg-user <
ffmpeg-user@ffmpeg.org>:

>
> > We removed cinepak encoder and decoder long time ago.
> Boo! Vector compression is beautiful!
>

I think Paul trolled us a bit, from that I can see Cinepack decoder and
encoder still around at

https://git.ffmpeg.org/gitweb/ffmpeg.git/tree/HEAD:/libavcodec


> ___
> 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] mlv demuxer fails to set codec?

2023-10-08 Thread Andrew Randrianasulu
I was playing around with raw2mlv utility and thus downloaded sample file
from this forum post:

https://www.magiclantern.fm/forum/index.php?topic=25945.0

https://www.dropbox.com/s/p2j112gyph5ywzu/ElgersburgBHF.zip?dl=0

around 20 mb.

relatively recent ffprobe from git (as part of Cinelerra-GG compilation)
showed this:


guest@slax:~/botva/src/src/MLV-App$
/dev/shm/tmp/cinelerra-goodguy-20231001/cinelerra-5.1/thirdparty/ffmpeg.git/ffprobe
/dev/shm/ElgersburgBHF/ElgersburgBHF.MLV   [mlv @ 0xcc1ea80]
unknown video class is not implemented. Update your FFmpeg version to the
newest one from Git. If the problem still occurs, it means that your file
has a feature which has not been implemented.
[mlv @ 0xcc1ea80] If you want
to help, upload a sample of this file to
https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
list. (ffmpeg-de...@ffmpeg.org)  Ignoring attempt to set invalid timebase
1/0 for st:1
 [mlv @ 0xcc1ea80] unsupported tag RAWC, size 16  [mlv @ 0xcc1ea80]
unsupported tag DISO, size 8[mlv @ 0xcc1ea80] unsupported tag
DARK, size 7862468
[mlv @ 0xcc1ea80] unsupported tag VERS, size 102  [mlv @ 0xcc1ea80]
unsupported tag VERS, size 144  [mlv @ 0xcc1ea80] unsupported tag VERS,
size 172  [mlv @ 0xcc1ea80] unsupported tag VERS, size 132  [mlv @
0xcc1ea80] unsupported tag VERS, size 160[mlv @ 0xcc1ea80] unsupported
tag VERS, size 140  [mlv @ 0xcc1ea80] unsupported tag VERS, size 164
  [mlv @ 0xcc1ea80] unsupported tag VERS, size 156  [mlv @ 0xcc1ea80]
unsupported tag VERS, size 144[mlv @ 0xcc1ea80] unsupported tag VERS,
size 164  [mlv @ 0xcc1ea80] unsupported tag VERS, size 140[mlv @
0xcc1ea80] Opening '/dev/shm/ElgersburgBHF/ElgersburgBHF.M00' for reading

 [mlv @ 0xcc1ea80] Stream #0: not enough frames to estimate rate; consider
increasing probesize
 [mlv @ 0xcc1ea80] Could not find codec parameters for stream 0 (Video:
none (BIT[16] / 0x10544942), bayer_rggb16le, 1920x2340): unknown codec
   Consider increasing the value for the 'analyzeduration' (0) and
'probesize' (500) options

 Input #0, mlv, from '/dev/shm/ElgersburgBHF/ElgersburgBHF.MLV':

Metadata:

guid: 0x5de63cb3069b16ba
cameraName  : Canon EOS 5D Mark III
cameraModel : 2147484293
cameraSerial: 122A888172
 isoMode : manual

  isoValue: 1600

isoAnalog   : 104

digitalGain : 0

 shutterValue: 29982

 focalLength : 50

focalDist   : 0

 aperture: 140
 stabilizerMode  : 0

 autofocusMode   : 3

  flags   : 0

lensID  : 198

lensName: EF50mm f/1.4 USM
lensSerial  : 0
  wb_mode : 0
 kelvin  : 2500
 wbgain_r: 491
wbgain_g: 1024
wbgain_b: 638
wbs_gm  : 0
 wbs_ba  : 0
time: 2021-01-06 19:40:27
 Duration: 00:00:00.21, start: 0.00, bitrate:
1082282 kb/s
 Stream #0:0: Video: none (BIT[16] / 0x10544942), bayer_rggb16le,
1920x2340, 23.98 tbr, 23.98 tbn   Stream #0:1: Audio: pcm_s16le
([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s
Unsupported codec with id 0 for input stream 0  guest@slax
:~/botva/src/src/MLV-App$


ffmpeg was at version 3ba3e188b32a48cfca36f02ea9671e22f4c2482c


I guess new mlv definition lives somewhere inside MLV-App (compiled it too
from git, seems to works with this specific file)
___
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] Trying to remember how I did this.....

2023-10-04 Thread Andrew Randrianasulu
ср, 4 окт. 2023 г., 10:34 Mark Dm :

> Its NOT Telecine. It is Digital Video 8 video at 27.97 FPS
> I am looking specifically for the setting that derives the 59.94FPS from
> the 27.97 FPS source with such beauty and without deinterlace.
>

this answer mentions yadif=1

https://superuser.com/questions/610618/double-deinterlace-with-full-motion-ffmpeg-yadif-50i-50p-60i-60p

may be it will work for your case?



> On Wed, Oct 4, 2023 at 12:28 AM Laine  wrote:
>
> >
> >
> >
> > > On Oct 4, 2023, at 1:36 AM, Mark Dm  wrote:
> > >
> > > I had some DVD Video that I had converted using ffmpeg some years ago.
> > What
> > > I did was converted NTSC DVD video (4x3) to 960x720 @59.94 FPS and the
> > > result was incredible. I had found a forum some time later where
> another
> > > user claimed he had done the same and he too had incredible results.
> The
> > > result as I recall is way better than deinterlacing and I still have
> some
> > > of the videos I upscaled this way. . It essentially creates a frame
> > > for every field and if I pause the video I may see a slight blur but no
> > > scan lines. I also see no scan lines while video is playing
> > >
> > > I do remember that I did it all with ffmpeg command line conversions.
> It
> > > does NOT use deinterlacing as that throws away half the resolution, and
> > > results in visible scan lines. Instead it increases the frame rate by
> two
> > > and I chose to upscale to 720P. As I recall I also did some PAL as well
> > as
> > > NTSC using the same method.
> > >
> > > I am looking to recover this method if I can as I will be transferring
> a
> > > bunch of Digital8 videos and want to do it the same way to create mp4
> > files
> > > at 720P@59.94FPS
> > >
> > > Any help appreciated
> > >
> > > THanks
> > >
> > > Mark
> >
> > For NTSC DVD you might want pullup. There’s more than one way to apply
> > pullup. What normally works best for me for NTSC DVD is to specify the
> > output frame rate with "-r 24000/1001" and use some sort of fieldmatch
> > video filter such as “fieldmatch" alone or
> > "fieldmatch=order=tff:combmatch=none,decimate”. You may find that it
> isn’t
> > necessary to specify the 24.976 frame rate. Use the filter before scaling
> > or cropping in the filter chain. The source video needs to be pretty
> clean
> > regarding pulldown (without or nearly without any dropped frames). You
> > should be able to identify the pulldown pattern in your source by
> stepping
> > through it frame by frame with a video player app such as IINA. By
> default
> > it’s the “.” (period) key. If it’s telecine, you’ll be able to observe 3
> > progressive frames followed by 2 pairs of interlaced frames. Something to
> > try, anyway.
> >
> > L. Lee
> >
> >
> >
> > ___
> > 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 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] Is there a way to re-encode an inefficiently encoded file without losing quality and reducing file size?

2023-09-30 Thread Andrew Randrianasulu
вс, 1 окт. 2023 г., 02:43 Stéphane Archer :

> Let's say you have a video file encoded with high bitrate with the
> ultra-fast preset in H.264 because you couldn't afford CPU at that time.
> Now you have a huge file mostly because it was encoded quickly.
>
> You are now two days later with access to a good CPU and GPU.
>
> If you re-encode that file to save space then you are going to lose quality
> because even AV1 with a high bitrate is lossy (and you want to reduce that
> high bitrate)
>
> Otherwise, you can try transcoding using lossless compression but during my
> testing, this is making the file way bigger no matter what I tried.
>
> So basically, I can lose quality, or keep the big original file...
> Do you know a better way? Is there a way to re-encode that inefficiently
> encoded file without losing quality and reducing file size?
>


may be try two-pass encoding?

>
> Best regards
>
> Stéphane Archer
> ___
> 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] How to merge and map 1 video file with 4 audio files?

2023-09-30 Thread Andrew Randrianasulu
сб, 30 сент. 2023 г., 20:58 MediaMouth :

>
>
> > On Sep 30, 2023, at 09:31, Andrew Randrianasulu 
> wrote:
> >
> > may be remove all OUTPUT_CHx lines so output will be clearly into one mxf
> > file?
>
> Thanks Andrew, will try!
>
> What made you think removing the "remove all OUTPUT_CHx " was the right
> move?
>


I thought so only from my limited expirience with ffmpeg cli, it looked
like ffmpeg was trying to output to those  OUTPUT_CHx as files and failed
because it was not obvious (usually from extension) what kind of container
it must be.

I think there is option for channel rerouting in containers


from man ffmpeg

-layouts
   Show channel names and standard channel layouts.


> What I'm hoping for, big picture, is to understand in detail routing
> source to dest.  The documentation seems clear enough, but the errors I got
> suggest I didn't quite figure it out yet.
>
> Thx
>
>
> ___
> 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] Is there an equivalent of Drobox Lepton but for h.264 videos?

2023-09-30 Thread Andrew Randrianasulu
сб, 30 сент. 2023 г., 19:31 Stéphane Archer :

> On Sat, Sep 30, 2023 at 11:00 AM David Bernat 
> wrote:
>
> > Been very seriously considering design scope. Dropbox is a no-go. Want to
> > connect offline to describe your use case?
> >
> >
> > On Sat, Sep 30, 2023 at 10:10 AM Stéphane Archer <
> archersteph...@gmail.com
> > >
> > wrote:
> >
> > > On Sat, Sep 30, 2023 at 10:00 AM Andrew Randrianasulu <
> > > randrianas...@gmail.com> wrote:
> > >
> > > > сб, 30 сент. 2023 г., 16:58 Stéphane Archer <
> archersteph...@gmail.com
> > >:
> > > >
> > > > > Is there an equivalent of Drobox Lepton but for h.264 videos?
> > > > > Lepton is a lossless compression algorithm to compress jpeg at
> around
> > > 20%
> > > > > there initial file size without any data loss. This is ideal to
> > > > > achieve jpeg.
> > > > > What about h.264 videos?
> > > > >
> > > >
> > > >
> > > > well, h264 videos already heavy and usually lossy compressed, any
> > further
> > > > compression will be not lossless
> > > >
> > >
> > > lepton works on jpeg that are lossy, yet they manage to have a smaller
> > file
> > > size adding a lossless compression on top of it.
> > > I'm not sure why it won't be possible to do the same on a h.264 file
> and
> > > get a smaller file size. I know h.265 and av1 have lossless video
> > > compression. And I recently heard about FFV1.
> > >
> >
>
> Dear David, I don't understand what you mean by "design scope".
>
> I would like to try a different analogy
>
> If the data was text and I wanted lossy compression then I would replace
> all the vowels with an "a" and then compress the resulting data with gzip.
>
> now if I switch gzip by using lzma instead, I would end up with a file
> smaller or the same size as the gzip version. Why does lossless h.265 or
> lossless av1 give me a larger file size than the original h.264? Why is
> this different for video?
>

As far as I understand all those h26x series of codes use

https://en.m.wikipedia.org/wiki/Motion_estimation

so  only small difference between non-keyframes encoded, making file
smaller (unless you try to compress say analog tv noise ...)

DCT part is usually lossy by dropping some numbers ...

so, if I understand correctly you can repack jpeg slightly differently, or
recompress it completely into something like jpeg-xl, but video usually get
a lot more info already removed, due to way only parts of image usually
changes from frame to frame.



> I hope my text compression analogy was clear.
>
> --
> Best Regards,
>
> Stephane Archer
> ___
> 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] How to merge and map 1 video file with 4 audio files?

2023-09-30 Thread Andrew Randrianasulu
сб, 30 сент. 2023 г., 19:08 Media Mouth :

> How to merge and map 1 video file with 4 audio files?
>
> We've have 1 video file, 4 audio files, all same length.
> The video file is DNxHD36
> The audio tracks are all .wav
>
> The goal is to merge all 5 files in sync
>
> Based on https://ffmpeg.org/ffmpeg.html#Advanced-options I tried the
> following:
>
> ffmpeg \
> -i 'Video.mxf' \
> -i 'Audio1.wav' \
> -i 'Audio2.wav' \
> -i 'Audio3.wav' \
> -i 'Audio4.wav' \
> -c:v copy \
> -c:a pcm_s24le \
> -map 0:v:0 \
> -map_channel 1.0.0 OUTPUT_CH0 \
> -map_channel 2.0.0 OUTPUT_CH1 \
> -map_channel 3.0.0 OUTPUT_CH2 \
> -map_channel 4.0.0 OUTPUT_CH3 \
> '/Volumes/ANF_VFX/prjx531-Xfers/ANF_103_230908_Soft Lock_MixStage_test.mxf'
>
> Getting error
> [NULL @ 0x7f814601a200] Unable to find a suitable output format for
> 'OUTPUT_CH0'
> OUTPUT_CH0: Invalid argument
>


may be remove all OUTPUT_CHx lines so output will be clearly into one mxf
file?

>
> Also tried removing the extra 0 in the -map_channel lines,
> e.g. -map_channel 1.0 OUTPUT_CH0 instead of
> -map_channel 1.0.0 OUTPUT_CH0
>
> Got error
> Syntax error, mapchan usage: [file.stream.channel|-1][:syncfile:syncstream]
>
>
>
> ___
> 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] Is there an equivalent of Drobox Lepton but for h.264 videos?

2023-09-30 Thread Andrew Randrianasulu
сб, 30 сент. 2023 г., 16:58 Stéphane Archer :

> Is there an equivalent of Drobox Lepton but for h.264 videos?
> Lepton is a lossless compression algorithm to compress jpeg at around 20%
> there initial file size without any data loss. This is ideal to
> achieve jpeg.
> What about h.264 videos?
>


well, h264 videos already heavy and usually lossy compressed, any further
compression will be not lossless

>
> --
> Best Regards,
>
> Stephane Archer
> ___
> 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] mplayer's vdpau output broke after ffmpeg git be07145109074e128bd7a8255d81a2b9fdcdf10b

2023-08-17 Thread Andrew Randrianasulu
I was testing nouveau's vdpau state tracker and realized only MPlayer
1.5 was working, but not svn.

I bisected ffmpeg embedded in mplayer's tree and found this:

===
be07145109074e128bd7a8255d81a2b9fdcdf10b is the first bad commit
commit be07145109074e128bd7a8255d81a2b9fdcdf10b
Author: Lynne 
Date:   Thu Mar 10 18:03:05 2022 +0100

avcodec: add AVHWAccel.free_frame_priv callback


git bisect log
git bisect start
# good: [47ac3e60653da651dfa064b649d0ac297560d8d5] version.h: Bump
minor post 6.0 branch
git bisect good 47ac3e60653da651dfa064b649d0ac297560d8d5
# bad: [81a48d96e2c343625da54a19ca9ac33691cd6699] cbs_h266:
slice_header, fix inference for pred_weight_table
git bisect bad 81a48d96e2c343625da54a19ca9ac33691cd6699
# good: [74b202b8395e7ce7150a51d682c342dbd83262bc] hwcontext_vulkan:
enable VK_KHR_synchronization2 if supported
git bisect good 74b202b8395e7ce7150a51d682c342dbd83262bc
# bad: [46a5b9e2c063f7a6776323afdebe6d9558ba96c1]
avcodec/tests/avcodec: Remove unnecessary internal.h inclusion
git bisect bad 46a5b9e2c063f7a6776323afdebe6d9558ba96c1
# bad: [091705cd55afe08f0c85d673dc924856fef9ae6e]
avformat/mov_demuxer: Extended MOV demuxer to handle EVC video content
git bisect bad 091705cd55afe08f0c85d673dc924856fef9ae6e
# bad: [87b576135e4b647ed5e434dd0d6acd09538f915e]
fftools/ffmpeg_filter: factor out binding an output stream to
OutputFilter
git bisect bad 87b576135e4b647ed5e434dd0d6acd09538f915e
# bad: [e49b8b48cd4362392d28c7e0dcf04744aaf1ace7] av1: set skip mode
frames properly
git bisect bad e49b8b48cd4362392d28c7e0dcf04744aaf1ace7
# good: [b15104ed97185e3e66d7a29322f656b358f54252] vulkan: add support
for retrieving queue, query and video properties
git bisect good b15104ed97185e3e66d7a29322f656b358f54252
# good: [d26cbae3e18afb22e170baf1af17392c975353c7] flip_vulkan: port
for the rewrite
git bisect good d26cbae3e18afb22e170baf1af17392c975353c7
# good: [9675e54b02acb7cdd6c3d655c9f09eba9f23ec6f]
avutil/hwcontext_vulkan: add libplacebo required features
git bisect good 9675e54b02acb7cdd6c3d655c9f09eba9f23ec6f
# bad: [023ae6103f0e0db1610ef3988290e37fea47661d] libavcodec: add
Vulkan common video code
git bisect bad 023ae6103f0e0db1610ef3988290e37fea47661d
# bad: [be07145109074e128bd7a8255d81a2b9fdcdf10b] avcodec: add
AVHWAccel.free_frame_priv callback
git bisect bad be07145109074e128bd7a8255d81a2b9fdcdf10b
# good: [09dc9193ea527f32e473456433c4e0c317a8f513] lavfi: add bwdif_vulkan
git bisect good 09dc9193ea527f32e473456433c4e0c317a8f513
# first bad commit: [be07145109074e128bd7a8255d81a2b9fdcdf10b]
avcodec: add AVHWAccel.free_frame_priv callback


MPlayer svn

r38435 | ib | 2023-07-17 13:05:58 +0300 (Пн, 17 июл 2023) | 2 lines

Revise comments in the desktop file.

command for compiling:

 ./configure --enable-debug && make -j8

command for testing

./mplayer -vc ffh264vdpau ~/botva/vid/Selfie\ \&\ Delfie\,\ Dolphins\
in\ the\ Baltic\ Sea-jXvJgEcRLpQ.mp4
___
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".