Re: [FFmpeg-user] Concat 2 videos, results in wrong length of the result

2017-09-08 Thread Gyan
On Sat, Sep 9, 2017 at 11:01 AM, Nitish Prabhu 
wrote:

>
> Won't altering the timebase for "96.out.mp4" make the "96.new.mp4" play
> slower than it was recorded at?
>

When the timescale is changed here, ffmpeg will rescale the timestamps to
maintain timing. There's a loss of precision since the temporal resolution
is decreased ~2x but for a 30 fps video and a 10^4 timescale, it makes no
difference.
___
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] Concat 2 videos, results in wrong length of the result

2017-09-08 Thread Nitish Prabhu
On Sat, Sep 9, 2017 at 10:24 AM, Gyan  wrote:
>
> Run this on 96.out.mp4
>
> ffmpeg -i 96.out.mp4 -c copy -video_track_timescale 12800 96.new.mp4
>
> and concat this with the other file.

Won't altering the timebase for "96.out.mp4" make the "96.new.mp4" play
slower than it was recorded at?

Is it better to instead drop the frames in "96.out.mp4" (which has a frame
rate of 29.97fps) and make it 25fps (frame rate of 98.out.mp4), and then
concatenate the streams?

Otherwise, we can also use the concat filter
 (present on recent ffmepg
versions) to generate a variable frame rate concatenated output (with all
frames intact).
___
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] Concat 2 videos, results in wrong length of the result

2017-09-08 Thread Gyan
On Fri, Sep 8, 2017 at 3:38 PM, Marek Sebera  wrote:

>
> Concat of the 2 videos, of lenght (00:00:21.00) and (00:00:28.03)
> results in video of lenght (00:01:54.92), which is obviously wrong.
>
>
>  ffprobe of 98.out.mp4 
>


> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1080, 1455 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
>


>  ffprobe of 96.out.mp4 
>


> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1080, 919 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
>

The timescales are different 12800 vs 3. The concat demuxer initializes
output properties based on the first file, and doesn't rescale timestamps
of the other files.

Run this on 96.out.mp4

ffmpeg -i 96.out.mp4 -c copy -video_track_timescale 12800 96.new.mp4

and concat this with the other file.
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nitish Prabhu
On Fri, Sep 8, 2017 at 5:34 PM, Gyan  wrote:
> Running
>
> ffmpeg -seek_timestamp 1 -copyts -ss 1 -i src.mp4
> copyts-seekts-ss1.mp4
>
> produces a file, reported as,
>
>   Duration: 00:00:01.00, start: 2.00, bitrate: 276 kb/s
>
> whose video contents correspond to TS 2 to 3 of src.mp4, (frame counter
> 25).  'ss' acts as relative offset, and is apparently immune to
> seek_timestamp. Source timestamps are copied over to output.

