[FFmpeg-user] 5.1 downmix to 2.0 (again) and buried dialogs

2022-08-26 Thread pehache



Hi,

Not strictly speaking a ffmpeg (recurring) question, but ffmpeg is often 
used for that...


Since I a have only a stereo setup (albeit a decent one) attached to my 
TV, I started a while ago to generate downmixed 2.0 tracks with ffmpeg 
on my video files with 5.1 (or 7.1) tracks.


My original motivation was a too low perceived loudness of the dialogs 
compared to the music/ambiant sound in *some* movies (not all of them!). 
My hypothesis at that time was that the built-in downmixing of my 
equiment was overweighting the left and right channels (both front and 
side) compared to the central channel where most dialogs are supposed to 
be placed.


So I started with the "-ac 2" option in ffmpeg... Which basically 
changed nothing (as far as I could say, at least). Investigating more I 
then found the -af "pan=stereo| FL< ... | FR< ..." syntax to chose the 
weighting coefficient of each 5.1 channel to buiild the stereo channels.


There were recommended coefficients:
FL < 1.0*FL + 0.707*FC + 0.707*SL (and similarly from FR)
These ones were ginving the same result than -ac 2 to my ears.

There were also tons of alternate formula described on various web 
sites... I ended up with

FL < 0.707*FL + 1.0*FC + 0.707*SL
It was doing what it was supposed to do: louder dialogs compared to 
music and ambient sounds.


However I finally observed that it was also narrowing the stereo image. 
Indeed, FC does not contain only voices but also a large part of the 
music and ambient sounds. Overweighting FC would not narrow the stereo 
image it was containing only the voices, but this is not the case.


I kept wondering why the dialog loudness is sometimes perceived too low 
after downmixing, and I have a possible explanation: the brain is very 
good at isolating a voice buried in the ambient noise because it can 
located where it comes from. That's why people with hearing aids still 
have difficulties to follow a conversation when multiple people speak at 
the same time: the earings aids can restore the volume, but the 
directivity is (mostly) lost... So, with a real 5.1 or 7.1 setup the 
brain is not bothered by the side/rear channels when it comes to focus 
on the central dialogs, because they come from fully different 
directions. But after downmix, what was coming from the side/rear 
channels is now coming from the front channels, making the separation 
task more difficult for the brain. The solution is hence to downweight 
the side/rear channels... Therefore I am now using:


FL < 1.0*FL + 0.707*FC + 0.4*SL

And it seems better to me: the dialogs are clearer, without narrowing 
the stereo image. But maybe this is just what I desperately want to hear...


Any thought on all of this ?

___
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] Need to Convert MP4 (or MKV) with AAC *and* AC-3 Audio to Multi-Rendition HLS (each with *both* audio streams)

2022-08-31 Thread pehache

Le 31/08/2022 à 00:51, Clay a écrit :

Hi folks,
Can you help me fix this ffmpeg script:
The goal:
Take in an mp4 (or mkv) with one video stream and TWO audio streams (one
AAC/2ch and one AC-3/5.1ch)... and output four video renditions (1920,
1280, 720, 480) that all keep *both* audio streams.
The input file is around 4mbps and I am attempting to clamp the video
bitrates of the four renditions as close to these as possible: 4M/3M/2M/1M
Due to HLS compatibility, the AAC must remain in the output file; and
the AC-3 needs to remain as well.
I thought this would be easy... just passing the audio through and
copying it to each rendition output.. but this is kicking my butt.
If you have a better way to achieve this, I am ***all ears***.
Here is the code I have so far:
#!/bin/bash
ffmpeg -i ../InputFile-1920x804-24f.mp4 \
-filter_complex "[0:v]split=4[v1][v2][v3][v4]; [v1]copy[v1out];
[v2]scale=w=1280:h=536[v2out]; [v3]scale=w=720:h=300[v3out];
[v4]scale=w=480:h=200[v4out]"\
-map [v1out] -c:v:0 libx264 -x264-params -b:v:0 -maxrate:v:0 4M
-minrate:v:0 4M -bufsize:v:0 4M -crf 17 -preset slower -g 48
-sc_threshold 0 -keyint_min 48 \
-map [v2out] -c:v:1 libx264 -x264-params -b:v:1 -maxrate:v:1 3M
-minrate:v:1 3M -bufsize:v:1 3M -crf 17 -preset slower -g 48
-sc_threshold 0 -keyint_min 48 \
-map [v3out] -c:v:2 libx264 -x264-params -b:v:2 -maxrate:v:2 2M
-minrate:v:2 2M -bufsize:v:2 2M -crf 17 -preset slower -g 48
-sc_threshold 0 -keyint_min 48 \
-map [v4out] -c:v:3 libx264 -x264-params -b:v:3 -maxrate:v:3 1M
-minrate:v:3 1M -bufsize:v:3 1M -crf 17 -preset slower -g 48
-sc_threshold 0 -keyint_min 48 \
-map 0:a -c:a:0 \
-map 0:a -c:a:1 \
-map 0:a -c:a:2 \
-map 0:a -c:a:3 \
-f hls \
-hls_time 2 \
-hls_playlist_type vod \
-hls_flags independent_segments \
-hls_segment_type mpegts \
-hls_segment_filename OutputFile_%v/data%02d.ts \
-master_pl_name master.m3u8 \
-var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2 v:3,a:3"OutputFile_%v.m3u8
This code breaks when I attempt to run it, giving the following error:
[NULL @ 0x55f0357bbd40] Unable to find a suitable output format for '0:a'
0:a: Invalid argument
I have tried many varieties of the audio stream mapping... 0:a, a:0,
a:0:1.. etc.
I am hoping one of you gurus here take pity on me and show me the way :-)
___


