Re: [FFmpeg-user] How do I determine quantization of an mp4 file?

2021-04-29 Thread Tobias Rapp

On 27.04.2021 20:38, David Niklas wrote:

Hello,
If I ffprobe an mp4 file I can see things like its bitrate and its
resolution. But, I can't find what the quantization of the video is.

How can I determine that?


You can take a look at the pixel format (pix_fmt) value of the video 
stream. To map the pixel format into bits-per-pixel use the table 
printed by "ffprobe -pix_fmts". Or for more information about the pixel 
formats including the bit-depth per components use "ffprobe 
-show_pixel_formats -print_format json".


Regards,
Tobias

___
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 do I determine quantization of an mp4 file?

2021-04-30 Thread Tobias Rapp

On 29.04.2021 16:47, David Niklas wrote:

[...]

But when I try to come up with a useful value from that data I get a very
large value. Much higher than the typical 24-60 or so for quantization
that I see in files I encode.

Have I gotten the formula correct?

Size WxH  BPP FPSDuration   Bitrate
(1920*1080*12*29.97*((22*60)+09.2))/1074000


Likely I was confused about the meaning of the term "quantization" here. 
Maybe you mean the ratio between compressed and uncompressed video 
stream? If "Bitrate" stands for the data rate of the MP4 video stream 
(excluding audio and container) in bits per second, the formula for the 
compression ratio in percent should look like:


Bitrate * 100 / (Frame Width * Height * BitsPerPixel * FrameRate)

Where a value of 100% means no compression and a value of 20% means that 
the output stream size takes one fifth of the input stream size. In your 
scenario the compression ratio is around 14%.


Regards,
Tobias

___
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] Preserving AAC LC status when converting to fragmented MP4

2021-05-19 Thread Tobias Rapp

On 14.05.2021 15:31, Simon Brown wrote:
[...] 


For although there it says aac (LC) if I run mp4info on the resultant file
I get this:

[...]

Track 2:
   flags:3 ENABLED IN-MOVIE
   id:   2
   type: Audio
   duration: 0 ms
   language: und
   media:
 sample count: 0
 timescale:48000
 duration: 0 (media timescale units)
 duration: 0 (ms)
 bitrate (computed): 125.373 Kbps
 sample count with fragments: 848
 duration with fragments: 868354
 duration with fragments: 18091 (ms)
   Sample Description 0
 Coding:  mp4a (MPEG-4 Audio)
 Stream Type: Audio
 Object Type: MPEG-4 Audio
 Max Bitrate: 128250
 Avg Bitrate: 0
 Buffer Size: 0
 Codecs String: mp4a.40.0
 MPEG-4 Audio Object Type: 0 (UNKNOWN)
 Sample Rate: 48000
 Sample Size: 16
 Channels:2

whereas if I used -c:a aac -profile:a aac_low instead of -c:a copy then I
get this from mp4info:
Track 2:
   flags:3 ENABLED IN-MOVIE
   id:   2
   type: Audio
   duration: 0 ms
   language: und
   media:
 sample count: 0
 timescale:48000
 duration: 0 (media timescale units)
 duration: 0 (ms)
 bitrate (computed): 49.589 Kbps
 sample count with fragments: 849
 duration with fragments: 869378
 duration with fragments: 18112 (ms)
   Sample Description 0
 Coding:  mp4a (MPEG-4 Audio)
 Stream Type: Audio
 Object Type: MPEG-4 Audio
 Max Bitrate: 128000
 Avg Bitrate: 0
 Buffer Size: 0
 Codecs String: mp4a.40.2
 MPEG-4 Audio Object Type: 2 (AAC Low Complexity)
 MPEG-4 Audio Decoder Config:
   Sampling Frequency: 48000
   Channels: 2
   Extension:
 Object Type: Spectral Band Replication
 SBR Present: no
 PS Present:  no
 Sampling Frequency: 0
 Sample Rate: 48000
 Sample Size: 16
 Channels:2

where it clearly states it as Mpeg-4 Audio AAC Low complexity.


Looks like the data that should be found in the "esds" atom is missing 
or incomplete when using -c:a copy. See this link for details on how AAC 
profile information is stored in MP4:


https://stackoverflow.com/questions/3987850/mp4-atom-how-to-discriminate-the-audio-codec-is-it-aac-or-mp3

Don't know enough about TS (de)muxing, though, to find out where this 
profile data should be parsed out from the input by FFmpeg.


Regards,
Tobias

___
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] Preserving AAC LC status when converting to fragmented MP4

2021-05-25 Thread Tobias Rapp

On 24.05.2021 22:26, Moritz Barsnick wrote:

On Wed, May 19, 2021 at 12:17:38 +0200, Tobias Rapp wrote:

Looks like the data that should be found in the "esds" atom is missing or
incomplete when using -c:a copy. See this link for details on how AAC
profile information is stored in MP4:

https://stackoverflow.com/questions/3987850/mp4-atom-how-to-discriminate-the-audio-codec-is-it-aac-or-mp3


Interesting stuff.


Don't know enough about TS (de)muxing, though, to find out where this
profile data should be parsed out from the input by FFmpeg.


MPEG-TS and demuxing isn't the problem. If you look at the ffmpeg
output in the original e-mail from decoding the file, it correctly
identifies the codec as "aac (LC)". The issue is the encoding to MP4.

The reason is that the AAC variants have only one codec tag
AV_CODEC_ID_AAC, and that needs to map to various tags, e.g. 0x40 for
AAC and 0x67 for AAC LC.

https://github.com/FFmpeg/FFmpeg/blob/3749eede66c3774799766b1f246afae8a6ffc9bb/libavformat/isom.c#L34

When writing the tag in the esds atom, there's no additional info
available allowing mapping to 0x67, therefore 0x40 is written:

https://github.com/FFmpeg/FFmpeg/blob/3749eede66c3774799766b1f246afae8a6ffc9bb/libavformat/movenc.c#L711

I have no idea how this info could be carried forward.
From the StackOverflow answers the AAC profile seems to be part of the 
AudioSpecificConfig (ASC) part which is written as "TAG 5" within the 
Elementary Stream Descriptor MP4 atom.


Looking at the FFmpeg movenc.c link you posted it is written some lines 
below the codec id from track->vos_data. This pointer is filled from 
AVCodecParameters->extradata in ff_mov_write_packet:


https://github.com/FFmpeg/FFmpeg/blob/3749eede66c3774799766b1f246afae8a6ffc9bb/libavformat/movenc.c#L5586

So it seems to be a matter of TS demuxing passing along the codec 
extradata correctly.


Regards,
Tobias

___
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 producing invalid wav headers when merging two wav files

2021-09-14 Thread Tobias Rapp

On 13.09.2021 20:13, Jim McMaster via ffmpeg-user wrote:

We are using ffmpeg to merge two mono wav files into a single two-channel file. 
 When we do, we get a wav file that has an invalid header, and some of our 
other software cannot process it.In particular, the AudioFormat at offset 
20 has a value of ‘0700’ (little-endian) instead of ‘0100’.  The Subchunk2ID is 
‘6461’ instead of ‘74616461’ (“data”).  The Subchink2Size is a huge number 
(1937924468 or 0X73826174) which is much larger than the size of the audio file.

We are using the command:

/usr/bin/ffmpeg -ac 1 -ar 8000 -acodec pcm_s16le -f s16le -i-ac 1 -ar 8000 -acodec pcm_s16le -f 
s16le -i-filter_complex "[1:a][2:a] amerge=inputs=2[a]" -map "[a]" 


This is generated in Java, so I hope I got it right.

So, what are we doing wrong?  How do we get ffmpeg to generate a valid wav 
header?


Please add the log output of the command, it is difficult to give an 
advice here without knowing what version of FFmpeg you are using and 
what type of input and output format is detected.


From your description is seems that you are using fixed file offsets to 
parse the WAVE headers. This seems to be very fragile as the size and 
order of chunks can vary between files. I would recommend to check the 
generated files also with third-party tools like ffprobe/ffplay, VLC, or 
MediaInfo to verify if it causes problems there.


Regards,
Tobias

___
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 and x264 licenses

2021-11-15 Thread Tobias Rapp

On 15/11/2021 11:30, LianCheng Tan wrote:

Hi,

If I write my software that call FFmpeg executable during runtime, will there 
be any license issue if this software is for commercial use?


The information available at https://ffmpeg.org/legal.html should get 
you started.



Also, if this software uses libx264 for encoding, any license issue with x264?


x264 is available under GNU GPL terms (not to be confused with GNU LGPL) 
or under commercial license, see 
https://www.videolan.org/developers/x264.html . Note that when x264 is 
combined with FFmpeg this makes FFmpeg also fall under GNU GPL, which in 
turn might have an effect on your application, depending on the way you 
"use" it with your software.


For more info lookup the keywords "combined work" in GNU GPL and the GPL 
FAQ.


Regards,
Tobias

___
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] Compressed AVI to useable format

2022-04-13 Thread Tobias Rapp

On 12/04/2022 18:29, Ferdi Scholten wrote:

On 11-04-2022 21:48, Zach Beal wrote:

Hello,

 I have compressed AVI files that I want to convert to 
an uncompressed format. I do not know what the files are compressed 
with because they are exported from data acquisition software as 
"compressed AVI". How can this be accomplished with FFmpeg?



I don't think you want uncompressed format. The avi container can have a 
lot of different compressed audiovideo formats. There is however no 
clear specification of codecs for avi containers as it is a fairly old 
one, avi was superseded by asf. both formats were developed by Microsoft.


Try to use ffprobe to find out which codecs are used in the avi 
container. Most likely it will be something like 
divx/xvid/realvideo/cinepack as those were the usual suspects in the avi 
days.


Most flexible modern container is matroska (mkv). It can most likely 
handle those old codecs. Converting them to newer codecs will only 
degrade the quality that probably is not very good to begin with.


That applies only when re-encoding with some lossy target codec. When 
using a loss-less target codec like Uncompressed (UYVY, v210), HuffYuv, 
or FFV1 there is no (additional) generation loss from encoding.


And a suitable container format depends on compatibility with the used 
media software. I think support for AVI is generally more common than 
for ASF. I agree that Matroska would be good choice if backwards 
compatibility is not an issue for you.


Regards, Tobias

___
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] Size of 10-bit 4:2:2 video streams?

2022-10-05 Thread Tobias Rapp

On 03/10/2022 09:40, Olivier Bruchez via ffmpeg-user wrote:

On 21.09.22 19:06, Carl Zwanzig wrote:


On 9/21/2022 12:59 AM, Paul B Mahol wrote:

It could be that index for frames in AVI is not listing all entries.
Hard to guess.
You could inspect file in some AVI file format analyzer.
If there is such thing available.

In theory, avicodec will do it but it's quite old, same for vitrualdubmod
and gspot (http://www.headbands.com/gspot/), but then AVI format is also
quite old. I have used gspot before and it was useful, haven't tried 
it for

this purpose.

https://greshka.net/avicheck/ has some interesting suggestions, which
eventually land on "ffmpeg -v 5 -i FILE.avi -f null -" (decode to 
null

output, turn up the error reporting.

I'll echo Paul's thoughts that the AVI is somewhat corrupt, at least the
metadata is badly wrong. It's possible that by either poking the 
metadata to
"correctness" or ignoring a lot of errors, usable video could be 
pulled out.


Thanks Marc, Paul, and onemda!

I haven't had the time to do it, but I'll try those old tools. It they 
don't work, I'll even try to write some code to extract the missing 
frames. There must be a way to read them back!


If you know a bit about the AVI chunk structure, MediaTrace (which 
basically is another output mode built into MediaInfo) could be an 
option to debug your file: https://mediaarea.net/MediaTrace


Finally, depending on the amount of time you are willing to invest, 
using a basic hex editor software for looking at the raw AVI file is 
always a possibility once you have a rough idea at which file position 
things are going wrong. Reading the binary RIFF chunk structure isn't 
too hard if you know ASCII and hexadecimal numbers :)


Regards, Tobias

___
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] Different FrameMD5 when converting between loss-less encodings

2022-11-07 Thread Tobias Rapp

Hi,

recently when testing I stumbled over the situation that a specific 
10-bit YUV input file was encoded separately using two different 
loss-less encoders V210 and FFV1. When comparing the FrameMD5 checksum 
of both output files most of the checksums did match, but some of them 
where different (approx. 3% of the frames).


When trying to reproduce the scenario with the attached batch script 
using a video source filter the resulting files even differ in every 
frame. My assumption would have been that the FrameMD5 checksums of both 
files would be the same, as they originate from the same input file and 
the intermediate encoding should be loss-less.


Can someone give a hint where the differences come from? Is there some 
command-line option for bit-exactness missing, or is there something 
going wrong in the decoder/encoders?


Regards,
Tobiasffmpeg version N-109026-ge17628b Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --disable-network --enable-libsoxr --enable-libtwolame 
--enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-static 
--disable-shared --prefix=/usr/local
  libavutil  57. 42.100 / 57. 42.100
  libavcodec 59. 52.100 / 59. 52.100
  libavformat59. 34.101 / 59. 34.101
  libavdevice59.  8.101 / 59.  8.101
  libavfilter 8. 50.100 /  8. 50.100
  libswscale  6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
Stream mapping:
  format:default -> Stream #0:0 (ffvhuff)
Press [q] to stop, [?] for help
Output #0, avi, to './temp/ffmpeg-10bit-test-input.avi':
  Metadata:
ISFT: Lavf59.34.101
  Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv422p10le(tv, 
progressive), 720x576 [SAR 1:1 DAR 5:4], q=2-31, 200 kb/s, 25 fps, 25 tbn
Metadata:
  encoder : Lavc59.52.100 ffvhuff
frame=0 fps=0.0 q=0.0 size=   0kB time=-577014:32:22.77 bitrate=  
-0.0kbits/s speed=N/A
frame=   25 fps=0.0 q=-0.0 Lsize=6869kB time=00:00:00.96 
bitrate=58617.6kbits/s speed=9.06x
video:6863kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 0.092806%
ffmpeg version N-109026-ge17628b Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --disable-network --enable-libsoxr --enable-libtwolame 
--enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-static 
--disable-shared --prefix=/usr/local
  libavutil  57. 42.100 / 57. 42.100
  libavcodec 59. 52.100 / 59. 52.100
  libavformat59. 34.101 / 59. 34.101
  libavdevice59.  8.101 / 59.  8.101
  libavfilter 8. 50.100 /  8. 50.100
  libswscale  6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
Input #0, avi, from './temp/ffmpeg-10bit-test-input.avi':
  Metadata:
software: Lavf59.34.101
  Duration: 00:00:01.00, start: 0.00, bitrate: 56272 kb/s
  Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv422p10le, 720x576, 58563 
kb/s, SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> v210 (native))
Press [q] to stop, [?] for help
Output #0, avi, to './temp/ffmpeg-10bit-test-output01.avi':
  Metadata:
software: Lavf59.34.101
  Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le(progressive), 
720x576 [SAR 1:1 DAR 5:4], q=2-31, 221184 kb/s, 25 fps, 25 tbn
Metadata:
  encoder : Lavc v210
frame=0 fps=0.0 q=-0.0 size=   0kB time=00:00:00.00 bitrate=N/A 
speed=N/A
frame=   25 fps=0.0 q=-0.0 Lsize=   27006kB time=00:00:00.96 
bitrate=230452.7kbits/s speed=6.92x
video:27000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.022888%
ffmpeg version N-109026-ge17628b Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --disable-network --enable-libsoxr --enable-libtwolame 
--enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-static 
--disable-shared --prefix=/usr/local
  libavutil  57. 42.100 / 57. 42.100
  libavcodec 59. 52.100 / 59. 52.100
  libavformat59. 34.101 / 59. 34.101
  libavdevice59.  8.101 / 59.  8.101
  libavfilter 8. 50.100 /  8. 50.100
  libswscale  6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
Input #0, avi, from './temp/ffmpeg-10bit-test-input.avi':
  Metadata:
software: Lavf59.34.101
  Duration: 00:00:01.00, start: 0.00, bitrate: 56272 kb/s
  Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv422p10le, 720x576, 58563 
kb/s, SAR 1:1 DAR 5:4, 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> ffv1 (native))
Press [q] to stop, [?] for help
[ffv1 @ 0x229a9c0] bits_per_raw_sample > 8, forcing range coder
Output #0, avi, to './temp/ffmpeg-10bit-test-output02.avi':
  Metadata:
software: Lavf59.34.101
  Stream #0:0: Video: ffv

Re: [FFmpeg-user] Different FrameMD5 when converting between loss-less encodings

2022-11-07 Thread Tobias Rapp

On 07/11/2022 10:56, Paul B Mahol wrote:

On 11/7/22, Tobias Rapp  wrote:

Hi,

recently when testing I stumbled over the situation that a specific
10-bit YUV input file was encoded separately using two different
loss-less encoders V210 and FFV1. When comparing the FrameMD5 checksum
of both output files most of the checksums did match, but some of them
where different (approx. 3% of the frames).

When trying to reproduce the scenario with the attached batch script
using a video source filter the resulting files even differ in every
frame. My assumption would have been that the FrameMD5 checksums of both
files would be the same, as they originate from the same input file and
the intermediate encoding should be loss-less.

Can someone give a hint where the differences come from? Is there some
command-line option for bit-exactness missing, or is there something
going wrong in the decoder/encoders?


The v210 encoder or decoder is buggy. Strange that both C and asm is buggy.
The first pixels at start and end of each scanline are wrong.


When I replace "-vcodec v210" in the shell script with "-vcodec ffvhuff" 
it matches the output of FFV1. So yes, there seems to be an issue with 
v210 encoding or decoding in FFmpeg.


Looking into the bugtracker, could this be related to ticket #8195 "v210 
encoding clips to 4-1019"?


Regards,
Tobias

___
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] Different FrameMD5 when converting between loss-less encodings

2022-11-07 Thread Tobias Rapp

On 07/11/2022 12:31, Paul B Mahol wrote:

On 11/7/22, Tobias Rapp  wrote:

On 07/11/2022 10:56, Paul B Mahol wrote:

On 11/7/22, Tobias Rapp  wrote:

Hi,

recently when testing I stumbled over the situation that a specific
10-bit YUV input file was encoded separately using two different
loss-less encoders V210 and FFV1. When comparing the FrameMD5 checksum
of both output files most of the checksums did match, but some of them
where different (approx. 3% of the frames).

When trying to reproduce the scenario with the attached batch script
using a video source filter the resulting files even differ in every
frame. My assumption would have been that the FrameMD5 checksums of both
files would be the same, as they originate from the same input file and
the intermediate encoding should be loss-less.

Can someone give a hint where the differences come from? Is there some
command-line option for bit-exactness missing, or is there something
going wrong in the decoder/encoders?


The v210 encoder or decoder is buggy. Strange that both C and asm is
buggy.
The first pixels at start and end of each scanline are wrong.


When I replace "-vcodec v210" in the shell script with "-vcodec ffvhuff"
it matches the output of FFV1. So yes, there seems to be an issue with
v210 encoding or decoding in FFmpeg.

Looking into the bugtracker, could this be related to ticket #8195 "v210
encoding clips to 4-1019"?


Ah, probably yes, and yuvtestsrc gives you 0-1023 ramp


Found some related information in Technote 2162 from Apple, chapter 
"Scheme B: 'Video-Range' Mapping with Unsigned Y´, Offset Binary Cb, Cr":


https://developer.apple.com/library/archive/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG7-SCHEME_B___VIDEO_RANGE__MAPPING_WITH_UNSIGNED_YOFFSET_BINARY_CB__CR

There it mentions that these component values are "reserved as 
synchronization signals and must not appear in a buffer".


But is this document normative for anything besides QuickTime? From what 
I can find the v210 encoder is the only one that follows this value 
restriction, others like the v410 encoder do not.


Regards,
Tobias

___
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 encode wav file to mp2 Audio

2022-12-21 Thread Tobias Rapp

On 21/12/2022 09:09, a b wrote:

Hello,
using ffmpeg I want to Encode a wave file recorded from a cd to mpeg Audio.
I want to encode it to  MPEG 1  and MPEG 2  with all  Layer 1  and layer 2
and Layer3 modes separately.
mp1 and mp2 layer3 is same as MP3 which is easy to encode, but the problem
is with layer1 and layer2  , and I want to know how to set the command and
related options to do so.
what is the  command to Encode the wave file to above coding modes and
options.
thanks much


For MPEG1 Layer2 the "twolame" encoder would be recommended. Example:

ffmpeg -i $INPUT -codec:a libtwolame -b:a 128k $OUTPUT

See https://ffmpeg.org/ffmpeg-codecs.html#libtwolame for encoder options.

Not sure about FFmpeg support for MPEG1 Layer1 audio.

Regards,
Tobias

___
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] drawtext filter missing

2023-11-29 Thread Tobias Rapp

On 28/11/2023 21:40, Leo Butler via ffmpeg-user wrote:


Hello,

I ran into this problem with the current Debian testing build, so I
thought I would try the static build. Both are compiled with
--enable-libfreetype but both barf on a drawtext filter. I am attaching
the log file from the static build.

According to:

https://ffmpeg.org/ffmpeg-all.html#drawtext-1

the libfreetype library should be sufficient.


Recent versions of the drawtext filter now also depend on libharfbuzz. I 
also did run into this when cross-compiling a static build of FFmpeg. 
Unfortunately the harfbuzz library has some other non-trivial 
dependencies in turn, like GLib and Cairo, and uses Meson for building 
(see https://harfbuzz.github.io/building.html).


In my opinion it would have been nice if the libharfbuzz dependency of 
the drawtext filter could be made optional, for those that do not mind 
non-perfect positioned characters - or just use monospaced fonts anyway.


Regards,
Tobias

___
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] drawtext filter missing

2023-11-29 Thread Tobias Rapp

On 29/11/2023 09:40, David Bernat wrote:


Please unsubscribe.


I do not consider such a response as friendly and respectful.

Regards,
Tobias

___
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] drawtext filter missing

2023-11-29 Thread Tobias Rapp

On 29/11/2023 10:14, Tobias Rapp wrote:


On 29/11/2023 09:40, David Bernat wrote:


Please unsubscribe.


I do not consider such a response as friendly and respectful.

Or maybe I just misunderstood your intend and instead of suggesting me 
to unsubscribe myself, you just tried to unsubscribe your own mail 
address from the list? In that case you should send your request to 
 instead, see the common mail footer 
text added by the list server below.


Regards,
Tobias

___
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] patch for 44.1/32 khz pcm input in pcm dvd encoder

2024-01-22 Thread Tobias Rapp

On 21/01/2024 04:49, Andrew Randrianasulu wrote:


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. ;)

Please post your patch on the ffmpeg-de...@ffmpeg.org mailing list. You 
can use the page at https://ffmpeg.org/mailman/listinfo/ffmpeg-devel/ to 
subscribe to the list first.


Best regards, Tobias

___
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] pan filter confusion

2017-11-27 Thread Tobias Rapp

On 27.11.2017 12:00, Carles Vila wrote:


[0:1] is the input stream mapping to the complex filter chain. With
this syntax, it references the second stream from the first file. For
your particular file, it's indeed the audio stream. You could use
"[0:a]", just in case the order of video and audio streams are swapped
(or undetermined, as in VOBs).


Carles$ ffmpeg -i MEAT01_01A_ENG_ME_DV_5.1_24HD_TC.mov -filter_complex
"[0:1]pan=2c|c0=c0+c1|c1=c2+c3" -s 640x360 -pix_fmt yuv420p

proxy_stereo.mp4

While this result looks okay:


Stream mapping:
   Stream #0:1 (pcm_s24le) -> pan (graph 0)
   pan (graph 0) -> Stream #0:0 (aac)
   Stream #0:0 -> #0:1 (prores (native) -> h264 (libx264))


please do try changing that command line to the more specific mapping
variant:

$ ffmpeg -i MEAT01_01A_ENG_ME_DV_5.1_24HD_TC.mov -filter_complex
"[0:a]pan=2c|c0=c0+c1|c1=c2+c3[a]" -s 640x360 -pix_fmt yuv420p -map 0:v
-map "[a]" proxy_stereo.mp4

Additionally, if you increase the logging level with "loglevel verbose",
the pan
filter should show you what it's doing.

If that command still doesn't work, can you change the filter
expression to
   "[0:a]pan=2c|c0=c0+c1|c1=c2+c3[a],volumedetect"
so that we can get an impression whether something should be heard?


ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers


This is a bit old. Could you kindly test a recent build from git
master, or a recent release? We don't want to help you debug
long-solved bugs, if you know what I mean. (If you can't build
yourself, binaries are available for many major platforms.)




Hi Moritz Thanks for your help! but still no luck.

I found a 3.3.1 binary which I hope is enough up to date. I'm stuck on OSX
10.8 on this machine I used your syntax and I included the verbose
option. Here is the output. The volumedetect filter was giving me problems
regarding unsupported channel layout, I left it out at this time. Reading
the pan coefficients everything seems ok, but still silent... Maybe the s32
bit audio format?


ffmpeg331 -i MEAT01_02A_ENG_ME_DV_5.1_24HD_TC.mov -filter_complex
"[0:a]pan=2c|c0=c0+c1|c1=c2+c3[a]" -s 640x360 -pix_fmt yuv420p -map 0:v
-map "[a]" -loglevel verbose proxy_stereo_2A.mp4
ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
   built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
   configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl
--enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx
--disable-decoder=libvpx --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-avfilter
--enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters
--enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc
--arch=x86_64 --enable-runtime-cpudetect
   libavutil  55. 58.100 / 55. 58.100
   libavcodec 57. 89.100 / 57. 89.100
   libavformat57. 71.100 / 57. 71.100
   libavdevice57.  6.100 / 57.  6.100
   libavfilter 6. 82.100 /  6. 82.100
   libswscale  4.  6.100 /  4.  6.100
   libswresample   2.  7.100 /  2.  7.100
   libpostproc54.  5.100 / 54.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'MEAT01_02A_ENG_ME_DV_5.1_24HD_TC.mov':
   Metadata:
 major_brand : qt
 minor_version   : 537199360
 compatible_brands: qt
 creation_time   : 2017-11-09T12:16:50.00Z
   Duration: 00:11:13.59, start: 0.00, bitrate: 179162 kb/s
 Stream #0:0(eng): Video: prores, 1 reference frame (apch / 0x68637061),
yuv422p10le(bt709, progressive), 1920x1080, 165325 kb/s, SAR 1:1 DAR 16:9,
23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
 Metadata:
   creation_time   : 2017-11-09T12:16:50.00Z
   handler_name: Apple Alias Data Handler
   encoder : Apple ProRes 422 (HQ)
   timecode: 00:00:00:00
 Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 12