On Fri, Sep 8, 2017 at 2:53 PM, Nicolas George  wrote:
> After further testing, it seems the -ss option is itself relative to the
> file's start time: by setting -ss 60 with a file that starts at 60, you
> are asking to seek to timestamp 120. And with -copyts, you get that
> timestamp.
>
> Therefore, the problem is that [120;130[ \cup [60;70[ = \emptyset, not
> [0;10[ as I said before.
>

Gyan, Nicholas,

Thanks for sharing your observations an insights. I am now able to get
a better understanding of ffmpeg's behavior for "-ss/-t".

To summarize the observations, "-ss/-t" does not operate on timestamps
directly but operates on the relative offset from the start of the
file (even when "-seek_timestamp" is enabled).

From the best of my understanding, when "-seek_timestamp" is enabled,
as the documentation says "-ss" should operate on timestamps rather
than relative offsets. So, this may be a bug, or we might have to
change the documentation with a relevant correction (probably stating
in which case "-seek_timestamp" works).

Thanks!
___
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] Concat 2 videos, results in wrong length of the result

2017-09-08 Thread Marek Sebera
Hi,

I'm trying to concat 2 video files, process that worked pretty well for
us for the past few months.

Using Debian binary distribution ffmpeg (7:3.2.7-1~deb9u1) and libx264
(libx264-148:amd64  2:0.148.2748+git97eaef2-1)

Concat 2 files, ffmpeg command, ffprobe of both source files and result
files below.

Concat of the 2 videos, of lenght (00:00:21.00) and (00:00:28.03)
results in video of lenght (00:01:54.92), which is obviously wrong.

Is it issue within ffmpeg handling or user error?

Thank you
MS

 FFMPEG COMMAND 
ffmpeg -f concat -y -safe 0 -i concat.121.def -c:a none -c:v h264 -an
/var/www/html/webroot/video/121.merged.out.mp4

 FFMPEG COMMAND output 

ffmpeg version 3.2.7-1~deb9u1 Copyright (c) 2000-2017 the FFmpeg
developers

  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516


  configuration: --prefix=/usr --extra-version='1~deb9u1'
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enab
le-gpl --disable-stripping --enable-avresample --enable-avisynth
--enable-gnutls --enable-ladspa --enable-libass --enable-libbluray
--enable-libbs2b --enable-l
ibcaca --enable-libcdio --enable-libebur128 --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm -
-enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt
--enable-libopus --enable-libpulse --enable-librubberband
--enable-libshine --enable-libsnappy --en
able-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp -
-enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi
--enable-omx --enable-openal --enable-opengl --enable-sdl2
--enable-libdc1394 --enable-libiec
61883 --enable-chromaprint --enable-frei0r --enable-libopencv
--enable-libx264 --enable-shared

  libavutil  55. 34.101 / 55. 34.101


  libavcodec 57. 64.101 / 57. 64.101


  libavformat57. 56.101 / 57. 56.101


  libavdevice57.  1.100 / 57.  1.100


  libavfilter 6. 65.100 /  6. 65.100


  libavresample   3.  1.  0 /  3.  1.  0

   libswscale  4.  2.100 /  4.  2.100

libswresample   2.  3.100 /  2.  3.100

 libpostproc54.  1.100 / 54.
 1.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5635dbf2c080] Auto-inserting
h264_mp4toannexb bitstream filter
Input #0, concat, from 'concat.121.def':

   Duration: N/A, start:
0.00, bitrate: 1455 kb/s

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080, 1455 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc

Metadata:


  handler_name: VideoHandler


[libx264 @ 0x5635dbf30100] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2

[libx264 @ 0x5635dbf30100] profile High, level 4.0


[libx264 @ 0x5635dbf30100] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4
AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html -
options: cabac=1 re
f=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_pski
p=1 chroma_qp_offset=-2 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=25 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 '/var/www/html/webroot/video/121.merged.out.mp4':

  Metadata:
encoder : Lavf57.56.101


Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 1920x1080, q=-1--1, 25 fps, 12800 tbn, 25 tbc

Metadata:


  handler_name: VideoHandler


  encoder : Lavc57.64.101 libx264


Side data:


  cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1


Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

 Press [q] to stop, [?] for help


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5635dc783ba0] Auto-inserting
h264_mp4toannexb bitstream filter7x

frame= 2873 fps= 43 q=-1.0 Lsize=8251kB time=00:01:54.80 bitrate=
588.8kbits/s dup=1508 drop=0 speed= 1.7x

video:8217kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.412306%

[libx264 @ 0x5635dbf30100] frame I:12Avg QP:13.70  size:110270


[libx264 @ 0x5635dbf30100] frame P:900   Avg QP:17.60  size:  6470


[libx264 @ 0x5635dbf30100] frame B:1961  Avg QP:23.12  size:   646


[libx264 @ 0x5635dbf30100] consecutive B-frames:  3.9% 14.3%  2.8% 78.9%


[libx264 @ 0x5635dbf30100] mb I  I16..4: 33.3% 36.1% 30.6%


[libx264 @ 0x5635dbf30100] mb P  I16..4:  1.9%  2.3%  0.5%  P16..4:
7.0%  1.7%  0.8%  0.0%  0.0%skip:85.8%

[libx264 @ 0x5635dbf30100] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8:
3.5%  0.2%  

Re: [FFmpeg-user] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 03:55:35PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > On Fri, Sep 08, 2017 at 03:13:46PM +0200, Paul B Mahol wrote:
> >> On 9/8/17, Mike Brown  wrote:
> >> > Are you saying that it takes a version newer than what I am using in
> >> > order
> >> > to decode Dolby-E to ac3?
> >>
> >> Yes.
> >
> > Well, I have the latest available from the website installed on the Win7
> > box and the test file copied over as well.
> >
> >> > I have a Win7 box that I recently brought up and can do some testing
> >> > with
> >> > a later version of ffmpeg.  In this case, what do I need to do for this
> >> > override you are talking about?
> >>
> >> Override is doable only with wav files i think.
> >> TS files are not possible, last time I tried.
> >
> > That is where the -map is used to only deal with the PCM audio stream, but:
> 
> You need to override input decoder so S302 is not used.

Any update on how I override the s302 decoder?

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
___
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] Concatenate diffetents video size in one output.mp4

2017-09-08 Thread Marcelo Laia
On 08/09/17 at 08:49, Paul B Mahol wrote:
> On 9/8/17, Marcelo Laia  wrote:
> 
> This one should work from quick look.

marcelo@marcelo:~/Vídeos/Ceverja$ ffmpeg -i Parte_A1.mp4 -i Parte_B1.mp4
-filter_complex
"[0:v]scale=640:352:force_original_aspect_ratio=decrease,pad=640:352:(ow-iw)/2:(oh-ih)/2[v0];
[v0][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264
-c:a aac -movflags +faststart output.mp4
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (Debian 7.1.0-13)
(split)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Parte_A1.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
  Duration: 00:00:10.03, start: 0.165985, bitrate: 9538 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661),
yuv420p, 352x640 [SAR 1:1 DAR 11:20], 9412 kb/s, 23.95 fps, 23.95 tbr, 23954
tbn, 47.91 tbc (default)
Metadata:
  handler_name: VideoHandler
Stream #0:1(unk): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
Metadata:
  handler_name: SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Parte_B1.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
  Duration: 00:00:24.01, start: 0.165985, bitrate: 8940 kb/s
Stream #1:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661),
yuv420p, 640x352 [SAR 1:1 DAR 20:11], 8808 kb/s, 23.95 fps, 23.95 tbr, 23954
tbn, 47.91 tbc (default)
Metadata:
  handler_name: VideoHandler
Stream #1:1(unk): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 127 kb/s (default)
Metadata:
  handler_name: SoundHandler
File 'output.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 (h264) -> scale
  Stream #0:1 (aac) -> concat:in0:a0
  Stream #1:0 (h264) -> concat:in1:v0
  Stream #1:1 (aac) -> concat:in1:a0
  concat:out:v0 -> Stream #0:0 (libx264)
  concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
[Parsed_concat_2 @ 0x55e37b087000] Input link in1:v0 parameters (size 640x352,
SAR 1:1) do not match the corresponding output link in0:v0 parameters (640x352,
SAR 484:485)
[Parsed_concat_2 @ 0x55e37b087000] Failed to configure output pad on
Parsed_concat_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!
marcelo@marcelo:~/Vídeos/Ceverja$ 

No output.mp4 is rendered.

> 
> What you get instead?
>
marcelo@marcelo:~/Vídeos/Ceverja$ MP4Box -cat Parte_A1.mp4 -cat Parte_B1.mp4
-new output.mp4
Appending file Parte_A1.mp4
No suitable destination track found - creating new one (type vide)
No suitable destination track found - creating new one (type soun)
Appending file Parte_B1.mp4  
Saving output.mp4: 0.500 secs Interleaving   
marcelo@marcelo:~/Vídeos/Ceverja$ 

The output.mp4 is created, but the Parte_A1.mp4 is a statitc image. Only
Parte_B1.mp4 is a video (stream).


-- 
Marcelo
___
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] Concatenate diffetents video size in one output.mp4

2017-09-08 Thread Paul B Mahol
On 9/8/17, Marcelo Laia  wrote:
> Hi,
>
> I would like to concatenate two videos files.
>
> 1. 352 x 640
> 2. 640 x 352
>
> All others parameters are the same.
>
> I doing a lot of search on google and I tried:
>
> ffmpeg -i VID-20170820-WA0233_edit_A_B.mp4 -i VID-20170820-WA0233_edit_B.mp4
> -filter_complex
> "[0:v]scale=640:352:force_original_aspect_ratio=decrease,pad=640:352:(ow-iw)/2:(oh-ih)/2[v0];
> [v0][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v
> libx264
> -c:a aac -movflags +faststart output.mp4

This one should work from quick look.

>
> ffmpeg -i VID-20170820-WA0233_edit_A_B.mp4 -i VID-20170820-WA0233_edit_B.mp4
> -filter_complex
> '[0:v]pad=iw:ih*2:0:0[intv];[intv][1:v]overlay=(W-w)/2:H/2[vid]' -map [vid]
> -c:v libx264 -crf 22 -preset veryfast output.mp4

This is not concatination.

>
> MP4Box -cat video_640.mp4 -cat VID-20170820-WA0233_edit_B.mp4 -new
> output.mp4
>
> But, I don't got a joined videos.

What you get instead?

>
> Please, is it a way to join (concatenate) these two videos? The history: My
> daughter started a recording with her cellphone in a vertical and after 30
> seconds she rotate de cell to horizontally. So, the video start in vertical
> end
> rotate to horizontal. I split it with avidemux and got they in horizontal
> way
> (I rotate on with avidemux). Both, ffmpeg and avidemux not doing the job
> (concatenate).
>
> Thank you
>
> --
> Marcelo
> ___
> 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 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] Concatenate diffetents video size in one output.mp4

2017-09-08 Thread Marcelo Laia
Hi,

I would like to concatenate two videos files.

1. 352 x 640
2. 640 x 352

All others parameters are the same.

I doing a lot of search on google and I tried:

ffmpeg -i VID-20170820-WA0233_edit_A_B.mp4 -i VID-20170820-WA0233_edit_B.mp4
-filter_complex
"[0:v]scale=640:352:force_original_aspect_ratio=decrease,pad=640:352:(ow-iw)/2:(oh-ih)/2[v0];
[v0][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264
-c:a aac -movflags +faststart output.mp4

ffmpeg -i VID-20170820-WA0233_edit_A_B.mp4 -i VID-20170820-WA0233_edit_B.mp4
-filter_complex
'[0:v]pad=iw:ih*2:0:0[intv];[intv][1:v]overlay=(W-w)/2:H/2[vid]' -map [vid]
-c:v libx264 -crf 22 -preset veryfast output.mp4

MP4Box -cat video_640.mp4 -cat VID-20170820-WA0233_edit_B.mp4 -new output.mp4

But, I don't got a joined videos.

Please, is it a way to join (concatenate) these two videos? The history: My
daughter started a recording with her cellphone in a vertical and after 30
seconds she rotate de cell to horizontally. So, the video start in vertical end
rotate to horizontal. I split it with avidemux and got they in horizontal way
(I rotate on with avidemux). Both, ffmpeg and avidemux not doing the job
(concatenate).

Thank you

-- 
Marcelo
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 03:55:35PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > On Fri, Sep 08, 2017 at 03:13:46PM +0200, Paul B Mahol wrote:
> >> On 9/8/17, Mike Brown  wrote:
> >> > Are you saying that it takes a version newer than what I am using in
> >> > order
> >> > to decode Dolby-E to ac3?
> >>
> >> Yes.
> >
> > Well, I have the latest available from the website installed on the Win7
> > box and the test file copied over as well.
> >
> >> > I have a Win7 box that I recently brought up and can do some testing
> >> > with
> >> > a later version of ffmpeg.  In this case, what do I need to do for this
> >> > override you are talking about?
> >>
> >> Override is doable only with wav files i think.
> >> TS files are not possible, last time I tried.
> >
> > That is where the -map is used to only deal with the PCM audio stream, but:
> 
> You need to override input decoder so S302 is not used.

And how do I do that with an audio copy?  I've never done that before.

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
___
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] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 03:13:46PM +0200, Paul B Mahol wrote:
>> On 9/8/17, Mike Brown  wrote:
>> > Are you saying that it takes a version newer than what I am using in
>> > order
>> > to decode Dolby-E to ac3?
>>
>> Yes.
>
> Well, I have the latest available from the website installed on the Win7
> box and the test file copied over as well.
>
>> > I have a Win7 box that I recently brought up and can do some testing
>> > with
>> > a later version of ffmpeg.  In this case, what do I need to do for this
>> > override you are talking about?
>>
>> Override is doable only with wav files i think.
>> TS files are not possible, last time I tried.
>
> That is where the -map is used to only deal with the PCM audio stream, but:

You need to override input decoder so S302 is not used.
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 03:13:46PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > Are you saying that it takes a version newer than what I am using in order
> > to decode Dolby-E to ac3?
> 
> Yes.

Well, I have the latest available from the website installed on the Win7
box and the test file copied over as well.

> > I have a Win7 box that I recently brought up and can do some testing with
> > a later version of ffmpeg.  In this case, what do I need to do for this
> > override you are talking about?
> 
> Override is doable only with wav files i think.
> TS files are not possible, last time I tried.

That is where the -map is used to only deal with the PCM audio stream, but:

ffmpeg -i input_test.ts -map 0:1 -c:a copy -f u8 output_test.u8
ffmpeg version N-87196-g6cadbb1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid 
--enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc 
--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-libopenh264 
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame 
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx 
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 
--enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil  55. 74.100 / 55. 74.100
  libavcodec 57.105.100 / 57.105.100
  libavformat57. 81.100 / 57. 81.100
  libavdevice57.  8.100 / 57.  8.100
  libavfilter 6.101.100 /  6.101.100
  libswscale  4.  7.103 /  4.  7.103
  libswresample   2.  8.100 /  2.  8.100
  libpostproc54.  6.100 / 54.  6.100
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
Last message repeated 1 times
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
[mpeg2video @ 0051c4e0] Invalid frame dimensions 0x0.
[s302m @ 0051d420] S302 non PCM mode with data type 28 not supported
Last message repeated 18 times
[mpegts @ 0051a9c0] decoding for stream 1 failed
[mpegts @ 0051a9c0] PES packet size mismatch
Last message repeated 2 times
[mpegts @ 0051a9c0] Could not find codec parameters for stream 1 
(Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s): 
unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'input_test.ts':
  Duration: 00:00:19.19, start: 94349.992444, bitrate: 43715 kb/s
  Program 1
Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), 
yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 
40266 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x33](eng): Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 
bit), 2304 kb/s
Stream #0:2[0x34](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 256 kb/s
Stream #0:3[0x35](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 256 kb/s
Stream #0:4[0x3b]: Data: bin_data (LU-A / 0x412D554C)
[u8 @ 02330f80] sample rate not set
Could not write header for output file #0 (incorrect codec parameters ?): 
Invalid argument
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Last message repeated 1 times