Do you *really* need to achieve that with a single command?

Your lines
   -map 0:a -c:a:1 \
should be (I think)
   -map 0:a -c:a:1 copy \


___
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] stream specifier from -drc_scale option ?

2022-08-31 Thread pehache



Hi,

-drc_scale  is an AC3 decoder option for dynamic range 
compression, which must be placed before -i 


Is it possible to append a stream specifier if one want to selectively 
apply DRC to some streams, e.g. -drc_scale:3  to apply DRC only 
to the stream #3 of the input file ?


Thanks

___
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 extract an image from a video

2022-09-29 Thread pehache


Le 26/09/2022 à 02:51, Damien Vandame a écrit :


*The specified filename 'myvideo.jpg' does not contain an image sequence
pattern or a pattern is invalid.[image2 @ 0273929beb40] Use a pattern
such as %03d for an image sequence or use the -update option (with
-frames:v 1 if needed) to write a single image.*
frame=1 fps=0.0 q=6.2 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x
video:45kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown

PS - If I use the -update option, it does not work at all.



And did you try "Use a pattern such as %03d for an image sequence" ? It 
probably works for a single image 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".


Re: [FFmpeg-user] How to concat two videos with same size but different source?

2022-10-11 Thread pehache

Le 08/10/2022 à 10:31, Bo Berglund a écrit :

I have two mp4 videos both at 480p resolution, which I want to concat.
They are together about 80 minutes long.

When I do this using the common way with this command:

ffmpeg -f concat -safe 0 -i join.txt -c copy joinedfile.mp4

using a file specifying the video sections to concatenate the result plays very
poorly and has many artifacts.

And at the border between the two videos the output video becomes unplayable.

So I tried to re-encode using this command instead:

ffmpeg -hide_banner -i video.1.mp4 -i video.2.mp4 \
-filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" \
-map "[v]" -map "[a]" video.mp4

This command was started before bedtime yesterday and had not finished this
morning 8 hours later...

The video output file size was about 1.5 GB when I interrupted the process.
The two videos are 101 and 238 MB in size respectively. They are downloaded
videos from the Internet.

What ffmpeg command can I use to concatenate these two files in a safe way?




First I advice reading this: https://trac.ffmpeg.org/wiki/Concatenate

Second, when you have commands that do not give the expected results, it 
can often help to show the messages they print in the terminal.


___
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] Re-encoding mkv files from makemkv

2022-10-11 Thread pehache

Le 08/09/2022 à 00:04, James Board via ffmpeg-user a écrit :

I'm trying to re-encode an MKV file that I originally created with makemkv from 
the original BluRay disc.  My ffmpeg command is:
     ffmpeg-4.1.2-amd64-static/ffmpeg -y -i 
Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01.mkv -c:a copy -c:v libx264  
-preset slow -crf 20 Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01_RECODE.mkv

The error is
     Too many packets buffered for output stream 0:1.
     Conversion failed!

I just want to re-encode these files to save disk space.  Does anyone know how 
I can resolve the above error?  The full error message is below.
Thanks



ffmpeg version 4.1.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 
2000-2019 the FFmpeg developers
   built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio 
--cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp 
--enable-gray --enable-libaom --enab!
   libavutil     56. 22.100 / 56. 22.100
   libavcodec     58. 35.100 / 58. 35.100
   libavformat     58. 20.100 / 58. 20.100
   libavdevice     58.  5.100 / 58.  5.100
   libavfilter      7. 40.101 /  7. 40.101
   libswscale      5.  3.100 /  5.  3.100
   libswresample      3.  3.100 /  3.  3.100
   libpostproc     55.  3.100 / 55.  3.100