channels, s32 (24 bit), 13824 kb/s (default)
 Metadata:
   creation_time   : 2017-11-09T12:16:50.00Z
   handler_name: Apple Alias Data Handler
   timecode: 00:00:00:00
 Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
 Metadata:
   creation_time   : 2017-11-09T12:16:50.00Z
   handler_name: Apple Alias Data Handler
   timecode: 00:00:00:00
File 'proxy_stereo_2A.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
   Stream #0:1 (pcm_s24le) -> pan (graph 0)
   Stream #0:0 -> #0:0 (prores (native) -> h264 (libx264))
   pan (graph 0) -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[graph 1 input from stream 0:0 @ 0x7fe0e1000940] w:1920 h:1080
pixfmt:yuv422p10le tb:1/24000 fr:24000/1001 sar:1/1 sws_param:flags=2
[scaler_out_0_0 @ 0x7fe0e1000e60] w:640 h:360 flags:'bicubic' interl:0
[scaler_out_0_0 @ 0x7fe0e1000e60] w:1920 h:1080 fmt:yuv422p10le sar:1/1 ->
w:640 h:360 fmt:yuv420p sar:1/1 flags:0x4
[libx264 @ 0x7fe0e0808600] using SAR=1/1
[libx264 @ 0x7fe0e0808600] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 AVX2 LZCNT BMI2

Re: [FFmpeg-user] ffmpeg cross-compile

2018-05-14 Thread Tobias Rapp

On 14.05.2018 15:33, Moritz Barsnick wrote:

On Mon, May 14, 2018 at 12:28:13 +0200, Thomas Schmiedl wrote:

I'm only an end-user, maybe someone could help me?


Perhaps someone at the freetz site?


I got this error: 'ERROR: libxml-2.0 not found using pkg-config'. But
the freetz-toolchain does not contain pkg-config. Is it possible to use
pkg-config from the Debian 9 host system?


Hmm, this file from freetz at least mentions the pkg-config file:
https://github.com/Freetz/freetz/blob/c763e9066d06d21bcd815e15b3f8fa494b3b2007/make/libs/libxml2/libxml2.mk

But yes, if you know hwo pkg-config works, you can easily "fake" a
libxml-2.0.pc file and have ffmpeg use it.


When calling ffmpeg's configure without '--enable-libxml2', there is no
pkg-config error. But a warning: 'mips-linux-pkg-config not found,
library detection may fail.'


Hmm, that means you don't have a pkg-config tool for cross build
either? I would also fake this, but there may be a better way.


On Ubuntu there is a package "pkg-config-mips-linux-gnu" which provides 
/usr/bin/mips-linux-gnu-pkg-config (actually just a symlink to 
/usr/share/pkg-config-crosswrapper). Don't know how this is handled on 
Debian.


Regards,
Tobias

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

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

Re: [FFmpeg-user] Colour metadata not preserved when re-encoding ProRes/mov to FFV1/mkv

2018-07-25 Thread Tobias Rapp

On 25.07.2018 10:04, Peter B. wrote:

Hi Reto,

On 24/07/18 21:47, Reto Kromer wrote:

We do rewrap ProRes into Matroska. Which is the reason for transcoding
it to FFV1?


...I guess the usual "way out" of proprietary formats?
As well as format normalization (to have less mixed codecs).


I agree that format normalization towards a loss-less codec ensures that 
content will be accessible now and in the future in a more reliable way. 
Keeping multiple codecs requires maintenance workload for multiple decoders.


Back to the original topic of preserving color metadata: I also stumbled 
over this issue and if I remember correctly there have been multiple 
attempts to fix this but unfortunately none of them got enough 
attraction / guidance to be accepted into the FFmpeg code-base.


For example:
https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225512.html
https://ffmpeg.org/pipermail/ffmpeg-devel/2018-May/230139.html

Luckily in my workflows I have all the properties in some "media format" 
parameter-set besides the media file so I just manually add the right 
flags on the encoder side instead of depending on them being forwarded 
correctly.


Regards,
Tobias

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

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

[FFmpeg-user] Code Coverage Status

2018-08-28 Thread Tobias Rapp

Hi,

when looking at the FFmpeg code coverage info page at 
http://coverage.ffmpeg.org/ it seems the status does not match the 
current codebase. The date value displayed is about three months past 
(2018-05-20 11:54:08). Not sure if this is a known issue and who is 
responsible for running the tests, just wanted to give a hint.


Regards,
Tobias

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

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

Re: [FFmpeg-user] Storing scan-type/interlaced in MXF?

2018-10-31 Thread Tobias Rapp

On 31.10.2018 13:11, Peter B. wrote:

Hi everyone :)

When trying to store an interlaced J2K-lossless in MXF, ffmpeg
recognizes the "top field first" given, but the resulting file claims to
be progressive :(

[...]


Maybe try to double-check the generated MXF file using MediaInfo or 
MxfDump. As far as I know field order is derived from the generic 
picture essence descriptor in MXF.


Some time ago I had a similar issue with DV input files, see commit 
e3196b686233bed3009248cb1ab7f0628ede6a2f.


Regards,
Tobias

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

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

[FFmpeg-user] Conversion to MP4 fails with non-monotonic DTS error

2020-09-09 Thread Tobias Rapp

Hello list,

when I try to convert the audio stream of a WMV input file to MP4/AAC an 
error "non-monotonous DTS in output stream" is raised.


FFmpeg command line:
$ ffmpeg -i INPUT_FILE.wmv -f mp4 -map 0:a -codec:a aac -b:a 128k \
   -t 1.0 -y OUTPUT_FILE.mp4 -loglevel +debug -xerror -nostdin -nostats

Console output see attached log file.

Adding "-fflags +igndts" to input or output context does not seem to 
make any difference. When looking at the first few audio packets with 
ffprobe the DTS values seem to be in increasing order:


[PACKET]
codec_type=audio
stream_index=0
pts=0
pts_time=0.00
dts=0
dts_time=0.00
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=93710
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=128
pts_time=0.128000
dts=128
dts_time=0.128000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=114110
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=298
pts_time=0.298000
dts=298
dts_time=0.298000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=120910
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=437
pts_time=0.437000
dts=437
dts_time=0.437000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=134510
flags=K_
[/PACKET]

Is there any CLI option to work-around the DTS issue?

Regards,
Tobias
ffmpeg version N-99048-g3c7cad6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --disable-network --enable-libsoxr --enable-libtwolame 
--enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-static 
--disable-shared --progs-suffix=-dbg --enable-debug --disable-optimizations 
--enable-extra-warnings --assert-level=2 --prefix=/usr/local
  libavutil  56. 58.100 / 56. 58.100
  libavcodec 58.105.100 / 58.105.100
  libavformat58. 54.100 / 58. 54.100
  libavdevice58. 11.101 / 58. 11.101
  libavfilter 7. 87.100 /  7. 87.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 
'temp/preview-test01.wmv'.
Reading option '-f' ... matched as option 'f' (force format) with argument 
'mp4'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) 
with argument '0:a'.
Reading option '-codec:a' ... matched as option 'codec' (codec name) with 
argument 'aac'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use 
-b:v)) with argument '128k'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" 
seconds of audio/video) with argument '1.0'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with 
argument '1'.
Reading option 'temp/preview-test01.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) 
with argument '+debug'.
Reading option '-xerror' ... matched as option 'xerror' (exit on error) with 
argument '1'.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable 
interaction on standard input) with argument 0.
Reading option '-nostats' ... matched as option 'stats' (print progress report 
during encoding) with argument 0.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument +debug.
Applying option xerror (exit on error) with argument 1.
Applying option nostdin (enable or disable interaction on standard input) with 
argument 0.
Applying option nostats (print progress report during encoding) with argument 0.
Successfully parsed a group of options.
Parsing a group of options: input url temp/preview-test01.wmv.
Successfully parsed a group of options.
Opening an input file: temp/preview-test01.wmv.
[NULL @ 0x480c4c0] Opening 'temp/preview-test01.wmv' for reading
[file @ 0x480cdc0] Setting default whitelist 'file,crypto,data'
[asf @ 0x480c4c0] Format asf probed with size=2048 and score=100
[asf @ 0x480c4c0] gpos mismatch our pos=24, end=26
[asf @ 0x480c4c0] gpos mismatch our pos=24, end=3850
[asf @ 0x480c4c0] Payload extension 50 2
[asf @ 0x480c4c0] gpos mismatch our pos=24, end=38
[asf @ 0x480c4c0] gpos mismatch our pos=24, end=244
[asf @ 0x480c4c0] gpos mismatch our pos=24, end=38
[asf @ 0x480c4c0] Before avformat_find_stream_info() pos: 5310 bytes read:32768 
seeks:0 nb_streams:2
[asf @ 0x480c4c0] parser not found for codec wmav2, packets or times may be 
invalid.
[wmv3 @ 0x480ee40] Header: 4C790A01
[wmv3 @ 0x480ee40] Profile 1:
frmrtq_postproc=6, bitrtq_postproc=7
LoopFilter=1, MultiRes=0, FastUVMC=0, Extended MV=0
Rangered=0, VSTransform=1, Overlap=1, SyncMarker=0
DQuant=0, Quantizer mode=0, Max B-frames=0
[wmv3 @ 0x480e

Re: [FFmpeg-user] Conversion to MP4 fails with non-monotonic DTS error

2020-09-11 Thread Tobias Rapp

On 09.09.2020 11:50, Tobias Rapp wrote:

[...]

When looking at the first few audio packets with 
ffprobe the DTS values seem to be in increasing order:


[PACKET]
codec_type=audio
stream_index=0
pts=0
pts_time=0.00
dts=0
dts_time=0.00
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=93710
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=128
pts_time=0.128000
dts=128
dts_time=0.128000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=114110
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=298
pts_time=0.298000
dts=298
dts_time=0.298000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=120910
flags=K_
[/PACKET]
[PACKET]
codec_type=audio
stream_index=0
pts=437
pts_time=0.437000
dts=437
dts_time=0.437000
duration=170
duration_time=0.17
convergence_duration=N/A
convergence_duration_time=N/A
size=1366
pos=134510
flags=K_
[/PACKET]

[...]



The problem seems to be that DTS increases in different steps than what 
is reported in "duration". When I add a filter option string like 
"asetpts=N/SR/TB" the transcoding succeeds but there is a noticeable A/V 
delta of about 2 video frames.


Does anybody know if the wmav2 decoder produces some codec delay and how 
to compensate that?


Regards, Tobias

___
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] WAV samplerate conversion with CODEC ID 1 ???