I also tried to run the command that I normally use to extract the wav file
from the PCM stream and I got the above errors.  The newest ffmpeg has been
broken.  I remember this issue.  I think I found a newer 

Re: [FFmpeg-user] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 02:30:08PM +0200, Paul B Mahol wrote:
>> On 9/8/17, Mike Brown  wrote:
>> > On Fri, Sep 08, 2017 at 01:39:34PM +0200, Paul B Mahol wrote:
>> >> On 9/8/17, Mike Brown  wrote:
>> >
>> > [trimmed]
>> >
>> >> > Why doesn't it matter?
>> >> >
>> >> > ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav
>> >>
>> >> You need -c:a copy here, but you may also need to override input codec.
>> >
>> > The initial example wanted a wave file.  The audio stream that is in the
>> > TS file is not wave, it is SMPTE-302M.  The above extracts the wave
>> > stream
>> > out of the TS file's PCM stream.  Obviously I am missing something as to
>> > what is going on.
>> >
>> > So, I am completely confused as to how the raw stream data can be
>> > extracted,
>> > or overridden.
>> >
>> >> > ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg
>> >> > developers
>> >>
>> >> 2013 ? Today year is 2017, Welcome to future.
>> >
>> > That is because newer versions of ffmpeg no longer work with XP.  They
>> > crash
>> > trying to use an operation in a DLL that does not exist.  I have
>> > operational
>> > reasons that require XP.
>>
>> Than no help for you here.
>
> Are you saying that it takes a version newer than what I am using in order
> to decode Dolby-E to ac3?