[matroska,webm @ 0x5bf2480] Could not find codec parameters for stream 3 
(Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from 
'Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01.mkv':
   Metadata:
     title    : Twin Peaks: A Limited Event Series - Disc 2
     encoder    : libmakemkv v1.16.4 (1.3.10/1.5.2) x86_64-linux-gnu
     creation_time   : 2021-10-25T15:19:56.00Z
   Duration: 00:56:57.50, start: 0.00, bitrate: 37009 kb/s
     Chapter #0:0: start 0.00, end 99.099000
     Metadata:
   title      : Chapter 01
     Chapter #0:1: start 99.099000, end 571.153917
     Metadata:
   title      : Chapter 02
     Chapter #0:2: start 571.153917, end 1180.512667
     Metadata:
   title      : Chapter 03
     Chapter #0:3: start 1180.512667, end 2008.840167
     Metadata:
   title      : Chapter 04
     Chapter #0:4: start 2008.840167, end 2526.732542
     Metadata:
   title      : Chapter 05
     Chapter #0:5: start 2526.732542, end 3312.851208
     Metadata:
   title      : Chapter 06
     Chapter #0:6: start 3312.851208, end 3417.497417
     Metadata:
   title      : Chapter 07
     Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 
1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
     Metadata:
   BPS-eng      : 33970403
   DURATION-eng    : 00:56:57.49741
   NUMBER_OF_FRAMES-eng: 81938
   NUMBER_OF_BYTES-eng: 14511719069
   SOURCE_ID-eng   : 001011
   _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 linux(x64-release)
   _STATISTICS_WRITING_DATE_UTC-eng: 2021-10-25 15:19:56
   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 
SOURCE_ID
     Stream #0:1(eng): Audio: truehd, 96000 Hz, 5.1(side), s32 (24 bit) 
(default)
     Metadata:
   title      : Surround 5.1
   BPS-eng      : 2360136
   DURATION-eng    : 00:56:56.95500
   NUMBER_OF_FRAMES-eng: 4100346
   NUMBER_OF_BYTES-eng: 1008060054
   SOURCE_ID-eng   : 001100
   _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 linux(x64-release)
   _STATISTICS_WRITING_DATE_UTC-eng: 2021-10-25 15:19:56
   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 
SOURCE_ID
     Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s
     Metadata:
   title      : Surround 5.1
   BPS-eng      : 64
   DURATION-eng    : 00:56:56.99200
   NUMBER_OF_FRAMES-eng: 106781
   NUMBER_OF_BYTES-eng: 273359360
   SOURCE_ID-eng   : 001100
   _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 linux(x64-release)
   _STATISTICS_WRITING_DATE_UTC-eng: 2021-10-25 15:19:56
   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 
SOURCE_ID
     Stream #0:3(eng): Subtitle: hdmv_pgs_subtitle    Metadata:
   BPS-eng      : 26434
   DURATION-eng    : 00:56:36.622395833
   NUMBER_OF_FRAMES-eng: 1518
   NUMBER_OF_BYTES-eng: 11223488
   SOURCE_ID-eng   : 001200
   _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 linux(x64-release)
   _STATISTICS_WRITING_DATE_UTC-eng: 2021-10-25 15:19:56
   _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 
SOURCE_ID
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Too many packets buffere

Re: [FFmpeg-user] Video concat problem

2022-10-17 Thread pehache

Le 14/10/2022 à 16:46, ibur...@compuscience.com a écrit :

I have two videos that I want to concatenate:

  


Video 1 - very short one with a silent audio track (2 seconds)

  


Video 2 - About 2 minutes. The audio starts around 10 seconds from start

  


The final concatenation is strange:

  


Starts with video 1 as expected (2 seconds)

Next, a blank for about 10 seconds

After that, video 2 starts simultaneously with the audio. In other words,
the video stream of video 2was moved to start together with the audio,
instead of showing for 10 seconds with silence.

  


How can I fix this?

  


I am attaching the stream info for each file in case this helps.


Where is the command you are using?

___
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 concat two videos with same size but different source?

2022-10-18 Thread pehache

Le 14/10/2022 à 19:24, Bo Berglund a écrit :



First I advice reading this: https://trac.ffmpeg.org/wiki/Concatenate


Been there and tried that, in fact my main concat script uses the first approach
to create the list file and supplies that to ffmpeg.


Sure, but the different methods have different restrictions, and you may 
fall under under one of them.






Second, when you have commands that do not give the expected results, it
can often help to show the messages they print in the terminal.


The unexpected result is not an ffmpeg error or such just that the second half
of the output does not play properly while the first does...


Still, the output messages could help (or not) understanding what is 
going on, even if they are not error messages.



___
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 concat two videos with same size but different source?

2022-10-18 Thread pehache

Le 15/10/2022 à 11:20, Reindl Harald a écrit :



Am 14.10.22 um 19:24 schrieb Bo Berglund:

Is this a flawed assumption?


as it told you at the begin of this thread: you can't concat video 
formats like H264 as it where wave audiofiles




Which is not what he is doing... unless I missed something.

___
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/ffprobe won't detect the language of a webvvt (subtitles) file

2022-10-25 Thread pehache


Hello,

A webtt subtitles files starts with a few header lines, and one of them 
indicates the language:


==
WEBVTT
Kind: captions
Language: en
==

But ffmpeg won't detect the language. The ffprobe output on the above 
file makes no mention of it:


==
Input #0, webvtt, from 'Star Trek Continues E01 "Pilgrim of Eternity" 
[3G-ziTBAkbQ].en.vtt':

  Duration: N/A, bitrate: N/A
  Stream #0:0: Subtitle: webvtt
==

Consequentely, when muxed into a video file, no language is reported for 
the subtitle streams.


In constrast, MKVToolnix detects the language when reading a webvtt file 
(although not always perfectly)


Is there a simple solution? I know it's possible to force a langage for 
any stream, but in practice for each video file I have many subtitle 
tracks to mux, and this is handled by scripts, so I'd prefer something 
straigth and automatic.


___
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] encode to RAW video

2022-10-26 Thread pehache


Le 24/10/2022 à 18:36, Naveen.B a écrit :


I tried by giving the input with -pix_fmt, it's the same error.

Yes, I want raw video. I have converted RAW files to .mp4 successfully with
uncompressed, the size of the .mp4 format video was less comparatively.
I have 30 RAW files with each file is around 4Mbps (so, 30 RAW
filesx4Mbps=180Mbps for one second), the output of the video file size
(.mp4) is coming around 18 Mbps, so I am assuming .mp4 video format is
doing some compression and hence I need to try this with RAW video.