2020-09-15 Thread Tobias Rapp

On 15.09.2020 11:44, christian.w...@4-real.com wrote:

Is it somehow possible to convert wav audio takes with a CODEC ID of 1?
Because ffmpeg and sox are creating very long and "unusal" codec ids like:
0001--0010-8000-00AA00389B71


That GUID is part of the WaveFormatExtensible structure, used by WAVE 
files to specify additional format properties. It means "PCM", see the 
section about "SubFormat" in [1], and should be compatible with common 
playback software.


Regards, Tobias

Links:
[1] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ksmedia/ns-ksmedia-waveformatextensible


___
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] WAV samplerate conversion with CODEC ID 1 ???

2020-09-15 Thread Tobias Rapp

On 15.09.2020 12:20, christian.w...@4-real.com wrote:

So it is not possible to keep the original format code 1 and ffmpeg will always 
create an EXTENSIBLE container??
Because some software is not able to use the Ext GUIDs.
Havent found anything in the ffmpeg format documentation.


I don't think such an option on WAV format level exists at the moment. 
Usually the WaveFormatExtensible variant is written by audio software in 
case of bit-width > 16 or channel count > 2.


What are the output properties in your case (FFmpeg console output)? And 
what software did you try opening the output file with?


Regards, Tobias

___
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 conversion of yuvj420p?

2020-10-02 Thread Tobias Rapp

On 01.10.2020 14:16, Peter B. wrote:

On 29.09.20 09:56, Christian Ebert wrote:

How about doing quick diagnosis with ffprobe before you start,
something like:

ffprobe -v error \
-print_format default=noprint_wrappers=1:nokey=1 \
-select_streams V -show_entries stream=pix_fmt

and make the command depend on the result?


Thanks for the suggestion, but that actually is what I'm doing right now 
- yet it means to treat parts of the batches with different 
conditions/recipes.


Additionally, in that concrete situation, the source videos (several 
thousand...) are stored on an S3-type object based storage (non-Amazon 
dialect). So used Mediainfo to avoid having to pull several hundred 
Terabyte of videos just to get their tech-MD.



And Mediainfo cannot tell me what FFmpeg considers yuvj420p, because...
Even if it wasn't for the "S3-extra-fun", I'm running into this issue 
every now and then in different video collections - and every "if - then 
- else" adds extra points of failure (and work).



You see my challenge? :)


If your main concern is having different branches of command-line 
building code, then my suggestion would be to always detect the input 
pixel format first. Then allow format mapping at the start of the 
pipeline, but disable it anywhere else:


ffmpeg -i $INPUT ... -pix_fmt +yuv420p \
 -filter:v "format=pix_fmts=yuv420p,setrange=full,..."

This should work for both cases, yuv420p and yuvj420p, and it should be 
loss-less for these two cases, but I have not actually tested.


Regards, Tobias

___
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] What does -write_xing 0 do?

2020-12-16 Thread Tobias Rapp

On 14.12.2020 01:52, MediaMouth wrote:

The -write_xing 0 option seems to be fixing it.  I'm curious what it's actually 
doing.
What was the issue to begin with / what problem is it solving?
Is it doing other things to the converted file that might be worth knowing 
about?  Any down sides to using it?



The Xing tag allows players to do more precise seeking within variable 
bitrate MPEG files. It can also contain some other information like the 
encoder version (LAME).


See also: 
https://www.codeproject.com/articles/8295/mpeg-audio-frame-header#XINGHeader


If your MP3 file uses constant bitrate it should be fine to disable the 
Xing/Info tag.


Regards,
Tobias

___
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] Changes in output when truncating bit-depth of RGB frames

2021-03-29 Thread Tobias Rapp

Hello,

when running some local regression tests for the upcoming v4.4 release I 
noticed that the output checksum of some RGB test has changed. It seems 
to happen when RGB input data having a bit-depth above 8-bit is 
truncated to 8-bit and is caused by the change in commit 
a48adcd1369131ebadd1c928fe790c72795182a7.


As the commit is targeted at RGB to YUV conversion I wonder why a 
conversion like from gbrp12le to gbrp is affected by this change. Does 
the swscaler temporarily convert to YUV when truncating RGB?


Example command:

ffmpeg -i FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi \
  -f framemd5 -map 0:v -filter:v "format=gbrp" -t 0.1 \
  -y /dev/stdout - report

Report file output is attached. The generated checksums are different 
before/after the commit in git history.


Regards,
Tobias
ffmpeg started on 2021-03-29 at 15:17:51
Report written to "ffmpeg-20210329-151751.log"
Log level: 48
Command line:
./build-linux/ffmpeg -i 
/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi
 -f framemd5 -map 0:v -filter:v "format=gbrp" -t 0.1 -y /dev/stdout -report
ffmpeg version N-99483-ga48adcd Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --disable-network --enable-libsoxr --enable-libtwolame 
--enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-static 
--disable-shared --prefix=/usr/local
  libavutil  56. 60.100 / 56. 60.100
  libavcodec 58.109.100 / 58.109.100
  libavformat58. 61.100 / 58. 61.100
  libavdevice58. 11.102 / 58. 11.102
  libavfilter 7. 87.100 /  7. 87.100
  libswscale  5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 
'/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi'.
Reading option '-f' ... matched as option 'f' (force format) with argument 
'framemd5'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) 
with argument '0:v'.
Reading option '-filter:v' ... matched as option 'filter' (set stream 
filtergraph) with argument 'format=gbrp'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" 
seconds of audio/video) with argument '0.1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with 
argument '1'.
Reading option '/dev/stdout' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) 
with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url 
/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi.
Successfully parsed a group of options.
Opening an input file: 
/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi.
[NULL @ 0x3f8d780] Opening 
'/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi'
 for reading
[file @ 0x3f8f900] Setting default whitelist 'file,crypto,data'
[avi @ 0x3f8d780] Format avi probed with size=2048 and score=100
[avi @ 0x3f8fa80] use odml:1
[avi @ 0x3f8d780] Before avformat_find_stream_info() pos: 10274 bytes 
read:143080 seeks:6 nb_streams:2
[avi @ 0x3f8d780] parser not found for codec ffvhuff, packets or times may be 
invalid.
[avi @ 0x3f8d780] parser not found for codec pcm_s24le, packets or times may be 
invalid.
[avi @ 0x3f8d780] parser not found for codec ffvhuff, packets or times may be 
invalid.
[avi @ 0x3f8d780] parser not found for codec pcm_s24le, packets or times may be 
invalid.
[avi @ 0x3f8d780] All info found
[avi @ 0x3f8d780] After avformat_find_stream_info() pos: 2724950 bytes 
read:2884756 seeks:6 frames:2
Input #0, avi, from 
'/mnt/lux01-user/UserSpace/Tobias/TestFiles/AVI-HuffYuv/FFVHuff_RGB12bit-720p25__Stereo-PCM24bit__FfMpegTestSrc.avi':
  Metadata:
encoder : Lavf58.45.100
  Duration: 00:00:05.00, start: 0.00, bitrate: 541570 kb/s
Stream #0:0, 1, 1/25: Video: ffvhuff (FFVH / 0x48564646), gbrp12le, 
1280x720, 543584 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1, 1, 1/48000: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 
Hz, stereo, s32 (24 bit), 2304 kb/s
Successfully opened the file.
Parsing a group of options: output url /dev/stdout.
Applying option f (force format) with argument framemd5.
Applying option map (set input stream mapping) with argument 0:v.
Applying option filter:v (set stream filtergraph) with argument format=gbrp.
Applying option t (record or transcode "duration" seconds of audio/video) with 
a

Re: [FFmpeg-user] frame extract is not accurate enough

2015-07-28 Thread Tobias Rapp
I stumbled over some similar issue when using the "-r 1" option. See 
ticket http://trac.ffmpeg.org/ticket/3990 for details and some possible 
work-around using the "fps" filter.