Yes.

>
> I have a Win7 box that I recently brought up and can do some testing with
> a later version of ffmpeg.  In this case, what do I need to do for this
> override you are talking about?

Override is doable only with wav files i think.
TS files are not possible, last time I tried.
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 02:30:08PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > On Fri, Sep 08, 2017 at 01:39:34PM +0200, Paul B Mahol wrote:
> >> On 9/8/17, Mike Brown  wrote:
> >
> > [trimmed]
> >
> >> > Why doesn't it matter?
> >> >
> >> > ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav
> >>
> >> You need -c:a copy here, but you may also need to override input codec.
> >
> > The initial example wanted a wave file.  The audio stream that is in the
> > TS file is not wave, it is SMPTE-302M.  The above extracts the wave stream
> > out of the TS file's PCM stream.  Obviously I am missing something as to
> > what is going on.
> >
> > So, I am completely confused as to how the raw stream data can be extracted,
> > or overridden.
> >
> >> > ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg
> >> > developers
> >>
> >> 2013 ? Today year is 2017, Welcome to future.
> >
> > That is because newer versions of ffmpeg no longer work with XP.  They crash
> > trying to use an operation in a DLL that does not exist.  I have operational
> > reasons that require XP.
> 
> Than no help for you here.

Are you saying that it takes a version newer than what I am using in order
to decode Dolby-E to ac3?

I have a Win7 box that I recently brought up and can do some testing with
a later version of ffmpeg.  In this case, what do I need to do for this
override you are talking about?

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
___
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] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 01:39:34PM +0200, Paul B Mahol wrote:
>> On 9/8/17, Mike Brown  wrote:
>
> [trimmed]
>
>> > Why doesn't it matter?
>> >
>> > ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav
>>
>> You need -c:a copy here, but you may also need to override input codec.
>
> The initial example wanted a wave file.  The audio stream that is in the
> TS file is not wave, it is SMPTE-302M.  The above extracts the wave stream
> out of the TS file's PCM stream.  Obviously I am missing something as to
> what is going on.
>
> So, I am completely confused as to how the raw stream data can be extracted,
> or overridden.
>
>> > ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg
>> > developers
>>
>> 2013 ? Today year is 2017, Welcome to future.
>
> That is because newer versions of ffmpeg no longer work with XP.  They crash
> trying to use an operation in a DLL that does not exist.  I have operational
> reasons that require XP.

Than no help for you here.
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 01:39:34PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:

[trimmed]

> > Why doesn't it matter?
> >
> > ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav
> 
> You need -c:a copy here, but you may also need to override input codec.

The initial example wanted a wave file.  The audio stream that is in the
TS file is not wave, it is SMPTE-302M.  The above extracts the wave stream
out of the TS file's PCM stream.  Obviously I am missing something as to
what is going on.

So, I am completely confused as to how the raw stream data can be extracted,
or overridden.

> > ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg
> > developers
> 
> 2013 ? Today year is 2017, Welcome to future.

That is because newer versions of ffmpeg no longer work with XP.  They crash
trying to use an operation in a DLL that does not exist.  I have operational
reasons that require XP.

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Gyan
On Fri, Sep 8, 2017 at 3:40 PM, Nicolas George  wrote:


> No, it does not work that way without copyts: without copyts, the
> timestamps always start at 0.
>