This is the command I tried for .mp4 file video which is coming 18Mbps as
output video file size,
*ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i CapturedImage-%03d.raw
-c:v libx264 -pix_fmt yuv420p -preset fast -profile:v main -level:v 4.0
-crf 1 raw_video.mp4*



Try this :

ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i 
CapturedImage-%03d.raw -c:v rawvideo -pix_fmt yuv420p -f rawvideo output.raw


Alternatively you can put the raw video stream in a container such as MKV:

ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i 
CapturedImage-%03d.raw -c:v rawvideo -pix_fmt yuv420p output.mkv


In either case I'm not sure it will easy to read the output file with 
classical players.


___
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] encode to RAW video

2022-10-27 Thread pehache

Le 27/10/2022 à 13:31, Naveen.B a écrit :



one last question, any idea on how to know/measure how long the ffmpeg
takes to encode the file.


The answer depends on too many parameters.


i.e, basically I want to know how much time it takes to compress with
different presets and how much time it takes to encode for an uncompressed
RAW video.


Almost by definition, an truly uncompressed video is not encoded, it's 
just writing to the output the data that are in memory (well, almost... 
there's still possibly the conversion of the pixel format, from RGB to 
YUV420 for instance, but this is quite fast). What will limit the speed 
is the read/write performances on the disk you are using, and/or the 
time needed to decode the input 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".


Re: [FFmpeg-user] Basic Video Manipulation Qustions

2022-10-27 Thread pehache

Le 27/10/2022 à 17:46, John Van Ostrand a écrit :

Hi All,

The RAW video discussion had me thinking about resolution and bit rates for
video and I had some questions. These are not how-to questions but general
video questions. I'm an amateur so the contest of these questions is around
video for home movies and social media, stored and shared as data files,
and displayed on computers, tablets, and TVs.

1. Why does it make sense to convert from a lossy format to raw? You're not
gaining any more detail.


It can make sense for processing purpose



2. Does re-rendering video over and over at the same resolution, frame
rate, and bit rate cause degradation? For example, if I want to make
several changes to the video, like colour correction, splicing out
sections, transitions, titling, etc. should I be trying to do that all in
one command?


decompressing/recompressing with the exact same codec and exact same 
encoding parameters, and without making any change on the video, should 
not cause significant degradations. In all others cases degradations are 
possible.




3. I understand that -c copy is a great way to eliminate time and preserve
detail but what's the best way to do this when converting from one codec to
another, or when performing editing or other changes?


If the source had been encoded with a very high quality (say 
"transparent", or nearly), then you can consider if was like 
uncompressed. Then you can choose whatever quality you want on output.


Otherwise, if you want to maintain quality as far as possible, it's 
better to choose a slightly higher output quality than the one of the 
source video.




4. How important is it to keep standard resolutions, frame rates, and bit
rates? Do hardware decoders do better with those? Do software decoders
handle weird resolutions better?  Will strange decoding artifacts appear
more often with non-standard parameters?


This is a much too general question...

Some mobile and low power devices have restrictions, but rather linked 
to the power needed to decode the streams.



___
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] encode to RAW video

2022-11-02 Thread pehache


Le 31/10/2022 à 14:23, Naveen.B a écrit :

I observed some weird behaviour with fast and medium preset,

fast preset:
*ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i CapturedImage-%03d.raw
-c:v rawvideo -pixel_format yuv420p -f rawvideo -c:v libx264 -preset fast
-crf 18 test.raw*


"-c:v rawvideo" then "-c:v libx264" makes no sense

At some point you should be clear if you want a raw or a h264 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".


Re: [FFmpeg-user] encode to RAW video

2022-11-02 Thread pehache

Le 01/11/2022 à 00:01, Carl Zwanzig a écrit :


-c:v rawvideo -pixel_format yuv420p 
Use the video codec "rawvideo" with that pixel format for output, except 
AFAICT that there is no video encoder "rawvideo" (that should throw an 
error, which because of the missing command output, we don't see).




I've tested it, and it works (I mean it produces an output, although I 
don't know how to read it afterwards).


___
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] I'm lost with the options to set a default subtitle

2022-11-02 Thread pehache



Say I have an input file with several subtitles, one of them being 
flagged "default" (say the 0:s:1 stream, that is the 2nd subtitle 
stream). I am copying all of them: "-map 0:s -c:s copy"


Empirically I have found that:

* no option
-> the default flag is unmodified

* "-disposition:s:2 default"
-> the default flag is unmodified

* "-disposition:s -default"
-> the default flag is set on the s:0 stream

* "-disposition:s -default -disposition:s:2 default"
-> the default flag is set on the s:2 stream

* "-disposition:s -default -disposition:s:2 default"
-> the default flag is set on the s:2 stream

* "default_mode passthrough"
-> the default flag is unmodified

* "default_mode infer"
-> the default flag is unmodified

* "default_mode infer_no_subs"
-> the default flag is unmodified

* "default_mode infer -disposition:s -default"
-> the default flag is set on the s:0 stream

* "default_mode infer_no_subs -disposition:s -default"
-> the default flag is removed from all s: streams