Regards,
Tobias

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


[FFmpeg-user] Rounding of start offset and duration value to frame positions

2015-09-08 Thread Tobias Rapp

Hello,

I'm truncating loss-less (HuffYuv/PCM) video files with FFmpeg using 
start offset and duration values as given by the user and noticed two 
similar issues:


a) When the offset value does not fall on frame positions there is a 
small delay between audio and video stream.


Example:
ffmpeg -i ffmpeg-trim03.avi -f avi -codec:v huffyuv -codec:a pcm_s24le 
-ss 10.02 -t 60.00 -y ffmpeg-trim03-01.avi


Output see attached "ffmpeg-trim03-01a.log". From studying the output 
video apparently the audio stream starts at 10.02 (original file 
position) and the video stream starts at 10.04.


b) If the duration does not fall on frame positions the total length of 
the audio and video stream is different.


Example:
ffmpeg -i ffmpeg-trim03.avi -f avi -codec:v huffyuv -codec:a pcm_s24le 
-ss 10.00 -t 60.02 -y ffmpeg-trim03-02.avi


Output see attached "ffmpeg-trim03-02b.log". From studying the output 
video the audio stream has a duration of 60.02 while the video stream 
has a duration of 60.04.


It seems that ffmpeg does not do a rounding of the positions to frame 
borders. Is there a possibility to achieve that besides doing a manual 
fps detection using ffprobe followed by some rounded calculation before 
calling ffmpeg?


Regards,
Tobias
ffmpeg version N-74308-g40ddbc8 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (GCC)
  configuration: --disable-network --disable-w32threads --disable-static 
--enable-shared --enable-version3 --arch=x86 --target-os=mingw32 
--cross-prefix=x86_64-w64-mingw32- --prefix=/usr/local/win64
  libavutil  54. 30.100 / 54. 30.100
  libavcodec 56. 57.100 / 56. 57.100
  libavformat56. 40.101 / 56. 40.101
  libavdevice56.  4.100 / 56.  4.100
  libavfilter 5. 32.100 /  5. 32.100
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'ffmpeg-trim03.avi'.
Reading option '-f' ... matched as option 'f' (force format) with argument 
'avi'.
Reading option '-codec:v' ... matched as option 'codec' (codec name) with 
argument 'huffyuv'.
Reading option '-codec:a' ... matched as option 'codec' (codec name) with 
argument 'pcm_s24le'.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) 
with argument '10.02'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" 
seconds of audio/video) with argument '60.00'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with 
argument '1'.
Reading option 'ffmpeg-trim03-01.avi' ... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) 
with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file ffmpeg-trim03.avi.
Successfully parsed a group of options.
Opening an input file: ffmpeg-trim03.avi.
[avi @ 002fd2c0] Format avi probed with size=2048 and score=100
[avi @ 00305dc0] use odml:1
[avi @ 002fd2c0] Before avformat_find_stream_info() pos: 10112 bytes 
read:279360 seeks:6
[avi @ 002fd2c0] parser not found for codec huffyuv, packets or times 
may be invalid.
[avi @ 002fd2c0] parser not found for codec pcm_s24le, packets or times 
may be invalid.
[avi @ 002fd2c0] parser not found for codec huffyuv, packets or times 
may be invalid.
[avi @ 002fd2c0] parser not found for codec pcm_s24le, packets or times 
may be invalid.
[avi @ 002fd2c0] All info found
[avi @ 002fd2c0] After avformat_find_stream_info() pos: 247688 bytes 
read:546624 seeks:6 frames:2
Input #0, avi, from 'ffmpeg-trim03.avi':
  Metadata:
encoder : Lavf56.40.101
  Duration: 00:02:00.00, start: 0.00, bitrate: 48006 kb/s
Stream #0:0, 1, 1/25: Video: huffyuv, 1 reference frame (HFYU / 
0x55594648), yuv422p, 720x576, 1/25, 46857 kb/s, SAR 1:1 DAR 5:4, 25 fps, 25 
tbr, 25 tbn, 25 tbc
Stream #0:1, 1, 1/48000: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 
Hz, mono, s32 (24 bit), 1152 kb/s
Successfully opened the file.
Parsing a group of options: output file ffmpeg-trim03-01.avi.
Applying option f (force format) with argument avi.
Applying option codec:v (codec name) with argument huffyuv.
Applying option codec:a (codec name) with argument pcm_s24le.
Applying option ss (set the start time offset) with argument 10.02.
Applying option t (record or transcode "duration" seconds of audio/video) with 
argument 60.00.
Successfully parsed a group of options.
Opening an output file: ffmpeg-trim03-01.avi.
Successfully opened the file.
detected 2 logical cores
[graph 0 input from stream 0:0 @ 0034c380] Setting 'video_size' to 
value '720x576'
[graph 0 input from stream 0:0 @ 0034c380] Setting 'pix_fmt' 

Re: [FFmpeg-user] Frame accurate cropping

2015-10-07 Thread Tobias Rapp

On 06.10.2015 11:12, Soner CAN wrote:

[...]

What I want to do is setting the videos duration to EXACTLY 00:00:30.00.

I tried this:

ffmpeg -i 7347-9\ kliksa.mp4 -c copy -ss 00:00:00.000 -to 30.000 test.mp4

But I still have a duration of 00:00:30.02. Here is ffprobe output:


ffprobe test.mp4

ffprobe version 2.6.1 Copyright (c) 2007-2015 the FFmpeg developers
   built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.1
--enable-shared --enable-pthreads --enable-gpl --enable-version3
--enable-hardcoded-tables --enable-avresample --cc=clang
--host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame
--enable-libvo-aacenc --enable-libxvid --enable-libfreetype
--enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay
--enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265
--enable-nonfree --enable-vda
   libavutil  54. 20.100 / 54. 20.100
   libavcodec 56. 26.100 / 56. 26.100
   libavformat56. 25.101 / 56. 25.101
   libavdevice56.  4.100 / 56.  4.100
   libavfilter 5. 11.102 /  5. 11.102
   libavresample   2.  1.  0 /  2.  1.  0
   libswscale  3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
   Metadata:
 major_brand : isom
 minor_version   : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf56.25.101
   Duration: 00:00:30.02, start: 0.00, bitrate: 7240 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 6982 kb/s, 25 fps, 25 tbr, 90k tbn, 50
tbc (default)
 Metadata:
   handler_name: VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 255 kb/s (default)
 Metadata:
   handler_name: SoundHandler

So, how can I have a video cut frame accurately?



If you use "-c:v copy" I assume the video will only be cut at GOP 
borders. So if you do not have an intra-frame video file you have to 
re-encode the file with "-c:v libx264 ..." to get frame-exact range 
extraction.


Regards,
Tobias

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


Re: [FFmpeg-user] Two SAR/DAR pairs (codec and stream SAR/DAR)

2015-12-01 Thread Tobias Rapp

On 30.11.2015 15:27, Nikita Skalkin wrote:

Hello everyone! In our company, we use ffmpeg to parse video info and
convert it, according parsed info. Recently we found a bug in our system.
When calling ffprobe for video, we got 2 SAR/DAR pairs.


Example:


Stream #0:0(eng): Video: mpeg2video (4:2:2) (mx3p / 0x7033786D),
yuv422p(tv, bt470bg/smpte170m/bt709), 720x608 [SAR 152:135 DAR 4:3], 30105
kb/s, SAR 35:24 DAR 525:304, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)


In our system we use first pair for detecting video aspect. But in test
video it gives us not correct aspect (for our algorithms), whilst second
pair is right.


I found commit (082491c), that explains second pair. Commits comment says
that ffmpeg prints second pair if stream SAR differs from codec SAR. But I
coundn’t find what is codec SAR, and why it differs from streams SAR. Could
you explain it for me?


Some video codecs allow to store the aspect ratio within the binary data 
chunk of each encoded frame. Also some container formats allow to store 
the aspect ratio globally for the whole stream (file). Now when both 
values exist they possibly contain mismatching information. Which value 
is the correct one is not obvious, I guess media players have some own 
guessing algorithm to decide which one to use.


Regards,
Tobias

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


Re: [FFmpeg-user] [FFmpeg-devel] How to build for static ffmpeg executable

2016-01-21 Thread Tobias Rapp

On 21.01.2016 00:57, John Pompeii wrote:

But for convenience, you have to make sure the external libraries
are built as static libraries with DLLs disabled, or the compiler
will link to them by default.

Im not building things like the compilers and runtime libs, they just
come with the platform.


Tim was referring to the libraries you have listed in your previous post 
like fontconfig, freetype, glib-2.0, etc. You should make sure they have 
been compiled with "--enable-static --disable-shared" or some similar 
configure option (depending on the libraries build system).


The following script contains information on the static build options 
for a list of libraries, helpful even when you do not cross-compile:

https://github.com/rdp/ffmpeg-windows-build-helpers

> Since the project distributes versions of

ffmpeg builds as static exe's, I would assume there is a build
process for it?  (without having a specially created environment or
hacking the configure file...) --john