There are two issues: a) how to interpret input frame seek point, and b)
what happens to timestamps of selected frames.

Illustration
---

Generate source

ffmpeg -f lavfi -i testsrc2 -t 2 -output_ts_offset 1 src.mp4

As per ffprobe, this gives a file with

Duration: 00:00:02.00, start: 1.00, bitrate: 277 kb/s


Running

ffmpeg -seek_timestamp 1 -ss 2 -i src.mp4 ss-seekts2.mp4

produces, as per ffprobe,

  Duration: 00:00:01.00, start: 0.00, bitrate: 276 kb/s

The frames in output were taken from TS 2 to 3 of src.mp4, testsrc2 frame
counter in first frame says '25'. TS in output is reset to 0 start. As
expected.


Running

ffmpeg -seek_timestamp 1 -copyts -ss 2 -i src.mp4
copyts-seekts-ss2.mp4

produces an empty file. It's the same command as above, but with copyts
added.


Running

ffmpeg -seek_timestamp 1 -copyts -ss 1 -i src.mp4
copyts-seekts-ss1.mp4

produces a file, reported as,

  Duration: 00:00:01.00, start: 2.00, bitrate: 276 kb/s

whose video contents correspond to TS 2 to 3 of src.mp4, (frame counter
25).  'ss' acts as relative offset, and is apparently immune to
seek_timestamp. Source timestamps are copied over to output.
___
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] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 01:15:06PM +0200, Paul B Mahol wrote:
>> On 9/8/17, Mike Brown  wrote:
>> > On Fri, Sep 08, 2017 at 09:34:50AM +0200, Paul B Mahol wrote:
>> >> On 9/8/17, Mike Brown  wrote:
>> >> > On Fri, Sep 08, 2017 at 12:54:12AM +0200, Carl Eugen Hoyos wrote:
>> >> >> (Sorry, my knowledge of SMPTE 337M is limited but I know that so
>> >> >> far,
>> >> >> this is the only "format" for which FFmpeg supports Dolby-E, and
>> >> >> that
>> >> >> adding support for other formats will be possible but hasn't been
>> >> >> done yet.)
>> >> >
>> >> > From what I understand, reading the synopsis of SMPTE-337M, is that
>> >> > it
>> >> > is
>> >> > not a container specifically for Dolby-E.  I couldn't anything out of
>> >> > it
>> >> > to
>> >> > indicate that it can even handle Dolby-E.
>> >> >
>> >> > That said, I do deal with SMPTE-302M, which is the spec for which
>> >> > Dolby-E is
>> >> > applied to Transport Streams.  In my case satellite feeds (not for
>> >> > the
>> >> > consumer).  The spec talks about MPEG-2 TS streams, but it applies to
>> >> > H.264
>> >> > streams as well.
>> >> >
>> >> > Right now, I use ffmpeg to extract the stream into a 2-ch WAVE file,
>> >> > in
>> >> > which
>> >> > I use in another program to extract the audio into 6 mono WAVE files.
>> >> >  I
>> >> > then
>> >> > use ffmpeg to encode a AC3 file.
>> >> >
>> >> > Are you saying that I can use ffmpeg and get to a final ac3 file in a
>> >> > single
>> >> > step?
>> >>
>> >> No, you would need to copy audio to raw container, this raw container
>> >> would be
>> >> then detected as Dolby-E.
>> >>
>> >> ffmpeg -i input.wav -c:a copy -f u8 out.u8
>> >>
>> >> ffmpeg -i out.u8 -c:a ac3 .
>> >
>> > Could this not be done as a series of pipes:
>> >
>> > ffmpeg -i input.ts -map 0:2 -c:a pcm_s24le -f wav - | \
>> > ffmpeg -i - -c:a copy -f u24le - | \
>> > ffmpeg -drc_scale 0 -i - -c:a ac3 -ab 640k -center_mixlev 0.707
>> > output.ac3
>> >
>> > Will the 5.1 audio be mapped correctly?
>> >
>> > The Dolby-E is 24bit, not 8.
>>
>> Doesn't matter, your example will not work, try it.
>
> Why doesn't it matter?
>
> ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav

You need -c:a copy here, but you may also need to override input codec.

> ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg
> developers

2013 ? Today year is 2017, Welcome to future.