* "default_mode passthrough -disposition:s -default"
-> the default flag is removed from all s: streams

So, I know what to do depending on what I want on the output, but I do 
not understand at all how these different options interact...


Any clue appreciated!

___
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 reduce interlace artifacts while trancoding to mp4

2022-11-15 Thread pehache

Le 12/11/2022 à 10:57, Bouke / Videotoolshed a écrit :


So, you need to de-interlace the filter.


There's also the possibility to keep the interlacing and encode an 
interlaced h264 (so relying on the player to properly deinterlace). I 
have never done that, and I am not sure which coding is appropriate.


___
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 Transcode ALL Audio streams from input to output using ffmpeg?

2022-11-25 Thread pehache

Le 24/11/2022 à 14:29, Mahesh Velankar a écrit :

I have an input MPEG TS file 'unit_test.ts'. This file has following
content (shown by ffprobe):

Input #0, mpegts, from 'unit_test.ts':
   Duration: 00:00:57.23, start: 73674.049844, bitrate: 2401 kb/s
   Program 1
 Metadata:
   service_name: Service01
   service_provider: FFmpeg
 Stream #0:0[0x31]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(progressive), 852x480 [SAR 640:639 DAR 16:9], Closed Captions,
59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
 Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081),
48000 Hz, 5.1(side), fltp, 448 kb/s
 Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081),
48000 Hz, stereo, fltp, 192 kb/s

I want to convert it into another MPEG TS file. Requirement is that the
Video stream of the input should be directly copied to the output whereas
*ALL* the audio streams should be transcoded "aac" format.

I tried this command:

ffmpeg -i unit_test.ts -map 0 -c copy -c:a aac maud_test.ts



Try this (and show the ffprobe of the output file) :

ffmpeg -i unit_test.ts -map 0 -c:v copy -c:a aac -ac:a:0 6 -ac:a:1 2 
maud_test.ts


___
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] Does "cat" degrade video quality?

2023-01-01 Thread pehache

Le 02/12/2022 à 13:36, MyCraigs List via ffmpeg-user a écrit :

I'm running Debian 11.
I use the command line "cat" to concatenate videos of all the same quality together.  All 
VOB files are cat'd together and none others.  The second bunch of videos I cat together are from a 
Sony video camera and are "MTS" files.  That's to say I do not cat VOB and MTS files 
together.
The command I use for VOB is (at command line) $ cat File_1.VOB  File_2.VOB> 
New_File_1.VOBThe command I use for MTS is (at command line) $ cat File_1.MTS 
File_2.MTS> New_File_2.MTS

Not wanting to lose any video or audio quality, does "cat" files degrade their quality?  


The answer is definitely "no"

___
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] Does "cat" degrade video quality?

2023-01-01 Thread pehache


Le 03/12/2022 à 15:42, David Niklas a écrit :

On Fri, 2 Dec 2022 11:49:04 -0800
Dan Harkless  wrote:


MakeMKV is in a semi-permanent Beta state, so you need to periodically
download new license keys from:

      https://forum.makemkv.com/forum/viewtopic.php?t=1053

but aside from that, it's easy to use, and is free and open-source.
Good luck with your family video preservation, and cheers.


How can it be open-source but also require a license key?


Free software is not necessarily free. Even when the sources are 
released under a free software license (such as GPL), the compiled 
versions can be charged. But anyone is free to get the sources and 
compile them.


That said, MakeMKV is not a free software, and it is only partly 
open-source. It's a freeware (for the DVD rip/decrypt part) and a 
shareware (for the bluray rip/decrypt part).



Couldn't I, or
anyone else, just edit the license check code out then?


Indeed yes in the case of a free software (but no in the case of MakeMKV)

___
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] Does "cat" degrade video quality?

2023-01-02 Thread pehache

Le 01/01/2023 à 19:21, Reindl Harald a écrit :



Am 01.01.23 um 19:16 schrieb pehache:

Couldn't I, or
anyone else, just edit the license check code out then?


Indeed yes in the case of a free software (but no in the case of MakeMKV)


when the source code is available *you can* and the only thing you 
mustn't do is distiribute the results 


That's correct

as you must not distribute ffmpeg 
binaries built with the "wrong" configure options


What do you mean ?

___
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] MKV to MP4 subtitle issue

2023-01-17 Thread pehache

Le 16/01/2023 à 11:47, Moritz Barsnick a écrit :


MP4 cannot carry those HDMV PGS subtitles (or any other bitmap based
format, if I remember correctly).


MP4 can carry the DVDSUB format, which is bitmap.

The OP can give a try transcoding the PGS subtitles to DVDSUB, using 
"-c:s dvdsub", but in my (limited) experience it often fails for some 
reason or another.


___
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] h265 output bigger than h264 input, how to level the both quality to make h265 smaller than h264

2023-01-17 Thread pehache

Le 06/01/2023 à 14:30, Ricardo Henrique a écrit :

Hello FFMpeg team, well I'm using FFMpeg to change the encode from h264 to h265 and works 
fine for most of files, but some files has the output file (h265) bigger than input file 
(h264), what is the reason for this to happen? I know that there is a process to 
transcode h264 to raw (or close) then encode to h265 (right?), so I imagine that the h265 
output in this case has a much higher visual quality (bitrate, ...) than the input h264 
right? Is there a way to "level" the video quality of the h264 input file with 
the h265 output file so that the output file is not larger than the input file?