The FFmpeg project does not directly provide binary builds. I guess you 
refer to the Zeranoe download page which has a link on 
ffmpeg.org/download.html?


BTW: I'm building my ffmpeg win32/win64 executables on a GNU/Linux 
virtual machine using the mingw64 cross-compiler. This way the 
environment tools like shell, make, yasm, etc. are installed a lot easier.


Regards,
Tobias

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


Re: [FFmpeg-user] Source v210.mov has no interlacement info, ffv1 transcode is listed as progressive

2016-07-28 Thread Tobias Rapp

Hello Kieran,

On 28.07.2016 10:38, Kieran O Leary wrote:

If I use -c copy to remux to mov or mkv, then the lack of
interlacement info is maintained. When I encode with FFV1, using
either MKV or MOV, the file is listed as progressive in mediainfo.

However, the issue may not be specific to FFV1 as progressive values
appear in mediainfo when using -c:v prores (in mov container) and
libx264 in mov and mkv.


From the top of my head FFV1 has a flag interlaced=false/true but there 
is no interlaced=unknown.



Avid, even though I selected PAL top field first, did not
write any interlacement info to the mov from what I can see. Nothing
shows up in mediainfo in regards
to interlacement for the source v210.mov, and I can't see any fiel
atom info in mediatrace. Avid MC8 never seems to write field/aspect
ratio in general for the 'send to QT' feature.


I guess on this list it might be helpful to use ffprobe for checking 
file properties. Example:


./ffprobe -show_streams -select_streams v \
  -show_frames -read_intervals %+1 some-file.mkv


Seeing as -vf idet shows TFF values for these files, and the telecine
machine that created these files outputs PAL TFF, I am tempted to just
use field_order in the source file in order to correct this before
transcoding,  but I thought I'd see what ye think anyhow in regards to
this issue.


In my opinion it is better to detect and apply the 
interlaced/field_order properties early in the conversion chain. If it 
is left undefined the different tools in your conversion chain might use 
different internal defaults.



[...]


Regards,
Tobias


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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 create a multichannel wav file without a specific channel layout

2016-09-26 Thread Tobias Rapp

On 26.09.2016 13:10, Robert Krüger wrote:

Hi,

On Mon, Sep 26, 2016 at 12:42 PM, Carl Eugen Hoyos 
wrote:


2016-09-26 12:17 GMT+02:00 Robert Krüger :


I would like to know if it is possible to create a wave file that

contains

n channels of audio which do not have a channel layout like 5.1 or

stereo,

(I assumed n==1 here because it should work fine for n>2)


much like a file used in broadcast for just storing n signals in one wav
file.


It works fine for >16bit or >48kHz.
I just sent a patch that fixes it for all (pcm) audio, that will not fix
the
front center (mono) case though: If this is an issue (if your software
does not default to front center for 1-channel pcm wav), please
tell me;-)




Thanks for the quick reply! I meant something like writing a 4,6 or
8-channel wav that just really contains 4,6,8 mono channels. E.g. some
cameras or other multi-track recording devices generate signals like these
and I would like to be able to put them in one wav file for archiving or
later processing.


If the input file doesn't have a channel mask you should be able to use 
the "-guess_layout_max 0" input option.



Reading a bit through a few specs I am not sure whether
this requires using RF64 features (specifically the new constant
SPEAKER_ALL 0x8000 for the channel assignment) and, to be honest, if
that makes sense at all.


In my opinion an undefined channel mask makes sense in your case. I'm in 
a very similar situation when recording AVI files with PCM audio and 
there I use the "-write_channel_mask off" output option.


You don't need RF64 features, see section "Details about dwChannelMask" 
in https://msdn.microsoft.com/en-us/library/windows/hardware/dn653308.aspx :


"If, for example in a multi-channel audio authoring application, no
speaker location is desired on any of the mono streams, the
dwChannelMask should explicitly be set to 0."

Best regards,
Tobias

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://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 any filter that can change frame rate but not duplicate same frame

2017-01-11 Thread Tobias Rapp

On 12.01.2017 07:33, qw wrote:

I found two filters in ffmpeg, i.e. fps and framerate, which can
change frame rate of incomming video. If original frame rate is less
than target frame rate, what I want is use original frame rate
instead of target one in this case. Does fps or framerate filter have
the function? or is there any other filter that keeps original
framerate and doesn't duplicate same frame, when target frame rate is
larger than original one?


I have not tested it but AFAIK this should be possible using the 
"setpts" filter. Some example given in the documentation of the filter:


Apply slow motion effect:
setpts=2.0*PTS

The expression also allows to use if/else statements, so I guess it 
should match your use-case.


Regards,
Tobias

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

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

Re: [FFmpeg-user] unsubscribe

2019-04-10 Thread Tobias Rapp

On 10.04.2019 09:36, Reindl Harald wrote:


Am 10.04.19 um 07:14 schrieb Walter Ebert:

On 09.04.19 22:54, Reindl Harald wrote:


Am 09.04.19 um 22:53 schrieb Kieran O Leary:

On Tue, 9 Apr 2019, 21:13 Reindl Harald,  wrote:


Am 09.04.19 um 20:50 schrieb Ted Park:

Am 09.04.19 um 10:56 schrieb dben...@bezeqint.net:

hell you have the instructions on bottom of every single message


It seems he was trying to follow them, but made a mistake. If you’re

still here, you need to email ffmpeg-user-requ...@ffmpeg.org , not the mailing list itself dbenari

what mistake can you make in case of "email
ffmpeg-user-requ...@ffmpeg.org with subject unsubscribe" when you own a
sane mind



Please do not be so insulting


you have no idea how insulting sounds!



Your comment is not helpful

but yours as?

sometimes stupidity needs to be pointed out to touch the ego of people,
it may help power on their brain again


No, being offensive doesn't help. Everybody deserves a polite response. 
If you do not feel like answering simple questions in an adequate manner 
then just don't post one.


Regards,
Tobias

___
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] ff* command lines that work

2020-03-09 Thread Tobias Rapp

On 08.03.2020 10:03, Mark Filipak wrote:
The documentation is long on explanations of pieces, but short on how to 
create working command lines.


If you are just interested in general about what FFmpeg tools can do, 
you can find some command-line examples in the Wiki:

http://trac.ffmpeg.org/wiki#Encoding

Regards,
Tobias

___
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] Which videoc codec gives best compression for screen recording?

2014-11-13 Thread Tobias Rapp
I want to do screen recording with FFmpeg (on Windows). It works fine 
with "gdigrab" but the output file size is quite high.


What video codecs are available that give good compression for screen 
recordings while maintaining a good picture quality (screen text remains 
readable)? Maybe anybody has created a nice MP4 profile for it?


Regards,
Tobias

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


Re: [FFmpeg-user] Which videoc codec gives best compression for screen recording?

2014-11-13 Thread Tobias Rapp

On 13.11.2014 11:44, Carl Eugen Hoyos wrote:

Tobias Rapp writes:


I want to do screen recording with FFmpeg (on Windows).
It works fine with "gdigrab" but the output file size
is quite high.


Command line and complete, uncut console output missing /
which encoders did you already test?


I tested FLV and MP4, see attached log.


Maybe anybody has created a nice MP4 profile for it?


I don't think the container has any relevance for the
file size and the best encoders may not work with mov.


I meant a x264 profile but now I realize that the binary I use doesn't 
include this codec. Will get an updated one.


Regards,
Tobias
ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 16 2014 12:59:03 with gcc 4.8 (GCC)
  configuration: --disable-static --enable-shared --disable-debug 
--enable-version3 --disable-w32threads --arch=x86 --target-os=mingw32 
--cross-prefix=i686-w64-mingw32- --prefix=/usr/local/win32 
--enable-runtime-cpudetect --enable-memalign-hack
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.101 / 56.  4.101
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.100 /  5.  1.100
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
[gdigrab @ 01dda880] Capturing whole desktop as 1920x1080x32 at (0,0)
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1415876568.549668, bitrate: 398133 kb/s
Stream #0:0: Video: bmp, bgra, 1920x1080, 398133 kb/s, 6 tbr, 1000k tbn, 6 
tbc
Output #0, flv, to 'desktop-rec1.flv':
  Metadata:
encoder : Lavf56.4.101
Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080, 
q=2-31, 200 kb/s, 6 fps, 1k tbn, 6 tbc
Metadata:
  encoder : Lavc56.1.100 flv
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> flv1 (flv))
Press [q] to stop, [?] for help
frame=4 fps=0.0 q=6.6 size= 893kB time=00:00:00.66 
bitrate=10969.8kbits/s
frame=7 fps=6.9 q=14.6 size= 896kB time=00:00:01.16 
bitrate=6291.4kbits/s
frame=   10 fps=6.6 q=23.4 size= 899kB time=00:00:01.66 
bitrate=4419.4kbits/s
frame=   13 fps=6.4 q=24.8 size=1136kB time=00:00:02.16 
bitrate=4293.8kbits/s
frame=   16 fps=6.3 q=31.0 size=1139kB time=00:00:02.66 
bitrate=3499.2kbits/s
frame=   19 fps=6.3 q=31.0 size=1142kB time=00:00:03.16 
bitrate=2954.7kbits/s
frame=   22 fps=6.2 q=31.0 size=1145kB time=00:00:03.66 
bitrate=2558.7kbits/s
frame=   25 fps=6.2 q=24.8 size=1382kB time=00:00:04.16 
bitrate=2716.6kbits/s
frame=   28 fps=6.2 q=31.0 size=1385kB time=00:00:04.66 
bitrate=2431.5kbits/s
frame=   31 fps=6.1 q=31.0 size=1388kB time=00:00:05.16 
bitrate=2201.1kbits/s
frame=   34 fps=6.1 q=31.0 size=1391kB time=00:00:05.66 
bitrate=2011.3kbits/s
frame=   37 fps=6.1 q=24.8 size=1628kB time=00:00:06.16 
bitrate=2162.4kbits/s
frame=   40 fps=6.1 q=31.0 size=1631kB time=00:00:06.66 
bitrate=2004.4kbits/s
frame=   43 fps=6.1 q=31.0 size=1634kB time=00:00:07.16 
bitrate=1868.1kbits/s
frame=   46 fps=6.1 q=31.0 size=1637kB time=00:00:07.66 
bitrate=1749.5kbits/s
frame=   49 fps=6.1 q=24.8 size=1874kB time=00:00:08.16 
bitrate=1879.7kbits/s
frame=   53 fps=6.2 q=31.0 size=1878kB time=00:00:08.83 
bitrate=1742.0kbits/s
frame=   56 fps=6.2 q=31.0 size=1881kB time=00:00:09.33 
bitrate=1651.4kbits/s
frame=   59 fps=6.1 q=31.0 size=1884kB time=00:00:09.83 
bitrate=1570.0kbits/s
frame=   60 fps=6.0 q=31.0 Lsize=1885kB time=00:00:10.00 
bitrate=1544.6kbits/s

video:1884kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: 0.060688%
ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 16 2014 12:59:03 with gcc 4.8 (GCC)
  configuration: --disable-static --enable-shared --disable-debug 
--enable-version3 --disable-w32threads --arch=x86 --target-os=mingw32 
--cross-prefix=i686-w64-mingw32- --prefix=/usr/local/win32 
--enable-runtime-cpudetect --enable-memalign-hack
  libavutil  54.  7.100 / 54.  7.100
  libavcodec 56.  1.100 / 56.  1.100
  libavformat56.  4.101 / 56.  4.101
  libavdevice56.  0.100 / 56.  0.100
  libavfilter 5.  1.100 /  5.  1.100
  libswscale  3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
[gdigrab @ 007ea880] Capturing whole desktop as 1920x1080x32 at (0,0)
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1415876597.363668, bitrate: 398133 kb/s
Stream #0:0: Video: bmp, bgra, 1920x1080, 398133 kb/s, 6 tbr, 1000k tbn, 6 
tbc
Output #0, mp4, to 'desktop-rec2.mp4':
  Metadata:
encoder : Lavf56.4.101
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080, 
q=2-31, 200 kb/s, 6 fps, 12288 tbn, 6 tbc
Metadata:
  encoder : Lavc56.1.100 mpeg4
Stream mapping:
  Stre

Re: [FFmpeg-user] Which videoc codec gives best compression for screen recording?

2014-11-13 Thread Tobias Rapp

On 13.11.2014 12:10, Tobias Rapp wrote:

On 13.11.2014 11:44, Carl Eugen Hoyos wrote:

I don't think the container has any relevance for the
file size and the best encoders may not work with mov.


I meant a x264 profile but now I realize that the binary I use doesn't
include this codec. Will get an updated one.


When testing with a recent version of FFmpeg with x264 included the 
output file size decreases significantly (see attached log).


Sorry for the noise.

Tobias
ffmpeg version N-67586-g3e1ac10 Copyright (c) 2000-2014 the FFmpeg developers
  built on Nov 12 2014 22:10:14 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads 
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray 
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme 
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg 
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr 
--enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 
--enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil  54. 11.100 / 54. 11.100
  libavcodec 56. 12.100 / 56. 12.100
  libavformat56. 12.103 / 56. 12.103
  libavdevice56.  2.100 / 56.  2.100
  libavfilter 5.  2.103 /  5.  2.103
  libswscale  3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc53.  3.100 / 53.  3.100
[gdigrab @ 02c4cc40] Capturing whole desktop as 1920x1080x32 at (0,0)
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1415878114.002614, bitrate: 398133 kb/s
Stream #0:0: Video: bmp, bgra, 1920x1080, 398133 kb/s, 6 tbr, 1000k tbn, 6 
tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 02bec3c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 02bec3c0] profile High 4:4:4 Predictive, level 4.0, 4:4:4 
8-bit
[libx264 @ 02bec3c0] 264 - core 142 r2479 dd79a61 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: 
cabac=1 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=1 trellis=1 8x8dct=1 cqm=0 
deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=6 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=1 b_bias=0 direct=1 weightb=1 
open_gop=0 weightp=2 keyint=250 keyint_min=6 scenecut=40 intra_refresh=0 
rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 
ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'desktop-rec3.mp4':
  Metadata:
encoder : Lavf56.12.103
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 
1920x1080, q=-1--1, 6 fps, 12288 tbn, 6 tbc
Metadata:
  encoder : Lavc56.12.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=4 fps=0.0 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=7 fps=6.6 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   10 fps=6.4 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   13 fps=6.3 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   16 fps=6.2 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   19 fps=6.2 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   22 fps=6.2 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   25 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   28 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   31 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   34 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   37 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   40 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   43 fps=6.1 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   46 fps=6.0 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   49 fps=6.0 q=0.0 size=   0kB time=00:00:00.00 bitrate=N/A
frame=   52 fps=6.0 q=23.0 size= 270kB time=00:00:00.00 bitrate=N/A
frame=   55 fps=6.0 q=23.0 size= 271kB time=00:00:00.50 
bitrate=4445.4kbits/s
frame=   59 fps=6.1 q=23.0 size= 277kB time=00:00:01.16 
bitrate=1941.6kbits/s
frame=   60 fps=5.6 q=-1.0 Lsize= 291kB time=00:00:09.66 bitrate= 
246.6kbits/s

video:290kB audio:0kB subtitle:0kB other s

Re: [FFmpeg-user] Which videoc codec gives best compression for screen recording?

2014-11-13 Thread Tobias Rapp

On 13.11.2014 12:40, Carl Eugen Hoyos wrote:

Tobias Rapp writes:


Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p


If your input is rgb and you don't care about compatibility,
please don't use yuv444p but -vcodec libx264rgb to get higher
output quality.


The recording doesn't need to be loss-less, I just want to make 
screen-casts to communicate GUI application issues to my colleges. To 
minimize the network upload time I searched for file size optimizations.


Regards,
Tobias

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


Re: [FFmpeg-user] Which videoc codec gives best compression for screen recording?

2014-11-13 Thread Tobias Rapp

On 13.11.2014 13:27, Kuban Altan wrote:

I would also give a shot for *quicktime animation* codec *(-vcodec
qtrle)*. Which can be lossless. But you have to test for file sizes.
Which one gives you better file size and minimum cpu load?


From a quick test it seems that "-vcodec qtrle -g 60" is about the same
size as "-vcodec mpeg4". The video bitrate is around 1200-1400kb/s. With 
x264 the bitrate is around 400kb/s.


Tobias

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


Re: [FFmpeg-user] R128 ebur128 filter only for 48kHz?

2015-02-25 Thread Tobias Rapp

On 25.02.2015 10:35, Christoph Gerstbauer wrote:

What is the actual state of the ebur128 filter? Is just 48kHz still
implemented or are there more sampling rates implemented since 2013?
From a quick look at the libavfilter/v_ebur128.c source file it seems 
like indeed the filter is only designed for 48kHz and internal 
re-sampling occurs if you feed an input file with different sample rate.


Maybe you just try it with e.g. 44.1kHz and check with "-loglevel debug" 
for an auto-inserted resampling filter?


Regards,
Tobias

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


Re: [FFmpeg-user] R128 ebur128 filter only for 48kHz?

2015-02-26 Thread Tobias Rapp

On 25.02.2015 16:29, Clément Bœsch wrote:

On Wed, Feb 25, 2015 at 10:35:59AM +0100, Christoph Gerstbauer wrote:
[...]

What is the actual state of the ebur128 filter? Is just 48kHz still
implemented or are there more sampling rates implemented since 2013?



Yes ebur128 supports only 48kHz because that's the only one standardized
(at least when it was implemented; did this change?). I saw some people
generalizing the formula for other frequencies, but until this is official
I don't see much point in supporting that. Of course, patches are welcome.


ITU-R BS.1770-2 states (page 4):

"""
These filter coefficients are for a sampling rate of 48 kHz. 
Implementations at other sampling rates will require different 
coefficient values, which should be chosen to provide the same frequency

response that the specified filter provides at 48 kHz.
"""

I read this as "feel free to use a different sampling rate but you will 
have to calculate the filter coefficients for yourself".


Regards,
Tobias

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