>   built on May  7 2013 01:09:00 with gcc 4.7.3 (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-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
> --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-libvo-aacenc
> --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264
> --enable-libxavs --enable-libxvid --enable-zlib
>   libavutil  52. 29.100 / 52. 29.100
>   libavcodec 55.  7.100 / 55.  7.100
>   libavformat55.  4.101 / 55.  4.101
>   libavdevice55.  0.100 / 55.  0.100
>   libavfilter 3. 63.101 /  3. 63.101
>   libswscale  2.  2.100 /  2.  2.100
>   libswresample   0. 17.102 /  0. 17.102
>   libpostproc52.  3.100 / 52.  3.100
> [mpegts @ 027f7b00] probed stream 4 failed
> [mpeg2video @ 027f8600] Invalid frame dimensions 0x0.
> Last message repeated 8 times
> [mpegts @ 027f7b00] Could not find codec parameters for stream 4 (Unknown:
> none (LU-A / 0x412D554C)): unknown codec
> Consider increasing the value for the 'analyzeduration' and 'probesize'
> options
> [mpegts @ 027f7b00] PES packet size mismatch
> Last message repeated 2 times
> Input #0, mpegts, from 'input_test.ts':
>   Duration: 00:00:19.16, start: 94349.992444, bitrate: 43792 kb/s
>   Program 1
> Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
> yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94
> tbc
> Stream #0:1[0x33](eng): Audio: s302m (BSSD / 0x44535342), 48000 Hz,
> stereo, s32, 2304 kb/s
> Stream #0:2[0x34](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo, s16p, 256 kb/s
> Stream #0:3[0x35](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
> stereo, s16p, 256 kb/s
> Stream #0:4[0x3b]: Unknown: none (LU-A / 0x412D554C)
> Output #0, wav, to 'output_test.wav':
>   Metadata:
> ISFT: Lavf55.4.101
> Stream #0:0(eng): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz,
> stereo, s32, 2304 kb/s
> Stream mapping:
>   Stream #0:1 -> #0:0 (s302m -> pcm_s24le)
> Press [q] to stop, [?] for help
> [mpegts @ 027f7b00] PES packet size mismatch
> [s302m @ 027f42e0] 

Re: [FFmpeg-user] Dolby E decoder

2017-09-08 Thread Cley Faye
>
>
> > >> ffmpeg -i input.wav -c:a copy -f u8 out.u8
>


> > > ffmpeg -i - -c:a copy -f u24le - | \
>


> > > The Dolby-E is 24bit, not 8.
> >
> > Doesn't matter, your example will not work, try it.
>
> Why doesn't it matter?
>
>
​When you copy a stream as-is, copying each byte individually or grouping
them by 3 doesn't matter. The "copy"​ codec simply pass the bytes making up
the stream without interpretation. Since all streams are made of bytes (at
least when put in a file), -c copy -f u8 will always work, whatever the
actual stream might be.

​This is just about the copy codec; why the remainder fail I have no idea.​
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 01:15:06PM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > On Fri, Sep 08, 2017 at 09:34:50AM +0200, Paul B Mahol wrote:
> >> On 9/8/17, Mike Brown  wrote:
> >> > On Fri, Sep 08, 2017 at 12:54:12AM +0200, Carl Eugen Hoyos wrote:
> >> >> (Sorry, my knowledge of SMPTE 337M is limited but I know that so far,
> >> >> this is the only "format" for which FFmpeg supports Dolby-E, and that
> >> >> adding support for other formats will be possible but hasn't been
> >> >> done yet.)
> >> >
> >> > From what I understand, reading the synopsis of SMPTE-337M, is that it
> >> > is
> >> > not a container specifically for Dolby-E.  I couldn't anything out of it
> >> > to
> >> > indicate that it can even handle Dolby-E.
> >> >
> >> > That said, I do deal with SMPTE-302M, which is the spec for which
> >> > Dolby-E is
> >> > applied to Transport Streams.  In my case satellite feeds (not for the
> >> > consumer).  The spec talks about MPEG-2 TS streams, but it applies to
> >> > H.264
> >> > streams as well.
> >> >
> >> > Right now, I use ffmpeg to extract the stream into a 2-ch WAVE file, in
> >> > which
> >> > I use in another program to extract the audio into 6 mono WAVE files.  I
> >> > then
> >> > use ffmpeg to encode a AC3 file.
> >> >
> >> > Are you saying that I can use ffmpeg and get to a final ac3 file in a
> >> > single
> >> > step?
> >>
> >> No, you would need to copy audio to raw container, this raw container
> >> would be
> >> then detected as Dolby-E.
> >>
> >> ffmpeg -i input.wav -c:a copy -f u8 out.u8
> >>
> >> ffmpeg -i out.u8 -c:a ac3 .
> >
> > Could this not be done as a series of pipes:
> >
> > ffmpeg -i input.ts -map 0:2 -c:a pcm_s24le -f wav - | \
> > ffmpeg -i - -c:a copy -f u24le - | \
> > ffmpeg -drc_scale 0 -i - -c:a ac3 -ab 640k -center_mixlev 0.707 output.ac3
> >
> > Will the 5.1 audio be mapped correctly?
> >
> > The Dolby-E is 24bit, not 8.
> 
> Doesn't matter, your example will not work, try it.

Why doesn't it matter?

ffmpeg -i input_test.ts -map 0:1 -c:a pcm_s24le output_test.wav
ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg developers
  built on May  7 2013 01:09:00 with gcc 4.7.3 (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-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc 
--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-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis 
--enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil  52. 29.100 / 52. 29.100
  libavcodec 55.  7.100 / 55.  7.100
  libavformat55.  4.101 / 55.  4.101
  libavdevice55.  0.100 / 55.  0.100
  libavfilter 3. 63.101 /  3. 63.101
  libswscale  2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc52.  3.100 / 52.  3.100
[mpegts @ 027f7b00] probed stream 4 failed
[mpeg2video @ 027f8600] Invalid frame dimensions 0x0.
Last message repeated 8 times
[mpegts @ 027f7b00] Could not find codec parameters for stream 4 (Unknown: none 
(LU-A / 0x412D554C)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 027f7b00] PES packet size mismatch
Last message repeated 2 times
Input #0, mpegts, from 'input_test.ts':
  Duration: 00:00:19.16, start: 94349.992444, bitrate: 43792 kb/s
  Program 1 
Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), 
yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x33](eng): Audio: s302m (BSSD / 0x44535342), 48000 Hz, stereo, 
s32, 2304 kb/s
Stream #0:2[0x34](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 256 kb/s
Stream #0:3[0x35](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 256 kb/s
Stream #0:4[0x3b]: Unknown: none (LU-A / 0x412D554C)
Output #0, wav, to 'output_test.wav':
  Metadata:
ISFT: Lavf55.4.101
Stream #0:0(eng): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 
stereo, s32, 2304 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (s302m -> pcm_s24le)
Press [q] to stop, [?] for help
[mpegts @ 027f7b00] PES packet size mismatch
[s302m @ 027f42e0] frame has invalid header
Error while decoding stream #0:1: Invalid data found when processing input
size=5330kB time=00:00:18.95 bitrate=2304.0kbits/s
video:0kB audio:5330kB subtitle:0 global headers:0kB muxing overhead 0.001869%


ffmpeg -i output_test.wav -c:a copy -f u24le output_test.u24
ffmpeg version N-52837-g399f6ef Copyright (c) 2000-2013 the FFmpeg developers
  built on 