I'm using FFMpeg like that:

for %%a in (*.mkv, *.mp4) do (
 ffmpeg -i "%%a" -map 0 -c:a copy -c:s copy -c:v libx265 -vtag hvc1 -crf 18 -preset 
medium -tune animation "Out\%%~na.mkv"
)


Compression artefacts accumulate after each compression: whatever you 
are doing, you can't get a better quality at the end than the quality of 
the h264 file. At best you will get (almost) the same quality, and there 
are good chances that you get a lower one.


Just keep you h264 files and spare your time...


___
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] Converting BT2020 HVEC Videos to H.264 without Color Washout

2023-10-21 Thread pehache

Le 26/03/2021 à 00:55, Craig L. a écrit :

Sorry. I don't think I responded to this correctly before.


I think I tried exactly that based upon this stackoverflow question:

https://stackoverflow.com/questions/64981984/ffmpeg-transcode-uhd-h265-to-sdr-h264-without-color-loss 



The example in that post uses this command:

|ffmpeg -i 4K.ts -vf 
zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p 
-c:v h264 -crf 19 -preset ultrafast output.mp4 |


Which I thought might be my solution but when I tried it, it ended up 
making the video too red.




Same here, much too red output in the shadows.

(I'm leaving the rest the rest of the discussion below, as it is an old one)







On 3/25/21 4:09 PM, Pavel Koshevoy wrote:

On Thu, Mar 25, 2021 at 9:27 AM Craig L.  wrote:


I recently started finding certain videos were washing out upon H.264
conversion.


After doing some research I found that if I added -color_primaries
bt2020 to the command, the color would come out correctly, but ONLY if
the video was played in Quicktime.  When played in Chrome, it would look
washed out.

Here is a link to a screengrab showing the video in quicktime on the
left and in Chrome on the right.  Same video.


*https://snipboard.io/N8nYv0.jpg* 




After much research I can't figure out how to handle this?

What is the correct way to convert these videos that I suppose are 10
bit HDR  into H.264 so that they will play correctly in Chrome, etc.



This is my current command:

/usr/local/bin/ffmpeg  -i "156237-Video2.mov"   -filter_complex
"scale=480:270"  -color_trc smpte2084 -color_primaries bt2020 -c:v
libx264 -profile:v high -pix_fmt yuv420p -level 5.1 -preset ultrafast
-movflags faststart   -vsync 2  -c:a aac -b:a 128k -y
156237-Video2.mov-16-9-1616621202.mp4






For best possible player compatibility you really need to convert from
HDR10 to SDR (bt709).

To do that you need to use either colorspace or zscale ffmpeg filter.  
The

colorspace filter didn't support HLG the last time I checked, but that
wouldn't matter if your source is HDR10, not HLG.
Since you'd be converting from high dynamic range to standard dynamic 
range

you would also need to use the tonemap filter.

There is probably a LUT file somewhere that implements HDR10 -> BT709 
color
space conversion and tone mapping in one step, skipping 
zscale/tonemap.  If

you had such LUT you could use it with lut3d filter.

Pavel.
___
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] HDR bt.2020 to SDR bt.709 conversion

2023-10-21 Thread pehache



Hello,

I have trouble converting a 4K HDR video into a HD SDR one. Basically it 
plays much too dark and reddish in VLC (on macOS). The ffprobe output is 
this video is at the bottom of the post


I first tried applying a curve filter to boost the dark tones. I works 
not too bad, but the reddish shift is still, if not amplified.


Then I browsed the web and found a filter set that looks popular (I mean 
copied/pasted on many different pages):


-vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709, \
tonemap=tonemap=hable,zscale=t=bt709:m=bt709:r=tvformat=yuv420p

But, well, it doesn't solve anything... Using "gamma" instead of "hable" 
gives a higher luminosity, but there's still a strong red shift.


I tried many different things with the zscale filter, but the problem is 
that I don't fully understand the effect of the different parameters, 
although I'm not completly unfamiliar with the color profiles. It seems 
to me that all of this deals mainly the luminosity, and little with the 
chrominance.


I have also found a page that describes how to convert from the bt.2020 
to bt709 profile, with a link to download a LUT file.

https://www.binarytides.com/color-grading-hlg-videos-with-ffmpeg/
https://nopixels.net/articles/hlg-to-rec709/

So I tried the filter lut3d=nopixels_net_hlg2020_to_rec709.cube, with 
various combinations of the zscale filter, but could not obtain anything 
correct at the end. I always have reddish, or very reddish, or pinkish, 
color shifts...



I'm a bit lost, now... Any help appreciated !