Re: [FFmpeg-user] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 09:34:50AM +0200, Paul B Mahol wrote:
>> On 9/8/17, Mike Brown  wrote:
>> > On Fri, Sep 08, 2017 at 12:54:12AM +0200, Carl Eugen Hoyos wrote:
>> >> (Sorry, my knowledge of SMPTE 337M is limited but I know that so far,
>> >> this is the only "format" for which FFmpeg supports Dolby-E, and that
>> >> adding support for other formats will be possible but hasn't been
>> >> done yet.)
>> >
>> > From what I understand, reading the synopsis of SMPTE-337M, is that it
>> > is
>> > not a container specifically for Dolby-E.  I couldn't anything out of it
>> > to
>> > indicate that it can even handle Dolby-E.
>> >
>> > That said, I do deal with SMPTE-302M, which is the spec for which
>> > Dolby-E is
>> > applied to Transport Streams.  In my case satellite feeds (not for the
>> > consumer).  The spec talks about MPEG-2 TS streams, but it applies to
>> > H.264
>> > streams as well.
>> >
>> > Right now, I use ffmpeg to extract the stream into a 2-ch WAVE file, in
>> > which
>> > I use in another program to extract the audio into 6 mono WAVE files.  I
>> > then
>> > use ffmpeg to encode a AC3 file.
>> >
>> > Are you saying that I can use ffmpeg and get to a final ac3 file in a
>> > single
>> > step?
>>
>> No, you would need to copy audio to raw container, this raw container
>> would be
>> then detected as Dolby-E.
>>
>> ffmpeg -i input.wav -c:a copy -f u8 out.u8
>>
>> ffmpeg -i out.u8 -c:a ac3 .
>
> Could this not be done as a series of pipes:
>
> ffmpeg -i input.ts -map 0:2 -c:a pcm_s24le -f wav - | \
> ffmpeg -i - -c:a copy -f u24le - | \
> ffmpeg -drc_scale 0 -i - -c:a ac3 -ab 640k -center_mixlev 0.707 output.ac3
>
> Will the 5.1 audio be mapped correctly?
>
> The Dolby-E is 24bit, not 8.

Doesn't matter, your example will not work, try it.
___
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] Dolby E decoder

2017-09-08 Thread Mike Brown
On Fri, Sep 08, 2017 at 09:34:50AM +0200, Paul B Mahol wrote:
> On 9/8/17, Mike Brown  wrote:
> > On Fri, Sep 08, 2017 at 12:54:12AM +0200, Carl Eugen Hoyos wrote:
> >> (Sorry, my knowledge of SMPTE 337M is limited but I know that so far,
> >> this is the only "format" for which FFmpeg supports Dolby-E, and that
> >> adding support for other formats will be possible but hasn't been
> >> done yet.)
> >
> > From what I understand, reading the synopsis of SMPTE-337M, is that it is
> > not a container specifically for Dolby-E.  I couldn't anything out of it to
> > indicate that it can even handle Dolby-E.
> >
> > That said, I do deal with SMPTE-302M, which is the spec for which Dolby-E is
> > applied to Transport Streams.  In my case satellite feeds (not for the
> > consumer).  The spec talks about MPEG-2 TS streams, but it applies to H.264
> > streams as well.
> >
> > Right now, I use ffmpeg to extract the stream into a 2-ch WAVE file, in
> > which
> > I use in another program to extract the audio into 6 mono WAVE files.  I
> > then
> > use ffmpeg to encode a AC3 file.
> >
> > Are you saying that I can use ffmpeg and get to a final ac3 file in a single
> > step?
> 
> No, you would need to copy audio to raw container, this raw container would be
> then detected as Dolby-E.
> 
> ffmpeg -i input.wav -c:a copy -f u8 out.u8
> 
> ffmpeg -i out.u8 -c:a ac3 .

Could this not be done as a series of pipes:

ffmpeg -i input.ts -map 0:2 -c:a pcm_s24le -f wav - | \
ffmpeg -i - -c:a copy -f u24le - | \
ffmpeg -drc_scale 0 -i - -c:a ac3 -ab 640k -center_mixlev 0.707 output.ac3

Will the 5.1 audio be mapped correctly?

The Dolby-E is 24bit, not 8.

MB
-- 
e-mail: vid...@vidiot.com | vid...@vidiot.net/~\ The ASCII
6082066...@email.uscc.net (140 char limit)   \ / Ribbon Campaign
Visit - URL: http://vidiot.com/   X  Against
 http://vidiot.net/  / \ HTML Email
"You're Sherlock Holmes, wear the damn hat!" - Watson to Sherlock
Sherlock - The Abominable Bride - 1/01/16
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nicolas George
Le duodi 22 fructidor, an CCXXV, Gyan a écrit :
> Except with seek_timestamp set to 1, the first packet you 'expect' to get
> is pts_time 60.

The purpose of my message was to EXPLAIN what happens, not to provide an
ad-hoc solution to the showcase.

> And it does work that way if copyts is *absent*.

No, it does not work that way without copyts: without copyts, the
timestamps always start at 0.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Gyan
On Fri, Sep 8, 2017 at 2:53 PM, Nicolas George  wrote:


> After further testing, it seems the -ss option is itself relative to the
> file's start time: by setting -ss 60 with a file that starts at 60, you
> are asking to seek to timestamp 120. And with -copyts, you get that
> timestamp.
>

Except with seek_timestamp set to 1, the first packet you 'expect' to get
is pts_time 60. And it does work that way if copyts is *absent*.
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nicolas George
Le duodi 22 fructidor, an CCXXV, Nitish Prabhu a écrit :
> I am using "-copyts" to maintain the input timestamps at the output
> side. Thus, I believed that using "-ss 60 -t 10" with "-copyts" was
> supposed to mean "take seconds 60-70 of input_clip_x264_offset as
> input and produce 60-70 of the resultant stream".

My bad, I missed that and the explanation was not correct.

After further testing, it seems the -ss option is itself relative to the
file's start time: by setting -ss 60 with a file that starts at 60, you
are asking to seek to timestamp 120. And with -copyts, you get that
timestamp.