===
*$ ffprobe in0.mkv
ffprobe version 4.4.4 Copyright (c) 2007-2023 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/opt/local --cc=/usr/bin/clang 
--mandir=/opt/local/share/man --enable-audiotoolbox --disable-indev=jack 
--disable-libjack --disable-libopencore-amrnb 
--disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm 
--disable-libxcb-xfixes --enable-opencl --disable-outdev=xv 
--enable-sdl2 --disable-securetransport --enable-videotoolbox 
--enable-avfilter --enable-avresample --enable-fontconfig 
--enable-gnutls --enable-libass --enable-libbluray --enable-libdav1d 
--enable-libfreetype --enable-libfribidi --enable-libmodplug 
--enable-libmp3lame --enable-libopenjpeg --enable-libopus 
--enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libzimg --enable-libzvbi 
--enable-lzma --enable-pthreads --enable-shared --enable-swscale 
--enable-zlib --enable-libaom --enable-libsvtav1 --arch=x86_64 
--enable-x86asm --enable-gpl --enable-libvidstab --enable-libx264 
--enable-libx265 --enable-libxvid --enable-postproc

  libavutil  56. 70.100 / 56. 70.100
  libavcodec 58.134.100 / 58.134.100
  libavformat58. 76.100 / 58. 76.100
  libavdevice58. 13.100 / 58. 13.100
  libavfilter 7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc55.  9.100 / 55.  9.100
Input #0, matroska,webm, from 'in0.mkv':
  Metadata:
encoder : libebml v1.4.0 + libmatroska v1.6.2
creation_time   : 2021-03-09T20:53:48.00Z
Writing frontend: StaxRip v1.7.0.3
  Duration: 00:49:10.18, start: 0.00, bitrate: 4963 kb/s
  Chapters:
[...]
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, 
bt2020nc/bt2020/smpte2084), 3840x2160, SAR 1:1 DAR 16:9, 23.98 fps, 
23.98 tbr, 1k tbn, 23.98 tbc (default)

Metadata:
  BPS-eng : 4003363
  DURATION-eng: 00:49:09.19700
  NUMBER_OF_FRAMES-eng: 70710
  NUMBER_OF_BYTES-eng: 1475838552
  _STATISTICS_WRITING_APP-eng: mkvmerge v50.0.0 ('Awakenings') 64-bit
  _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-09 20:53:48
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[...]

___
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] HDR bt.2020 to SDR bt.709 conversion

2023-10-22 Thread pehache


Le 22/10/2023 à 01:20, Dennis Mungai a écrit :


Please provide a sample of the input file and uncut output of the ffmpeg
command line in use.



Here is a 60 sec. piece of the input video, extracted with
ffmpeg -ss 75 -i in0.mkv -map 0:0 -c copy in1.mkv

http://pehache.free.fr/TEMP/in1.mkv

Here is what it looks like in VLC (this is a macOS screenshot, not from 
the VLC capture tool):

http://pehache.free.fr/TEMP/vlc.png

And what it should look like (natural colors and much more detailed 
shadows):

http://pehache.free.fr/TEMP/web.png

My main problem is the color shift. Playing with the luminosity is not 
that difficult (even simply with the curve filter if needed).



About the ffmpeg text output, I've just cut the irrelevant parts 
(information about audio and subtitle tracks, and about chapters)


___
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] aresample=matrix_encoding=dplii output is still 5.1 ??

2019-01-27 Thread pehache

Hi,

I used to apply a Dolby Pro Logic II encoding this way :

"-af aresample=matrix_encoding=dplii -ac 2"

But I learned that "-ac 2" does a full downmix of the 5.1 stream, which 
is not what I want : after the DPL II resampling one simply want to 
extract the 2 (encoded) front channels and that's it...


The other question is: why the output of the DPL II encoding is still a 
5.1 stream, and not just a 2.0 stream ?


I'm a bit lost... and will appreciate any explanation.

___
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] aresample=matrix_encoding=dplii output is still 5.1 ??

2019-01-28 Thread pehache

Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :

2019-01-27 16:44 GMT+01:00, pehache :


I used to apply a Dolby Pro Logic II encoding this way :


Actual command line and complete, uncut console output missing.



OK

ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af 
aresample=matrix_encoding=dplii -t 300 a.m4a


ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter 
--enable-avresample --enable-libmp3lame --enable-libvorbis 
--enable-libopus --enable-librsvg --enable-libtheora 
--enable-libopenjpeg --enable-libmodplug --enable-libvpx 
--enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray 
--enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype 
--enable-libfribidi --disable-libjack --disable-libopencore-amrnb 
--disable-libopencore-amrwb --disable-indev=jack --enable-opencl 
--disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox 
--enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man 
--enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 
--enable-x86asm --enable-libx265 --enable-gpl --enable-postproc 
--enable-libx264 --enable-libxvid

  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100
[matroska,webm @ 0x7faa6f80] Could not find codec parameters for 
stream 7 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[matroska,webm @ 0x7faa6f80] Could not find codec parameters for 
stream 8 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options
[matroska,webm @ 0x7faa6f80] Could not find codec parameters for 
stream 9 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' 
options

Input #0, matroska,webm, from 'test.mkv':
  Metadata:
CREATION_TIME   : 2019-01-02T11:26:09Z
ENCODER : Lavf57.7.2
  Duration: 03:53:49.29, start: 0.00, bitrate: 3710 kb/s
Chapter #0:0: start 0.00, end 301.051000
Metadata:
  title   : Main Title; a Wounded Man
Chapter #0:1: start 301.051000, end 706.664000
Metadata:
  title   : St. David's Field, Tennessee
Chapter #0:2: start 706.664000, end 1219.76
Metadata:
  title   : Fort Hayes
Chapter #0:3: start 1219.76, end 1601.35
Metadata:
  title   : Journey to the Furthermost Outpost
Chapter #0:4: start 1601.35, end 2170.168000
Metadata:
  title   : Clean-Up Duty
Chapter #0:5: start 2170.168000, end 2539.62
Metadata:
  title   : The Ruthless Pawnee
Chapter #0:6: start 2539.62, end 2842.381000
Metadata:
  title   : Contact with the Sioux
Chapter #0:7: start 2842.381000, end 3170.626000
Metadata:
  title   : Riding Out to the Indians
Chapter #0:8: start 3170.626000, end 3414.036000
Metadata:
  title   : Meeting with the White Man
Chapter #0:9: start 3414.036000, end 3837.208000
Metadata:
  title   : Stands with a Fist (Christine)
Chapter #0:10: start 3837.208000, end 4189.352000
Metadata:
  title   : Invited to the Village
Chapter #0:11: start 4189.352000, end 4307.595000
Metadata:
  title   : The Buffalo Return
Chapter #0:12: start 4307.595000, end 4798.961000
Metadata:
  title   : The Hunt
Chapter #0:13: start 4798.961000, end 5133.754000
Metadata:
  title   : A Good Trade
Chapter #0:14: start 5133.754000, end 5552.922000
Metadata:
  title   : Dances with Wolves
Chapter #0:15: start 5552.922000, end 6113.065000
Metadata:
  title   : Bestowed a Great Honor
Chapter #0:16: start 6113.065000, end 6824.234000
Metadata:
  title   : Falling in Love
Chapter #0:17: start 6824.234000, end 6977.262000
Metadata:
  title   : Attack of the Pawnee
Chapter #0:18: start 6977.262000, end 7472.048000
Metadata:
  title   : Told to Mourn No More
Chapter #0:19: start 7472.048000, end 7984.226000
Metadata:
  title   : Like the Stars
Chapter #0:20: start 7984.226000, end 8334.117000
Metadata:
  title   : Retrieving the Journal
Chapter #0:21: start 8334.117000, end 8854.846000
Metadata:
 

Re: [FFmpeg-user] aresample=matrix_encoding=dplii output is still 5.1 ??

2019-01-28 Thread pehache

Le 28/01/2019 à 09:00, pehache a écrit :

Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :

2019-01-27 16:44 GMT+01:00, pehache :


I used to apply a Dolby Pro Logic II encoding this way :


Actual command line and complete, uncut console output missing.



OK

ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af 
aresample=matrix_encoding=dplii -t 300 a.m4a




I was classicaly adding the "-ac 2" option, but now I'm not sure if it's 
a good idea and what to do to get the 2 DPLII channels without any 
further mixing.



___
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] aresample=matrix_encoding=dplii output is still 5.1 ??

2019-01-28 Thread pehache

Le 28/01/2019 à 14:11, Carl Eugen Hoyos a écrit :

2019-01-28 9:00 GMT+01:00, pehache :

Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :

2019-01-27 16:44 GMT+01:00, pehache :


I used to apply a Dolby Pro Logic II encoding this way :


Actual command line and complete, uncut console output missing.


ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
aresample=matrix_encoding=dplii -t 300 a.m4a


You get stereo output with:
-af aresample=matrix_encoding=dplii:out_channel_layout=stereo


OK. but what happens to the other channels (back and central) after the 
dplii encoding if out_channel_layout=stereo is not coded ? Are thay 
identical to the input ones or set to zero ?



And identical output with -af aresample=matrix_encoding=dplii -ac 2


Since "-ac 2" performs a full downmixing according to the page I linked 
before, that means the others channels are zeroed ?



Note that the dplii conversion does not do a correct phase shift,
the output does not have optimal quality.


Do you mean in general with the DPLII principle, or specifically in ffmpeg ?


___
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] aresample=matrix_encoding=dplii output is still 5.1 ??

2019-01-28 Thread pehache

Le 28/01/2019 à 23:58, pehache a écrit :

Le 28/01/2019 à 14:11, Carl Eugen Hoyos a écrit :

2019-01-28 9:00 GMT+01:00, pehache :

Le 27/01/2019 à 16:53, Carl Eugen Hoyos a écrit :

2019-01-27 16:44 GMT+01:00, pehache :


I used to apply a Dolby Pro Logic II encoding this way :


Actual command line and complete, uncut console output missing.


ffmpeg -i test.mkv -map 0:1 -c:a aac -b:a 256k -af
aresample=matrix_encoding=dplii -t 300 a.m4a


You get stereo output with:
-af aresample=matrix_encoding=dplii:out_channel_layout=stereo


OK. but what happens to the other channels (back and central) after the 
dplii encoding if out_channel_layout=stereo is not coded ? Are thay 
identical to the input ones or set to zero ?



And identical output with -af aresample=matrix_encoding=dplii -ac 2


Since "-ac 2" performs a full downmixing according to the page I linked 
before, that means the others channels are zeroed ?


Just checked, the output of:

ffmpeg -i test.mkv -map 0:1 -af
aresample=matrix_encoding=dplii -t 300 a.wav

is bit to bit identical to:

ffmpeg -i test.mkv -map 0:1 -t 300 a.wav

So "aresample=matrix_encoding=dplii" doesn't apply any encoding by 
itself, it just sets the downmixing parameters that are applied by "-ac 2" ?


___
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".