Therefore, the problem is that [120;130[ \cup [60;70[ = \emptyset, not
[0;10[ as I said before.

I could ascertain that by using the showinfo filter: it prints:

[Parsed_showinfo_0 @ 0x55c72f26e880] n:   0 pts:2304000 pts_time:120

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Gyan
Use

   ffmpeg  -i input_clip_x264_offset.mp4 -copyts -ss 60 -t 10 -filter:v
"select=between(t\,60.000\,70.000)" -c:v libx264 offset_extract.mp4

Looks like -seek_timestamp 1 gets inert when used in conjunction with
copyts.
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nitish Prabhu
On Fri, Sep 8, 2017 at 1:20 PM, Nicolas George  wrote:
>> I tried to seek to a particular time in the generated stream using the
>> following:
>> $ ffmpeg -ss 60 -t 10 -i input_clip_x264_offset.mp4 -copyts -filter:v
>
> "take seconds 60-70 of input_clip_x264_offset as input to produce
> seconds 0-10 of the resulting stream"
>

I am using "-copyts" to maintain the input timestamps at the output
side. Thus, I believed that using "-ss 60 -t 10" with "-copyts" was
supposed to mean "take seconds 60-70 of input_clip_x264_offset as
input and produce 60-70 of the resultant stream".

>> "select=between(t\,60.000\,70.000)"
>
> "only keep frames between seconds 60 and 70"
>
> Since [0;10[ \cup [60;70[ = \emptyset, the result you observe is
> expected.

If "-ss 60 -t 10" is able to produce output in the rage [60;70[ at the
output side, then the select filter will appropriately select only
those timestamps.

Please let me know if my understanding is right.
___
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] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Kieran O Leary  wrote:
> On 8 Sep 2017 08:35, "Paul B Mahol"  wrote:
>
> On 9/8/17, Mike Brown <
>
> No, you would need to copy audio to raw container, this raw container would
> be
> then detected as Dolby-E.
>
> ffmpeg -i input.wav -c:a copy -f u8 out.u8
>
>
> This looks like an 8-bit format,is there a reason why 16 or 24 bit aren't
> used in this example, or must u8 be used?

u8 just act as raw muxer, it just copy data from input to output, it
have nothing to do with bit depth.

One can not use s16 or s32 muxer because they require size of packet
multiplied by 2 or 4 which
may not be possible.
___
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] Dolby E decoder

2017-09-08 Thread Kieran O Leary
On 8 Sep 2017 08:35, "Paul B Mahol"  wrote:

On 9/8/17, Mike Brown <

No, you would need to copy audio to raw container, this raw container would
be
then detected as Dolby-E.

ffmpeg -i input.wav -c:a copy -f u8 out.u8


This looks like an 8-bit format,is there a reason why 16 or 24 bit aren't
used in this example, or must u8 be used?
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nicolas George
Le duodi 22 fructidor, an CCXXV, Nitish Prabhu a écrit :
> I tried to seek to a particular time in the generated stream using the
> following:
> $ ffmpeg -ss 60 -t 10 -i input_clip_x264_offset.mp4 -copyts -filter:v

"take seconds 60-70 of input_clip_x264_offset as input to produce
seconds 0-10 of the resulting stream"

> "select=between(t\,60.000\,70.000)"

"only keep frames between seconds 60 and 70"

Since [0;10[ \cup [60;70[ = \emptyset, the result you observe is
expected.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
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] Dolby E decoder

2017-09-08 Thread Paul B Mahol
On 9/8/17, Mike Brown  wrote:
> On Fri, Sep 08, 2017 at 12:54:12AM +0200, Carl Eugen Hoyos wrote:
>> (Sorry, my knowledge of SMPTE 337M is limited but I know that so far,
>> this is the only "format" for which FFmpeg supports Dolby-E, and that
>> adding support for other formats will be possible but hasn't been
>> done yet.)
>
> From what I understand, reading the synopsis of SMPTE-337M, is that it is
> not a container specifically for Dolby-E.  I couldn't anything out of it to
> indicate that it can even handle Dolby-E.
>
> That said, I do deal with SMPTE-302M, which is the spec for which Dolby-E is
> applied to Transport Streams.  In my case satellite feeds (not for the
> consumer).  The spec talks about MPEG-2 TS streams, but it applies to H.264
> streams as well.
>
> Right now, I use ffmpeg to extract the stream into a 2-ch WAVE file, in
> which
> I use in another program to extract the audio into 6 mono WAVE files.  I
> then
> use ffmpeg to encode a AC3 file.
>
> Are you saying that I can use ffmpeg and get to a final ac3 file in a single
> step?

No, you would need to copy audio to raw container, this raw container would be
then detected as Dolby-E.

ffmpeg -i input.wav -c:a copy -f u8 out.u8

ffmpeg -i out.u8 -c:a ac3 .
___
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] Understanding the behavior of "-ss/-t" option

2017-09-08 Thread Nitish Prabhu
On Fri, Sep 8, 2017 at 11:13 AM, Gyan  wrote:
> wrote:

> You'll want to use the seek_timestamp option.
>
> As it says in the docs,
>
> "-seek_timestamp (*input*)
>

I tried using "-seek_timestamp" prior to posting this, but was not
really sure if this works on MP4 files. I used ffprobe to get the
first pts of the offset stream and used this with "-ss" option.

Following is the output of ffprobe for the first frame of
"input_clip_x264_offset.mp4", the clip where offset was introduced:
[FRAME]
media_type=video
key_frame=1
pkt_pts=921923
pkt_pts_time=60.021029
pkt_dts=921923
pkt_dts_time=60.021029
best_effort_timestamp=921923
best_effort_timestamp_time=60.021029
pkt_duration=512
pkt_duration_time=0.03
pkt_pos=48
pkt_size=123379
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]

Following is the command that I used to seek with timestamp value:
$ ffmpeg -seek_timestamp 1 -ss 60.021029 -t 10 -i
input_clip_x264_offset.mp4 -copyts -filter:v
"select=between(t\,60.000\,70.000)" -c:v libx264 offset_extract.mp4

I do not see any change in the behavior with the above command. It
does not seek to the required timestamp.
___
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".