[FFmpeg-user] DVCPro50 MXF

2023-02-23 Thread adam smith via ffmpeg-user
Hi people, hope you are all good.

I am using ffmpeg 5.1.2

I am trying to make a DVCPro50 in a MXF wrapper but I am getting some odd 
results.
If I start by trying to make it a DV wrapper it’s still giving me some 
problems. 
For example, I choose -target pal-dv50 and it looks like it’s encoding at the 
desired bitrate of 50mbps.

ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.dv
frame= 1375 fps=151 q=-0.0 size=  385280kB time=00:00:55.16 
bitrate=57219.2kbits/s speed=6.07x   

But when I check the file using media info or ffprobe it shows as 25mbps.
Input #0, dv, from '/data/disposable/output.dv':
  Metadata:
timecode: 00:00:00:00
  Duration: 00:01:34.72, start: 0.00, bitrate: 57600 kb/s
  Stream #0:0: Video: dvvideo, yuv422p, 720x576 [SAR 64:45 DAR 16:9], 25000 
kb/s, 25 fps, 25 tbr, 25 tbn
  Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
  Stream #0:2: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

The filesize is significantly larger however than if I encoded using -target 
pal-dv (25mbps), so maybe its possible it is encoding at 50mbps?

The other metadata looks good..eg DVCPRO, TFF, aspect ratio, pixel aspect ratio.
@type": "Video",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"Duration": "189.440",
"BitRate_Mode": "CBR",
"BitRate": "24441600",
"Width": "720",
"Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.000",
"FrameCount": "4736",
"Standard": "PAL",
"ColorSpace": "YUV",
"BitDepth": "8",
"ScanType": "Interlaced",
"ScanOrder": "TFF",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Subcode time code",
"StreamSize": "578777088"

If however I try and use a mxf wrapper..

ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.mxf

The metadata has this additional extra tag in the general that complains about 
invalid extension dv dif. Plus in the video metadata it shows as BFF instead of 
TFF.
"@type": "General",
"VideoCount": "1",
"AudioCount": "2",
"FileExtension": "mxf",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"FileSize": "681984000",
"Duration": "189.440",
"OverallBitRate_Mode": "CBR",
"OverallBitRate": "2880",
"FrameRate": "25.000",
"FrameCount": "4736",
"StreamSize": "30461952",
"Recorded_Date": "1970-01-01 00:00:00.000",
"File_Modified_Date": "UTC 2023-02-23 23:57:36",
"File_Modified_Date_Local": "2023-02-23 23:57:36",
"extra": {
"FileExtension_Invalid": "dv dif"


@type": "Video",
"Format": "DV",
"Format_Commercial_IfAny": "DVCPRO",
"Duration": "189.440",
"BitRate_Mode": "CBR",
"BitRate": "24441600",
"Width": "720",
"Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate_Mode": "CFR",
"FrameRate": "25.000",
"FrameCount": "4736",
"Standard": "PAL",
"ColorSpace": "YUV",
"BitDepth": "8",
"ScanType": "Interlaced",
"ScanOrder": "BFF",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Subcode time code",
"StreamSize": “578777088"


If I add -f mxf to the command..
ffmpeg -I source.mxf -target pal-dv50 -aspect 16:9 output.mxf
The metadata shows it as MPEG Video..
@type": "General",
"VideoCount": "1",
"AudioCount": "1",
"OtherCount": "3",
"FileExtension": "mxf",
"Format": "MXF",
"Format_Version": "1.3",
"Format_Profile": "OP-1a",
"Format_Settings": "Closed / Complete",
"FileSize": "28652710",
"Duration": "94.720",
"OverallBitRate_Mode": "VBR",
"OverallBitRate": "2419992",
"FrameRate": "25.000",
"FrameCount": "2368",
"StreamSize": "8098470",
"FooterSize": "2214",
"Encoded_Date": "0-00-00 00:00:00.000",
"File_Modified_Date": "UTC 2023-02-24 00:01:25",
"File_Modified_Date_Local": "2023-02-24 00:01:25",
"Encoded_Application_CompanyName": "FFmpeg",
"Encoded_Application_Name": "OP1a Muxer",
"Encoded_Application_Version": "59.27.100.0.0",
"Encoded_Library_Name": "Lavf (linux)",
"Encoded_Library_Version": "59.27.100.0.0"
},
{
"@type": "Video",
"StreamOrder": "0",
"ID": "2",
"Format": "MPEG Video",
"Format_Version": "2",
"Format_Profile": "4:2:2",
"Format_Level": "Main",
"Format_Settings_BVOP": "No",
"Format_Settings_Matrix": "Default",
"Format_Settings_GOP": "N=12",
"Format_Settings_Wrapping": "Frame",
"CodecID": "0D01030102046001-0401020201020300",
"Duration": "94.720",
"BitRate_Mode": "VBR",
"BitRate": "20",
"Width": "720",
"Height": "576",
"Sampled_Width": "720",
"Sampled_Height": "576",
"PixelAspectRatio": "1.422",
"DisplayAspectRatio": "1.778",
"FrameRate": "25.000",
"FrameCount": "2368",
"Standard": "PAL",
"ColorSpace": "YUV",
"ChromaSubsampling": "4:2:2",
"BitDepth": "8",
"ScanType": "Progressive",
"Compression_Mode": "Lossy",
"Delay": "0.000",
"Delay_Original": "0.000",
"TimeCode_FirstFrame": "00:00:00:00",
"TimeCode_Source": "Group of pictures header",
"Gop_OpenClosed": "Open",
"Gop_OpenClosed_FirstFrame": "Closed",
"StreamSize": "2368000",
"BufferSize": "6144",
"colour_description_present": "Yes",

Re: [FFmpeg-user] Error initializing filter 'channelsplit' with args 'channel_layout=stereo:channels=FL|FR'

2023-01-04 Thread adam smith via ffmpeg-user



> On 4 Jan 2023, at 17:23, Paul B Mahol  wrote:
> 
> If itt worked previously it was by pure luck. 

Lucky me. Thanks, I appreciate your help.
___
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] Error initializing filter 'channelsplit' with args 'channel_layout=stereo:channels=FL|FR'

2023-01-04 Thread adam smith via ffmpeg-user


> On 4 Jan 2023, at 16:30, Paul B Mahol  wrote:
> 
> Correct syntax is FL+FR and not using '|’ 

Thanks very much Paul, I will give it a whirl. Do you know if I was just being 
lucky it worked at all previously or is this a change?






___
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] Error initializing filter 'channelsplit' with args 'channel_layout=stereo:channels=FL|FR'

2023-01-04 Thread adam smith via ffmpeg-user
Hi Everyone,

I have been running this command no problem using FFmpeg 5.0;  but after 
updating to 5.1.2 it is complaining about the arguments used in the channel 
split.
Error initializing filter 'channelsplit' with args 
'channel_layout=stereo:channels=FL|FR’


Command line
ffmpeg -i 
/data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mp4
 -filter_complex 
"[0:0]minterpolate=mi_mode=dup:fps=29.97[0frame_conversion];[0:1]channelsplit=channel_layout=stereo:channels=FL|FR[001_channelsplit][002_channelsplit];[001_channelsplit]asplit=8[001_asplit][003_asplit][005_asplit][007_asplit][009_asplit][011_asplit][013_asplit][015_asplit];[002_channelsplit]asplit=8[002_asplit][004_asplit][006_asplit][008_asplit][010_asplit][012_asplit][014_asplit][016_asplit]"
  -map "[0frame_conversion]" -map "[001_asplit]" -map "[002_asplit]" -map 
"[003_asplit]" -map "[004_asplit]" -map "[005_asplit]" -map "[006_asplit]" -map 
"[007_asplit]" -map "[008_asplit]" -map "[009_asplit]" -map "[010_asplit]" -map 
"[011_asplit]" -map "[012_asplit]" -map "[013_asplit]" -map "[014_asplit]" -map 
"[015_asplit]" -map "[016_asplit]" -c:v dnxhd -pix_fmt yuv422p -s 1920x1080 
-b:v 145M -flags +ildct+ilme -r 3/1001 -c:a pcm_s24le -ar 48000 -f tee 
"/data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mxf”

Output
ffmpeg version 5.1.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
  configuration: --prefix=/opt/ffmpeg --disable-debug --disable-doc 
--disable-ffplay --enable-shared --enable-libopencore-amrnb 
--enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig 
--enable-libfreetype --enable-libfontconfig --enable-libfribidi 
--enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb 
--enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree 
--enable-openssl --enable-libfdk_aac --enable-postproc --enable-small 
--enable-version3 --enable-libbluray --disable-libzmq --enable-libopenjpeg 
--enable-libkvazaar --enable-libaom --enable-libsrt --enable-libaribb24 
--extra-libs=-ldl --extra-libs=-lpthread --extra-cflags=-I/opt/ffmpeg/include 
--extra-ldflags=-L/opt/ffmpeg/lib
  libavutil  57. 28.100 / 57. 28.100
  libavcodec 59. 37.100 / 59. 37.100
  libavformat59. 27.100 / 59. 27.100
  libavdevice59.  7.100 / 59.  7.100
  libavfilter 8. 44.100 /  8. 44.100
  libswscale  6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc56.  6.100 / 56.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
  Duration: 00:00:58.21, start: 0.00, bitrate: 15153 kb/s
  Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 
1920x1080 [SAR 1:1 DAR 16:9], 14957 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
  handler_name: VideoHandler
  vendor_id   : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 
fltp, 192 kb/s (default)
Metadata:
  handler_name: SoundHandler
  vendor_id   : [0][0][0][0]
  Stream #0:2[0x3](und): Subtitle: mov_text (tx3g / 0x67337874), 1920x1080, 0 
kb/s (default)
Metadata:
  handler_name: SubtitleHandler
[AVFilterGraph @ 0x7f673f65e180] Error initializing filter 'channelsplit' with 
args 'channel_layout=stereo:channels=FL|FR'
Error initializing complex filters.
Invalid argument


I realise that in this example the channel layout is not really required as it 
would default to ‘all’ which for this would be fine, but sometimes the source 
will be 5.1 and I only need FL & FR so I try and keep the command consistent.

Do you know if the syntax has changed between versions?

Thanks for your help as always
Adam

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

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


[FFmpeg-user] Unrecognized option -intra FFmpeg 5.0

2022-02-22 Thread adam smith via ffmpeg-user
Hi fellow FFmpeg enthusiasts. Hope everyone is doing well.

I have updated to FFmpeg v5.0 and mostly I am having a great time.
I am however having an issue with Unrecognised option -intra when trying to 
create IMX30 or IMX50. The command below was working in 4.4


/usr/src/app # ffmpeg -y -i /data/disposable/source.mp4 -filter_complex 
"[0:0]scale=w=720:h=576,setdar=dar=1.25[0scaled];[0:1]channelsplit=channel_layout=stereo:channels=FL|FR[001_channelsplit][002_channe
lsplit];[001_channelsplit]asplit=2[001_asplit][003_asplit];[002_channelsplit]asplit=2[002_asplit][004_asplit]"
  -map "[0scaled]" -map "[001_asplit]" -map "[002_asplit]" -map "[003_asplit]" 
-map "[004_aspl
it]" -c:v mpeg2video -pix_fmt yuv422p -s 720x576 -b:v 5000 -maxrate 
5000 -minrate 5000 -timecode 00:00:00:00 -r 25 -flags +ildct+low_delay 
-intra -intra_vlc 1 -non_linear_quant 1 -ps 1 -qmin 1
 -qmax 3 -top 1 -dc 10 -bufsize 200 -rc_init_occupancy 200 
-rc_buf_aggressivity 0.25 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -aspect 16:9 -c:a 
pcm_s16le -ar 48000 -f tee "/data/disposable/output_imx50
.mxf"
ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10.2.1 (Alpine 10.2.1_pre1) 20201203
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl 
--enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab 
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis 
--enable-libvpx --disable-libwebp --enable-libxcb --enable-libx265 
--enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl 
--enable-libfdk_aac --enable-postproc --enable-small --enable-version3 
--enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg 
--enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread 
--enable-libsrt --enable-libaribb24 --extra-cflags=-I/opt/ffmpeg/include 
--extra-ldflags=-L/opt/ffmpeg/lib
  libavutil  57. 17.100 / 57. 17.100
  libavcodec 59. 18.100 / 59. 18.100
  libavformat59. 16.100 / 59. 16.100
  libavdevice59.  4.100 / 59.  4.100
  libavfilter 8. 24.100 /  8. 24.100
  libswscale  6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc56.  3.100 / 56.  3.100
Unrecognized option 'intra'.
Error splitting the argument list: Option not found

If I remove the -intra option the transcode completes but the resulting files 
are shown as XDCAMHD422 in media info, where as with the -intra option they are 
shown as IMX

Do you know what option I should be using instead?

Thanks for your help

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

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


Re: [FFmpeg-user] Tokenised http subtitle source

2021-04-14 Thread adam smith via ffmpeg-user


> On 14 Apr 2021, at 16:14, adam smith via ffmpeg-user  
> wrote:
> 
> I will test again with the quotes through the script so it will fit in one 
> command and get back to you.


Double quotes has saved the day. That is a nice easy fix.
Thank you Moritz you lovely man.

___
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] Tokenised http subtitle source

2021-04-14 Thread adam smith via ffmpeg-user


> On 14 Apr 2021, at 16:12, adam smith via ffmpeg-user  
> wrote:
> 
> I have included the quotes on the subtitle file path.
> If I use the url in a browser the SRT file is downloaded so I know the 
> credentials are ok.
> Thanks for your help.

Looking at what I just did the test was rubbish as the token was split with a 
line break.
I will test again with the quotes through the script so it will fit in one 
command and get back to you.

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

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

Re: [FFmpeg-user] Tokenised http subtitle source

2021-04-14 Thread adam smith via ffmpeg-user
> 
>> You should show us the complete, uncut console output, without the
>> access key of course.
> 
I have included the quotes on the subtitle file path.
If I use the url in a browser the SRT file is downloaded so I know the 
credentials are ok.
Thanks for your help.
> 
ffmpeg -y -ss 00:00.00 -to 07:55.97 -i /data/disposable/some_file.mp4 -i 
"https://some_domain.com/subtitles/18217/bf4130a3-64f8-40cb-aae8-720da75797a7.srt?AWSAccessKeyId=A**B=1619000593=c**B%2FV**FQ4k78%3D=attachm
ent%3B%20filename%3Dbf4130a3-64f8-40cb-aae8-720da75797a7.srt=IQoJb3JpZ22F%2F%2F%2F%2F%2F%2F%2F%2F%**g7A0QptFpa1Q7sBOoGtuwZD8M6HL1AiBTId
cRcpk8R77bSG7Gp0oM7arSV22OU4mtilwWKW1UxyrnAQjs%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAAaDDQ1NDg4NTQyODYwMCIMFI5hAhLJiIZ%2BM3WCKrsBJk*sSmUrbiPmRVbOnjCVwf1v
> GcD%2FS0Rv***%2FgmA%2BsxWAyCarhpPk3GtYUTTxC98wk2h8hHAP7w%3D%3D"
>  -filter_complex "[0:0]fifo[vout];[0:1]afifo[01_afifo]" -map "[vout]" -map 
> "[01_afifo]" -map 1 -pi
x_fmt yuv420p -c:v libx264 -s 1920x1080 -profile:v high -level:v 4.1  -refs:v 2 
-keyint_min 50 -b:v 15000k -r 25 -ac 2 -bsf:a aac_adtstoasc -c:a libfdk_aac -ar 
48000 -b:a 192k -c:s mov_text -flags +global
_header -f tee 
"[f=mp4:movflags=+faststart]/data/disposable/bf4130a3-64f8-40cb-aae8-720da75797a7.mp4"
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (Alpine 9.3.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype 
--enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb 
--enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree 
--enable-openssl --enable-libfdk_aac --enable-postproc --enable-small 
--enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl 
--prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom 
--extra-libs=-lpthread --enable-libsrt --extra-cflags=-I/opt/ffmpeg/include 
--extra-ldflags=-L/opt/ffmpeg/lib
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/disposable/some_file.mp4':
  Metadata:
major_brand : isom
minor_version   : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
  Duration: 00:07:55.96, start: 0.00, bitrate: 15682 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 
1:1 DAR 16:9], 15161 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
  handler_name: VideoHandler
  timecode: 00:00:00:00
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 
256 kb/s (default)
Metadata:
  handler_name: SoundHandler
Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 
256 kb/s
Metadata:
  handler_name: SoundHandler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
Metadata:
  handler_name: TimeCodeHandler
  timecode: 00:00:00:00
[https @ 0x7f01cc1016c0] HTTP error 403 Forbidden
https://some_domain.com/subtitles/18217/bf4130a3-64f8-40cb-aae8-720da75797a7.srt?AWSAccessKeyId=A***B=1619000593=ci**%2FVaW***78%3D=attachment%3B%20filename%3Dbf4130a3-64f8-40cb-aae8-720da75797a7.srt=IQoJb3JpZ2l**JP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV***xY6lFKnWg7A0QptFpa1Q7sBOoGtuwZD8M6HL1AiBTIdcRcpk8R7ksSmUrbiPmRVbOnjCVwf1v6RhcNt37jCQhduDBjrhARayFWaiFySBeH8OgE%2B8u
GcD%2FS0RvbsYMeCYJGNMPHi%2B1oT5VYhMRfW1myyBiX5XVDsfRctmRXTmRm%2FVNfp4pxvU%2B3fshBQvcq9l36oU%2BIO5kbzzjq**Xk0zs%2F%2B9ne0ukC3jgSBUP4R2tYhvahrd4Ci1XzDIYNUTgxNOenjJQRWNBCPfIsLeB0Wg6UKUOtUfeEOQZP6JrtOd5%2FgmA%2BsxWAyCarhpPk3GtYUTTxC98wk2h8hHAP7w%3D%3D:
 Server returned 403 Forbidden (access denied)

___
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] Tokenised http subtitle source

2021-04-14 Thread adam smith via ffmpeg-user

> You should show us the complete, uncut console output, without the
> access key of course.

I will try again splitting up the command line so it fits in the command line 
so I can get a proper output.
> 
> It looks like you may be using Unix/Linux and your shell is
> interpreting '&'. You may need to quote the complete URL on the command
> line. But I am just guessing.

I am using Linux and this looks like exactly what its doing. I will give it a 
whirl.
> 
> This should just work. ffmpeg's URL handling is limited to a length of
> 4096.
> 
Thank you that’s good to know.

Thanks for your super fast response.

___
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] Tokenised http subtitle source

2021-04-14 Thread adam smith via ffmpeg-user
Hi group, hope you are all good.

I am trying to embed subtitles onto an mp4 and everything is working very 
nicely thank you; except that the source location for the subtitle file is 
going to change.
It was previously an open http url and the command looked like this…
ffmpeg -y -ss 00:00.00 -to 07:55.97 -i 
/disposable/localised_20210414-1-1gyzvxm/some_video_file.mp4 -i 
https://some_domain.com/subtitles/18217/bf4130a3-64f8-40cb-aae8-720da75797a7.srt
 -filter_complex "[0:0]fifo[vout];[0:1]afifo[01_afifo]" -map "[vout]" -map 
"[01_afifo]" -map 1 -pix_fmt yuv420p -c:v libx264 -s 1920x1080 -profile:v high 
-level:v 4.1  -refs:v 2 -keyint_min 50 -b:v 15000k -r 25 -ac 2 -bsf:a 
aac_adtstoasc -c:a libfdk_aac -ar 48000 -b:a 192k -c:s mov_text -flags 
+global_header -f tee 
"[f=mp4:movflags=+faststart]/disposable/transcode_20210414-1-1ald4l9/bf4130a3-64f8-40cb-aae8-720da75797a7.mp4

Like I say, everything was groovy and the subtitles were embedded without first 
having to specify to download the subtitle file prior to passing it to FFmpeg.

But the subtitle file location is changing and is going to require 
authentication to access.
So the subtitle url will look something like this…with *really* long token.

https://some_domain.com/subtitles/18217/bf4130a3-64f8-40cb-aae8-720da75797a7.srt?AWSAccessKeyId=A*Z=1619000593=c**D=attachment%3B%20filename%3Dbf4130a3-64f8-40cb-aae8-720da75797a7.srt=I**crazy_long***

If I pass this through to ffmpeg I get an authentication error..
(It is difficult for me to run this manually as the command line is too long 
due to the token, but it runs in my script so I grabbed the reported failure 
message)

[https @ 0x7f40de879b40] HTTP error 403 
Forbiddenhttps://some_domain.com/subtitles/18217/bf4130a3-64f8-40cb-aae8-720da75797a7.srt?AWSAccessKeyId=A*Z:
 Server returned 403 Forbidden (access denied)

It looks like it is cutting off the URL after the aws access key.

Does anybody know if FFmpeg will work with this type of token or should I just 
make a HTTP.get call in my script to localise the SRT file?

I found this https://www.jokecamp.com/blog/passing-http-headers-to-ffmpeg/ 
 but its pretty 
old and looks like I would have to parse the URL and split it up to grab all 
the right sections, which is probably more effort than just HTTP.get(domain, 
rest_of_the_url) and localising.

Thanks for your suggestions

Adam

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

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

Re: [FFmpeg-user] Continuous live stream capture

2021-03-29 Thread adam smith via ffmpeg-user


> On 25 Mar 2021, at 14:40, Bo Berglund  wrote:
> 
> So this process starts at the time set for the at command and ends after 66
> minutes in this case.

Thanks for the advice Bo. 
I think is pretty much what I am doing, so its nice to have some confirmation 
that I am not alone in using a timed signal process.
The real win for me would be to allow continuous recording (using some kind of 
image as the base layer would be totally fine) even when the source stream is 
no longer sending data.

I will continue my searching :)

Thanks
Adam

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

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

Re: [FFmpeg-user] ffmpeg srt to udp

2021-03-22 Thread adam smith via ffmpeg-user


> On 22 Mar 2021, at 18:27, Flumotion Support  wrote:
> 
> Thanks for the answer this is my pipe
> srt-live-transmit -vvvs:500 -r:500 "srt://
> 195.10.10.222:9002??pkt_size=1316?latency=100=listener" udp://
> 195.10.10.225:9000?pkt_size=1316=100
> but still have problem

Did you try using FFmpeg?

Something like…
ffmpeg -i 
"srt://195.10.10.222:9002?pkt_size=1316=listener=200" -map 0 
-codec copy -f mpegts udp://195.10.10.225:9000?pkt_size=1316

Cheers
Adam



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

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

[FFmpeg-user] Continuous live stream capture

2021-03-22 Thread adam smith via ffmpeg-user
Hi group, hope everyone is good,

I am trying to capture an srt stream using ffmpeg as a caller and everything is 
going well, just a couple of edge cases I would like to resolve that I think 
are related.

I would like the capture to continue even if the source stream is unavailable 
for a time. I don’t mean just keep the connection open and reconnect. I need 
the timing to remain constant, so the output should have gaps in it where the 
source was unavailable.

I have tried using lavfi -i color=color=blue:size=1920x1080 as an input and 
then overlaying the SRT stream. But ffmpeg will wait for the stream data to 
arrive before starting and will pause if the stream becomes unavailable, 
continuing when the SRT is available again. Basically the same behaviour as 
without the colour input.

The other issue (which will probably go away if the first issue is resolved, is 
stopping it :)
I was setting a record duration using the -t option, but removed it as with 
current behaviour the duration may never be reached and it will hang around 
forever waiting for the stream to come back and finish.
The new plan was to use a terminator script outside of ffmpeg that waits until 
a set time and then sends the pid.kill.

The terminator works great when the source stream is still active so I can 
dynamically update the end time; but if the source stream has already stopped, 
ffmpeg will continue to hang as it needs another pid.kill to stop, which in 
turn stops it from muxing the mp4 output.
I have a sort of workaround for this where the mp4 is written as a fragmented 
mp4 and so doesn’t need the mux stage, but I would prefer to stop it nicely so 
that I can use other output formats if I want.

Latest command used is below.
It includes the colour input and overlay which is not acting in the way that I 
wanted.
It includes the fragmented mp4 flags which are showing me love but I would 
prefer not to need.
I can include a console output if helps but there is no actual error, its just 
me not knowing how to achieve what I want ;)
Please ignore the audio filter, I know it could be simpler but this is 
automated and is set up to cope with random inputs so follows a pattern.
Please ignore the Tee Muxer, again that is automated and is used because there 
can be more than one output destination for each.
 
ffmpeg -y -f lavfi -i color=color=blue:size=1920x1080 -i 
"srt://xx.xxx.xxx.xx:?pkt_size=1316=caller=200"  
-filter_complex "[0:0][1:0]overlay[vout],[vout]split=3[vout1][vout2][image];\
[1:1]channelsplit=channel_layout=stereo:channels=FL|FR[01_channelsplit][02_channelsplit];\
[01_channelsplit]asplit=4[01_asplit][03_asplit][05_asplit][07_asplit];\
[02_channelsplit]asplit=4[02_asplit][04_asplit][06_asplit][08_asplit];\
[01_asplit][02_asplit]amerge=inputs=2[01_merger];[03_asplit][04_asplit]amerge=inputs=2[02_merger];\
[05_asplit][06_asplit]amerge=inputs=2[03_merger];[07_asplit][08_asplit]amerge=inputs=2[04_merger];\
[01_merger]asplit=2[01_merger_aout1][01_merger_aout2];\
[02_merger]asplit=2[02_merger_aout1][02_merger_aout2];\
[03_merger]asplit=2[03_merger_aout1][03_merger_aout2];\
[04_merger]asplit=2[04_merger_aout1][04_merger_aout2]" -map "[vout1]"  -map 
"[01_merger_aout1]" -map "[02_merger_aout1]" -map "[03_merger_aout1]" -map 
"[04_merger_aout1]" -pix_fmt yuv420p -c:v libx264 -s 1920x1080 -preset 
ultrafast -b:v 15000k -r 25.0 -ac 2 -bsf:a aac_adtstoasc -c:a libfdk_aac -ar 
48000 -b:a 192k -flags +global_header -f tee 
"[f=mp4:movflags=+frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov]/data/disposable/inx_dou_ch01a_2021-03-20T0355_2021-03-20T0655_hires.mp4"
 -map "[vout2]"  -map "[01_merger_aout2]" -map "[02_merger_aout2]" -map 
"[03_merger_aout2]" -map "[04_merger_aout2]" -pix_fmt yuv420p -c:v libx264 -s 
640x360 -preset ultrafast -b:v 2272k -r 25.0 -ac 2 -bsf:a aac_adtstoasc -c:a 
libfdk_aac -ar 44100 -b:a 64k -flags +global_header -f tee 
"[f=mp4:movflags=+frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov]/data/disposable/inx_dou_ch01a_2021-03-20T0355_2021-03-20T0655_proxy.mp4"
 \
-map "[image]" -r 0.5 -s 283x159 -pix_fmt yuvj420p -c:v mjpeg -update 1 
/data/disposable/a255ab2e-75db-50c1-a3d7-e9ed2727ecfa.jpeg



Thanks in advance for any advice.

Adam


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

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

Re: [FFmpeg-user] ffmpeg srt to udp

2021-03-19 Thread adam smith via ffmpeg-user

> On 19 Mar 2021, at 16:45, Carl Zwanzig  wrote:
> 
> Please do not top-post on this mailing list (yes, it's in the list FAQ).

Apologies.
I did the whole cut out the relevant text only bit and then ruined it by 
writing above it. 

Hopefully the  advice does the trick and helps to redeem my shoddy 
email etiquette. 

Will try harder 
Cheers. 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] ffmpeg srt to udp

2021-03-19 Thread adam smith via ffmpeg-user
Have you tried increasing the latency of the incoming SRT stream?

I am using caller option like

pkt_size=1316=caller=200

this ensured my source did not contain artefacts, although obviously adds 
latency. 
Maybe it’s worth a try. 

Thanks
Adam

> 
> On 19 Mar 2021, at 13:33, Christian David  wrote:
> 
>> My pipe line
>>> ffmpeg -i "srt://xx.xx.xx.xx:9002?mode=listener" -map 0 -codec
>>copy  -tune
>>> zerolatency -f mpegts udp://xx.xx.xx.xx:9000?pkt_size=1316
>>> The output is full of artifacts and is cut off after a few
___
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] HTML source

2021-02-25 Thread adam smith via ffmpeg-user
Thanks Michael. I promise to search better next time.
I appreciate your help.

> On 25 Feb 2021, at 10:37, Michael Koch  wrote:
> 
> yes, that's possible and it's described on this wiki page:
> https://trac.ffmpeg.org/wiki/Capture/Desktop 
> 
___
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] HTML source

2021-02-25 Thread adam smith via ffmpeg-user
hi gang hope you are all good today. 

I would like to record a single html page for a fixed duration as if it was a 
video source.
I know I could use OBS to show the web page as an input on a scene and then 
record it, but I wondered if I could do it directly from FFmpeg?

Does anybody know if this is possible?

Thanks for your advice as always. 
Adam
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Add subtitles to trimmed mp4

2021-02-13 Thread adam smith via ffmpeg-user
I have tested multiple source formats, I was totally wrong and Leo was bang on 
the money.
This is working great. I am able to concat multiple trimmed files together and 
the subtitles remain timed to the output - all is good and I am super happy.

Thanks Leo.
Adam

> On 13 Feb 2021, at 11:12, adam smith  wrote:
> 
> Actually I think I may have just been a bit of a donut and you may be spot on.
> Now I have had a cup of tea and woken up properly, I will do some more 
> testing on different source formats and get back to you.
> 
> Thank you for your help, as always to everyone in the group it is very much 
> 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] Add subtitles to trimmed mp4

2021-02-13 Thread adam smith via ffmpeg-user


> On 13 Feb 2021, at 10:46, adam smith via ffmpeg-user  
> wrote:
> 
> Thanks Leo. 
> I gave it a try but the same thing happened regarding the subtitle position 
> and the in point of the media appeared less accurate and had black at the 
> start.
> I believe this is because -ss prior to the file path does a quick seek to the 
> closest key frame to the desired timing, whereas -ss after the file path 
> decodes all the data to find the actual specified timing.

Actually I think I may have just been a bit of a donut and you may be spot on.
Now I have had a cup of tea and woken up properly, I will do some more testing 
on different source formats and get back to you.

Thank you for your help, as always to everyone in the group it is very much 
appreciated.

Adam

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

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

Re: [FFmpeg-user] Add subtitles to trimmed mp4

2021-02-13 Thread adam smith via ffmpeg-user


> On 13 Feb 2021, at 02:10, Leo Butler via ffmpeg-user  
> wrote:
> 
> I think you want to do
> 
> ffmpeg -y -ss 10 -t 30 -i input.mp4 -ss 10 -t 30 -i input.srt ...
> 
> See
> 
> https://ffmpeg.org/ffmpeg-all.html#toc-Main-options 
> 
> 
> Leo

Thanks Leo. 
I gave it a try but the same thing happened regarding the subtitle position and 
the in point of the media appeared less accurate and had black at the start.
I believe this is because -ss prior to the file path does a quick seek to the 
closest key frame to the desired timing, whereas -ss after the file path 
decodes all the data to find the actual specified timing.


> 
>> -filter_complex "[0:1]fifo[vout];[0:0]afifo[01_afifo]" -map "[vout]"
>> -map "[01_afifo]" -map 1 -pix_fmt yuv420p -c:v libx264 -s 1920x1080
>> -profile:v high -level:v 4.1 -refs:v 2 -keyint_min 50 -b:v 15000k -r
>> 25 -ac 2 -bsf:a aac_adtstoasc -c:a libfdk_aac -ar 48000 -b:a 192k
>> -c:s:0 mov_text -metadata:s:s:0 language=eng -flags +global_header -f
>> tee
>> "[f=mp4:movflags=+faststart]/data/disposable/transcode_20210212-1147-znbqck/edit_2805.mp4"
> 
> Do you mean to you `tee' with only one output sink?

My command is put together by a script I created and its configured to be able 
to write to multiple outputs, so tee is needed, in this test though I am only 
supplying a single output path and I didn’t write the script well enough to 
adapt the command. It doesn’t appear to do any harm, although you are right its 
a bit shit.


If you have any other ideas, keep them coming :)

Thanks
Adam

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

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

[FFmpeg-user] Add subtitles to trimmed mp4

2021-02-12 Thread adam smith via ffmpeg-user
Hi people, I have a subtitle question; yay. 

I have a 2 minute mp4 that I am going to trim using -ss and -to . 

I have a SRT subtitle file with timings that will line up with the trimmed mp4. 

If I try and trim the mp4 and add the subtitles at the same time, the trim is 
ignored and the whole media file is encoded. 

ffmpeg -y -i /data/disposable/localised_20210212-1147-u81zpu/full_mp4.mp4 -ss 
10 -to 40 -i https://somewhere/source/subtitles/subtitles.srt -filter_complex 
"[0:1]fifo[vout];[0:0]afifo[01_afifo]" -map "[vout]" -map "[01_afifo]" -map 1 
-pix_fmt yuv420p -c:v libx264 -s 1920x1080 -profile:v high -level:v 4.1  
-refs:v 2 -keyint_min 50 -b:v 15000k -r 25 -ac 2 -bsf:a aac_adtstoasc -c:a 
libfdk_aac -ar 48000 -b:a 192k -c:s:0 mov_text -metadata:s:s:0 language=eng 
-flags +global_header -f tee 
"[f=mp4:movflags=+faststart]/data/disposable/transcode_20210212-1147-znbqck/edit_2805.mp4"


If I add the -ss and -to command to the subtitle input file too, the output 
file has been trimmed, but the subtitles are out of sync. The subtitles stay 
locked to the time of the source media. 

ffmpeg -y -i /data/disposable/localised_20210212-1147-u81zpu/full_mp4.mp4 -ss 
10 -to 40 -i https://somewhere/source/subtitles/subtitles.srt -ss 10 -to 40 
-filter_complex "[0:1]fifo[vout];[0:0]afifo[01_afifo]" -map "[vout]" -map 
"[01_afifo]" -map 1 -pix_fmt yuv420p -c:v libx264 -s 1920x1080 -profile:v high 
-level:v 4.1  -refs:v 2 -keyint_min 50 -b:v 15000k -r 25 -ac 2 -bsf:a 
aac_adtstoasc -c:a libfdk_aac -ar 48000 -b:a 192k -c:s:0 mov_text 
-metadata:s:s:0 language=eng -flags +global_header -f tee 
"[f=mp4:movflags=+faststart]/data/disposable/transcode_20210212-1147-znbqck/edit_2805.mp4"


Is there any way to force the subtitles in the SRT to be mapped to the time of 
the output?
I would prefer not to do it in two passes if possible. 

I can include console output if it helps but I am pretty sure I am just putting 
the command together incorrectly and nothing untoward is happening. 

Thanks in advance for your advice. 

Adam

Sent from my iPhone
___
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] Crop between 0:02 & 1:02 a MP4+AAC MKV with less processing

2020-12-20 Thread adam smith via ffmpeg-user
If you want it to start 62 seconds into the source, use -ss 62 

Eg ffmpeg -i input.mkv -ss 62 -vcodec copy -acodec copy output.mkv

Adam

> On 19 Dec 2020, at 11:59, DynV Montrealer  wrote:
> 
> So the ideal beginning is 1:02
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Pan and scan

2020-12-16 Thread adam smith via ffmpeg-user
Having tried it out, this was exactly what I was looking for and makes it 
simple to implement.
Thanks for your help Michael, you should write a book ;)

Adam

> On 16 Dec 2020, at 17:39, adam smith via ffmpeg-user  
> wrote:
> 
> I will give it a whirl.

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

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

Re: [FFmpeg-user] Pan and scan

2020-12-16 Thread adam smith via ffmpeg-user


> On 16 Dec 2020, at 17:25, Michael Koch  wrote:
> 
> I think in this case it's better to use the crop filter, because it supports 
> commands.


Thank you for your advice Michael; thanks even more for the examples to go with 
the advice, it is very much appreciated.

I will give it a whirl.

Have fun
Adam






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

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

[FFmpeg-user] Pan and scan

2020-12-16 Thread adam smith via ffmpeg-user
Hi guys,

I am looking at turning 16x9 content into 1x1
I want to be able to specify the source area that should be used for the output 
in 1 second increments and move between them smoothly.

It looks like I could perhaps use the crop filter or the zoompan filter to 
achieve this.
Does anyone have any reasons why one would be better than the other?

Thanks
Adam


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

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

Re: [FFmpeg-user] Output a sequence of images with known timings

2020-11-19 Thread adam smith via ffmpeg-user


> On 19 Nov 2020, at 10:42, Moritz Barsnick  wrote:
> 
> Do take a look at the documentation of the select filter. It even has
> an example on how to extract certain frames, e.g. by number:
> 
> https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect 
> 
> 
>Select one frame every 100:
>select='not(mod(n\,100))’


I have been playing with this filter to select frames but it to keep the frame 
rate of the source and hold the selected image.

For example If I was creating an mp4, it would have the first image held for 
ten seconds, then the image from 10 seconds held for ten seconds, then the 
image from 20 seconds etc. which is very useful for a video output to be fair ;)

When jpeg is selected, if the source was 25fps, I get a jpeg 250 of each 
selected frame.

When I used the tile filter in the following command it was able to show me all 
of the images I want combined into a single tile…
ffmpeg -y -i /data/temporary/localised_20201119-219-cniqnj/2minclock.m4v -vf 
select='not(mod(n\,1000))',scale=160:120,tile -frames:v 1 -pix_fmt yuvj420p 
-c:v mjpeg /data/temporary/transcode_20201119-219-kbzyx4/2minclockte
st_%03d.jpeg




Update:
I have tested with a large range of intervals and so far this looks to be 
working fine…
ffmpeg -y -i /data/temporary/localised_20201119-219-cniqnj/2minclock.m4v -vf 
select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)',fps=1/10 -s 283x159 
-pix_fmt yuvj420p -c:v mjpeg /data/temporary/transcode_20201119-2
19-kbzyx4/2minclocktest_%03d.jpeg


adding the fps filter after the select and setting it to the same value has so 
far given me the results I wanted.
Eg
Image 1 from very start
Image 2 from 10 second
Image 3 from 20 second
Etc.

Thanks very much for your help Moritz
Adam
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Output a sequence of images with known timings

2020-11-19 Thread adam smith via ffmpeg-user


> On 19 Nov 2020, at 10:42, Moritz Barsnick  wrote:
> 
> Do take a look at the documentation of the select filter. It even has
> an example on how to extract certain frames, e.g. by number:
> 
> https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect 
> 
> 
>Select one frame every 100:
>select='not(mod(n\,100))'
> 
> Cheers,
> Moritz


Thanks Moritz, that’s really helpful I will take a look.

Much appreciated.

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

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

Re: [FFmpeg-user] Channel manipulation and audio filter equivalencies

2020-11-18 Thread adam smith via ffmpeg-user


> On 18 Nov 2020, at 23:29, Chris Angelico  wrote:
> 
> Appreciate the help. Still not sure how all the different filters behave.

No worries, 
I have not read any of the code so I do not really know what manipulations are 
occurring under the hood.

As far as I can tell, the channel split is pulling the individual channels from 
the source audio stream and the amerge is combining them into a new stereo 
stream basically unchanged other than any codec transformations.

Using the pan filter would allow you to manipulate the actual audio content as 
it allows for each channel pan level and attenuation; this could affect audio 
quality perhaps.

As I say, this is not based on reading one reading any code so I may be wrong.
I will be interested to know your results.

Thanks
Adam 

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

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

Re: [FFmpeg-user] Channel manipulation and audio filter equivalencies

2020-11-18 Thread adam smith via ffmpeg-user
Apologies, I said LF|RF but it should be 
'channelsplit' with args 'channel_layout=7.1:channels=FL|FR’ 

 "7.1"   =>["FL","FR","FC","LFE","BL","BR","SL","SR"],
 "7.1(wide)" =>["FL","FR","FC","LFE","BL","BR","FLC","FRC"],
 "7.1(wide-side)"=>["FL","FR","FC","LFE","FLC","FRC","SL","SR"],

> On 18 Nov 2020, at 22:47, Chris Angelico  wrote:
> 
> 'channelsplit' with args 'channel_layout=7.1:channels=LF|RF'

___
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] Channel manipulation and audio filter equivalencies

2020-11-18 Thread adam smith via ffmpeg-user

> On 18 Nov 2020, at 21:55, Chris Angelico  wrote:
> 
> But when I tried things along these lines, I got complaints that some
> of the outputs weren't connected to anything.

I didn’t add the input stream as I am not sure what stream it is on your source.
If could be something like…

ffmpeg -stats -y -i Original.mkv -filter_complex
"[0:1]channelsplit=channel_layout=7.1:channels=LF|RF[lf][rf];[lf][rf]amerge=inputs=2[aout]"
-map 0:v -map "aout" -map 0:s channel_split.mkv


___
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] Channel manipulation and audio filter equivalencies

2020-11-18 Thread adam smith via ffmpeg-user

> On 12 Nov 2020, at 06:10, Chris Angelico  wrote:
> 
> Anyone have recommendations on these options, or any other preferred
> way to remap channels at maximum quality?

You could try using the channelsplit and selecting the specific channels you 
want and then merging them into a single stream. 
channelsplit=channel_layout=7.1:channels=LF|RF[lf][rf];[lf][rf]amerge=inputs=2[aout]

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

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

[FFmpeg-user] Output a sequence of images with known timings

2020-11-18 Thread adam smith via ffmpeg-user
Hi,

I am trying to extract an image at set intervals from a video source. Later I 
will select one of images and will use the interval time and image number to 
determine the time in the video it came from.

If anybody has a better idea how to do this, feel free to stop me and push me 
in the right direction.

My issue is that the first image time varies depending on the output fps.
Eg fps=1/1 will output the first image from the 1st second of source; and so on.
Fps=1/5 will output the first image from the 3rd second of the source.
Fps=1/11 will output the first image from the 6th second of the source.
It keeps getting further away from the start while remaining approx halfway to 
the point I expected.

Any ideas how I force the first image to either be the first frame of the 
source, or the same value as the frequency?

Maybe I would be better off getting it to seek to each spot; but that would get 
pretty long pretty quick.

Full Command: ffmpeg -y -i 
/data/temporary/localised_20201118-961-d41yxx/2minclock.m4v  -filter_complex 
\"[0:0]fifo[vout];[vout]fps=fps=1/11[vout1]\" -map \"[vout1]\" -s 283x159 
-frames:v 60 -pix_fmt yuvj420p -c:v mjpeg  
/data/temporary/transcode_20201118-961-1qrmsyq/2minclocktest_%03d.jpeg"}

Console output:
/usr/src/app # ffmpeg -y -i 
/data/temporary/localised_20201118-961-d41yxx/2minclock.m4v  -filter_complex 
"[0:0]fifo[vout];[vout]fps=fps=1/11[vout1]" -map "[vout1]" -s 283x159 -frames:v 
60 -pix_fmt yuvj420p -c:v mjpeg /data/temporary/tra
nscode_20201118-961-1qrmsyq/2minclocktest_%03d.jpeg
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (Alpine 9.3.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype 
--enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb 
--enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree 
--enable-openssl --enable-libfdk_aac --enable-postproc --enable-small 
--enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl 
--prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom 
--extra-libs=-lpthread --enable-libsrt --extra-cflags=-I/opt/ffmpeg/include 
--extra-ldflags=-L/opt/ffmpeg/lib
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/data/temporary/localised_20201118-961-d41yxx/2minclock.m4v':
  Metadata:
major_brand : M4V 
minor_version   : 1
compatible_brands: M4V M4A isommp42
creation_time   : 2020-11-18T12:36:47.00Z
encoder : Keynote 10.3.5 (7029.5.5)
  Duration: 00:02:01.20, start: 0.00, bitrate: 1420 kb/s
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 
1920x1080 [SAR 1:1 DAR 16:9], 1415 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc 
(default)
Metadata:
  creation_time   : 2020-11-18T12:36:47.00Z
  handler_name: Core Media Video
Stream mapping:
  Stream #0:0 (h264) -> fifo
  fps -> Stream #0:0 (mjpeg)
Press [q] to stop, [?] for help
[swscaler @ 0x55efa99b2d80] deprecated pixel format used, make sure you did set 
range correctly
Output #0, image2, to 
'/data/temporary/transcode_20201118-961-1qrmsyq/2minclocktest_%03d.jpeg':
  Metadata:
major_brand : M4V 
minor_version   : 1
compatible_brands: M4V M4A isommp42
encoder : Lavf58.45.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 283x159 [SAR 848:849 DAR 16:9], 
q=2-31, 200 kb/s, 0.09 fps, 0.09 tbn, 0.09 tbc (default)
Metadata:
  encoder : Lavc58.91.100 mjpeg
Side data:
  cpb: bitrate max/min/avg: 0/0/20 buffer size: 0 vbv_delay: N/A
frame=   11 fps=2.1 q=1.6 Lsize=N/A time=00:02:01.00 bitrate=N/A speed=22.9x
video:80kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing 
overhead: unknown

Thanks very much for any advice.
Adam
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

[FFmpeg-user] aresample filter position

2020-11-17 Thread adam smith via ffmpeg-user
Hi you lovely people,
I have an error caused when I use the aresample filter that I think has 
something to do with the position of the filter in the chain.
Failed to inject frame into filter network: I/O error

The system takes a variety of different source configurations so I have some 
code that tries to manipulate the audio tracks and channels to fill the output. 
This can mean straight up pass through, or splitting channels, copying them and 
then merging. It all depends on the input config and output config.

Anyhoo, some of the files that get encoded have audio that slowly drifts out of 
sync (possibly due to the supplied source). I wanted to add aresample=sync=1 to 
see if this resolves the issue.

It was easiest for me to add this filter to the start of the audio filter 
chain. In most cases this does not cause any errors regardless of what 
manipulation is required afterwards, but in the instance below it is causing an 
IO error.

In this instance, I see that the console output says Consider inserting the 
(a)format filter near their input or output
If I move the aresample after the amerge it is processed successfully.
As far as I can tell, the only time I get the Failed to inject frame into 
filter network: I/O error when the last filter is amerge.

Do you know what the rules are for the position of this filter in the chain?

Command:
aws s3 cp s3://s3-bucket/filename.mxf - --quiet | ffmpeg -y -i -  
-filter_complex 
\"[0:0]fifo[vout];[0:1]aresample=async=1[01_async];[0:2]aresample=async=1[02_async];[01_async][02_async]amerge=inputs=2[01_merger]\"
 -map \"[vout]\" -map \"[01_merger]\" -pix_fmt yuv420p -c:v libx264 -s 640x360 
-profile:v main -level:v 3.1  -refs:v 2 -keyint_min 50 -b:v 736k -r 25.0 -ac 2 
-bsf:a aac_adtstoasc -c:a libfdk_aac -ar 44100 -b:a 64k -flags +global_header 
-f tee \"[f=mp4:movflags=+faststart]/temporary/filename.mp4\”

Full console:
/usr/src/app # aws s3 cp s3://s3-bucket/filename .mxf 
- --quiet | ffmpeg -y -i -  -filter_complex 
"[0:0]fifo[vout];[0:1]aresample=async=1[01_async];[0:2]aresample=async=1[02_async];[01_async][02_async]amerge=inputs=2[01_merger]"
 -map "[vout]" -map "[01_merger]" -pix_fmt yuv420
p -c:v libx264 -s 640x360 -profile:v main -level:v 3.1  -refs:v 2 -keyint_min 
50 -b:v 736k -r 25.0 -ac 2 -bsf:a aac_adtstoasc -c:a libfdk_aac -ar 44100 -b:a 
64k -flags +global_header -f tee 
"[f=mp4:movflags=+faststart]/data/temporary/filename.mp4"
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (Alpine 9.3.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype 
--enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb 
--enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree 
--enable-openssl --enable-libfdk_aac --enable-postproc --enable-small 
--enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl 
--prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom 
--extra-libs=-lpthread --enable-libsrt --extra-cflags=-I/opt/ffmpeg/include 
--extra-ldflags=-L/opt/ffmpeg/lib
  libavutil  56. 51.100 / 56. 51.100
  libavcodec 58. 91.100 / 58. 91.100
  libavformat58. 45.100 / 58. 45.100
  libavdevice58. 10.100 / 58. 10.100
  libavfilter 7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc55.  7.100 / 55.  7.100
[mxf @ 0x7fcf6fc8b500] file is not seekable - not parsing FooterPartition
[mxf @ 0x7fcf6fc8b500] broken or empty index
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Input #0, mxf, from 'pipe:':
  Metadata:
operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
uid : 182da8a5-28b1-11eb-912b-0c9d92be82bd
generation_uid  : 182da8a6-28b1-11eb-9820-0c9d92be82bd
company_name: Adobe Inc.
product_name: Adobe Media Encoder
product_version : 14.5.0
application_platform: win32
product_uid : 0c3919fe-46e8-11e5-a151-feff819cdc9f
modification_date: 2020-11-17T08:44:24.488000Z
material_package_umid: 
0x060A2B340101010501010D111300B628E001709105A41C130C9D92BE82BD
timecode: 00:00:00:00
  Duration: 00:00:30.84, start: 0.00, bitrate: N/A
Stream #0:0: Video: mpeg2video, yuv422p(tv, unknown/bt709/bt709, top 
first), 1920x1080 [SAR 1:1 DAR 16:9], 5 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
  file_package_umid: 
0x060A2B340101010501010D1213EBE625AD28E001709105A49D950C9D92BE82BD
  file_package_name: Source Package
  track_name  : Track 1
Side data:
  cpb: bitrate max/min/avg: 5000/0/0 buffer size: 17825792 vbv_delay: 
N/A

Re: [FFmpeg-user] DV to bob deinterlaced HEVC

2020-11-15 Thread adam smith via ffmpeg-user
> yadif and bwdif were set to output one frame for each field. I found bwdif 
> somewhat better than yadif which leaves some minor "ripple" artifacts to the 
> movie.

Thanks for the comparison advice, I will take a look at the bwdif filter. 
___
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] DV to bob deinterlaced HEVC

2020-11-15 Thread adam smith via ffmpeg-user
25fps vs 50fps difference is there but not so great as I expected.

You might find that ffmpeg is duplicating each deinterlaced frame to output 
50fps from the 25fps source. If you use yadif filter and configure to output a 
frame per field of interlaced source the resulting motion is dramatically 
improved at the expense of vertical resolution. 
Depending on the content type this option might be preferable. 

Thanks
Adam

> On 13 Nov 2020, at 19:40, Carl Eugen Hoyos  wrote:
> 
> Am Fr., 13. Nov. 2020 um 10:44 Uhr schrieb Matti Haveri
> :
>> 
>> On Thu, Nov 12, 2020 at 11:39 PM Carl Eugen Hoyos 
>> wrote:
>> 
 I guess it is better to deinterlace first, then scale?
>>> 
>>> This is correct.
>> 
>> I tested to scale & crop first, and then deinterlace, and to my surprise
>> the output was identical.
> 
> While it may look similar (because only horizontal scaling was done),
> I don't think the output was identical.
> Both scaling and deinterlacing cannot be undone and do have an
> impact on quality (if you define quality as identity with a - possibly
> hypothetical - original).
> I can understand why you want to deinterlace, you should avoid
> the scaling (unless I miss something and you absolutely have to
> do it).
> 
> Carl Eugen
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Segment at Scene Change

2020-09-23 Thread adam smith via ffmpeg-user

> I would like to segment and create a sequence of ts files that are split 
> based on a scene change threshold, and have a separate ts file for each song.

You could probably do this in two passes. 
The first using the select filter to find the timing of each new image. 
The second pass using the durations of the timings found to output relevant 
segments using -ss to set the start and -t to set the duration. 


___
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] Encoding Warnings

2020-06-29 Thread adam smith via ffmpeg-user


> On 29 Jun 2020, at 15:44, Jim  wrote:
> 
>  (While this doesn't equalize the volume or eliminate all volume-related 
> inconsistencies, it does make the loudest part of each video the same and is 
> the best solution I've found; 

I think you would like the loudnorm filter that incorporates ebur-128 
adjustments.
It can run as two pass or one pass (useful for live streaming) and adjusts the 
audio levels to maintain the specified levels.
An example would be -af loudnorm=I=-23:TP=-1.0:LRA=11
This sets the average loudness at -23LUFS (this is pretty standard for UK TV) 
the True Peak value as -1.0dBfs and the loudness range shows the distribution 
of loudness throughout the programme.

LUFS is great because it is based on perceptual loudness and not just sample 
values.

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

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

Re: [FFmpeg-user] Error when reading file as stream

2020-05-05 Thread adam smith via ffmpeg-user

> On 5 May 2020, at 17:15, Carl Eugen Hoyos  wrote:
> 
> Am Di., 5. Mai 2020 um 14:19 Uhr schrieb adam smith via ffmpeg-user
> :
> 
>> That will not resolve 3rd party files
> 
> What's wrong with using qtfaststart on them (or on all files)?
> 

The problem is that the platform running ffmpeg is a container that can 
accesses the source media stored in s3 object storage through the aws command 
line stream copy. This enables FFmpeg to start transcoding immediately from any 
S3 bucket it has the account details for.
I presumed that the qtfaststart running on the same platform would also run 
into the problem with the source only being accessible through the aws command 
line.

Testing using…

aws s3 cp s3://storage/source/abc-6a-test_mov_34_1588580170874.mov - --quiet | 
qt-faststart - /data/temporary/transcode_20200505-993-j7flu0/testqtfaststart.mov

was unsuccessful and resulted in -: No such file or directory.

So if I am going to need to localise the file to use qt-faststart I might as 
well go straight to ffmpeg transcode.
Thanks for your help, I have learnt about a new tool which looks really useful 
for batch fixing archive mp4 for example.

Thanks
Adam

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

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

Re: [FFmpeg-user] Error when reading file as stream

2020-05-05 Thread adam smith via ffmpeg-user


> On 4 May 2020, at 16:23, Carl Eugen Hoyos  wrote:
> 
> The result is very similar, but qtfaststart takes an existing mov file and
> only moves the index in front of the file, leaving everything else exactly
> identical while ffmpeg -i input -movflags +faststart out.mov writes a
> new file (with different properties) that has the index already moved
> to the beginning of the file.

Thanks for confirming Carl.

I thought I was adding the correct flags to my mp4 files but after a lot of 
testing it seems that because I am output using the tee function the flags I am 
adding are ignored and the output inherits the flags of the source.
Tee is currently -f tee "[f=mp4:use_fifo=1]
I am hoping I can add flags too, I will have a look about I am sure I will find 
something online.

That will not resolve 3rd party files but at least I will be producing media 
encoded as intended :)

thanks
Adam

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

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

Re: [FFmpeg-user] Error when reading file as stream

2020-05-04 Thread adam smith via ffmpeg-user
Thanks Carl,
Thanks for stopping me going down a never ending rabbit hole.

> On 4 May 2020, at 13:18, Carl Eugen Hoyos  wrote:
> 
> Many files, esp. some mov/mp4 files, require seeking. Seeking is impossible 
> if you provide the input through a pipe, this is not a limitation of FFmpeg.

Good to know, makes sense and confirms the whole input as a stream being the 
issue and why mxf wrapped media works and some mp4.
I will have to think about how I can most efficiently resolve this.

If I mount the S3 bucket using S3FS I can read the file as normal which works, 
but requires the server to run S3FS and so require bespoke set up - which I am 
trying to avoid.

Perhaps I could write some code to localise the file if the first attempt fails 
with the error message…
pipe:: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished.
That would work as I would be able to stream source when possible and fall back 
when not possible,  but it's not very elegant as requires a fail first.

If the issue is missing information from the source, is there a way I can pass 
information into ffmpeg at start up that I have extracted using ffprobe that 
would resolve the issue maybe?


> 
> Use qtfaststart to “fix” mov files, so they don’t require seeking anymore.

Thanks, I use -flags +global_header -movflags +faststart on mp4 files I create 
using ffmpeg, is that the same thing?
I add for that for instant playback in browsers.
but I need to be able to accept files for transcode from third party providers 
so cannot guarantee they will be formatted using the faststart flag.

> 
> Carl Eugen
> 



___
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] Error when reading file as stream

2020-05-04 Thread adam smith via ffmpeg-user
Hi you lovely people,

I have another question that I cannot find a resolution for, so I am hoping 
somebody can shed a little light on the subject.
When passing the source as a file into ffmpeg from regular storage, my ffmpeg 
commands are working correctly and I am happy with the output.
When passing the same source to ffmpeg as a stream, through pipe; I am getting 
errors. This is not for all files, eg mxf files containing DV50, XDCAMHD422 etc 
have not shown any issue, neither do many mp4 files.
All files are probed before the transcode and all come back as probe score 100.

The error I get complains about…
pipe:: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF

This is the whole command and output…

/usr/src/app # aws s3 cp 
s3://blah-blah-blah/source/14249/20200504/abc-6a-test_mov_34_1588580170874.mov 
- --quiet | ffmpeg -y -i -  -filter_complex 
"[0:0]fifo[vout];[0:1]afifo[01_afifo]" -map "[vout]" -map "[01_afifo]" -pix_fmt 
yuv420p -c:v libx264 -s 1280x720 -profile:v 
main -level:v 3.1  -refs:v 3 -keyint_min 50 -b:v 6436k -r 25 -ac 2 -bsf:a 
aac_adtstoasc -c:a libfdk_aac -ar 44100 -b:a 192k -flags +global_header 
-movflags +faststart -f tee 
"[f=mp4:use_fifo=1]/data/temporary/transcode_20200504-26984-c69lmq/mov_source_1725.mp4"
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.4.0 (Alpine 6.4.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab 
--enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 
--enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl 
--enable-libfdk_aac --enable-libkvazaar --enable-libaom --extra-libs=-lpthread 
--enable-postproc --enable-small --enable-version3 
--extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib 
--extra-libs=-ldl --prefix=/opt/ffmpeg
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  8.100 / 58.  8.100
  libavfilter 7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556d07ec4000] stream 1, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556d07ec4000] Could not find codec parameters for 
stream 0 (Video: h264 (avc1 / 0x31637661), none(bt709), 1024x576, 6241 kb/s): 
unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
  Metadata:
major_brand : qt  
minor_version   : 537199360
compatible_brands: qt  
creation_time   : 2010-11-17T13:05:57.00Z
  Duration: 00:00:30.00, start: 0.00, bitrate: N/A
Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none(bt709), 1024x576, 
6241 kb/s, 25 fps, 25 tbr, 2500 tbn, 5k tbc (default)
Metadata:
  creation_time   : 2010-11-17T13:05:57.00Z
  handler_name: Apple Video Media Handler
  encoder : H.264
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 
250 kb/s (default)
Metadata:
  creation_time   : 2010-11-17T13:05:57.00Z
  handler_name: Apple Sound Media Handler
Stream mapping:
  Stream #0:0 (h264) -> fifo
  Stream #0:1 (aac) -> afifo
  fifo -> Stream #0:0 (libx264)
  afifo -> Stream #0:1 (libfdk_aac)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556d07ec4000] stream 1, offset 0x30: partial file
pipe:: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!

I did try adding  ffmpeg -y -analyzeduration 100 -probesize 1000 -i -  
-filter_complex
But the same error occurred.

This is probably something to do with the fact that I am streaming the input, 
but I am not sure how to resolve it.
Any ideas will be warmly received

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

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

Re: [FFmpeg-user] Output image sequence duplicate first image

2020-04-21 Thread adam smith via ffmpeg-user

> On 21 Apr 2020, at 09:27, adam smith via ffmpeg-user  
> wrote:
> 
> 
> Thanks for the information. I will give it a whirl using the fps filter and 
> see what happens.
> 

Good news…for me anyway. Carls suggestion appears to be a solution.
The new command is...

ffmpeg -y -i /data/vod-storage-dev/source/testfile.mxf -filter_complex 
"[0:0]fps=fps=20/60[vout]" -map "[vout]" -s 283x159 -frames:v 10 -pix_fmt 
yuvj420p -c:v mjpeg /data/temporary/1cq8tq69tkumv1es0zxeb0ty4qa_%03d.jpeg

The images created do not have a duplicated first image anymore :)
Again thanks for your help it is very much appreciated.

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

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

Re: [FFmpeg-user] Output image sequence duplicate first image

2020-04-21 Thread adam smith via ffmpeg-user


> On 20 Apr 2020, at 23:10, Mark Filipak  
> wrote:

> May I suggest the following workaround?
> 
> Remove the 1st (duplicate) frame with a select filter:
> 
> ffmpeg -y -i /data/vod-storage-dev/source/testfile.mxf -vf 
> select='not(eq(n\,0))' -r 20/60 -s 283x159 -frames:v 10 -pix_fmt yuvj420p 
> -c:v mjpeg 
> /data/vod-storage-dev/temp_out/1cq8tq69tkumv1es0zxeb0ty4qa_%03d.jpeg
> 
> Untested.

Thanks Mark, I have never used the select filter before, looks interesting; in 
this use case I think the output images might just duplicate from the next 
instead (based on nothing to be fair). I will run it and let you know.


___
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] Output image sequence duplicate first image

2020-04-21 Thread adam smith via ffmpeg-user


> On 20 Apr 2020, at 22:51, Carl Eugen Hoyos  wrote:
> 
> Am Mo., 20. Apr. 2020 um 19:32 Uhr schrieb Edward Park 
> mailto:kumowoon1...@gmail.com>>:
>> 
>>> Use the output option -r or the fps filter to control the frequency of the 
>>> image grabs.
>>> They will show different behaviour wrt the beginning of the grab cycle.

Thanks for the information. I will give it a whirl using the fps filter and see 
what happens.


___
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] Output image sequence duplicate first image

2020-04-20 Thread adam smith via ffmpeg-user


> On 20 Apr 2020, at 15:38, Edward Park  wrote:
> 
> If this is accurate, it looks like you have asked it to produce 20 frames in 
> 60 seconds, or 1/3 fps, or 1 frame every 3 seconds regardless of input 
> framerate, whatever. It will drop frames, duplicate frames, do what is needed 
> to keep 1/3 frames per second constant output. You've also specified that you 
> want 10 frames total. at 1/3 fps that runs 30 seconds. I'm not sure why the 
> first and second are always duplicates, it doesn't look like any frames were 
> duplicated. (at 0.33fps if two frames were exactly the same when they weren't 
> duplicated, maybe it was frozen in the source?)
> 
> Regards,
> Ted 
> 

Thanks Ted,
Thats exactly what I was hoping I had asked it for.
Create 20 image files per 60 seconds of source media up to a maximum total of 
10 images.
So if the source was 15 seconds in duration I would get 5 images, anything 30 
seconds if longer in duration I would get 10 images output spaced equally apart 
in time at a frequency of 1/3 fps from the start of the source.
These values are all variables at runtime so I might ask to create at a lower 
frequency with more or less total images.
Every single time I get a duplicate first image :(



___
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] Output image sequence duplicate first image

2020-04-20 Thread adam smith via ffmpeg-user

> On 20 Apr 2020, at 16:03, Carl Eugen Hoyos  wrote:
> Use -vsync 0 and remove -r.

Thanks for your help Carl. 
Adding the -vsync 0 and removing -r did resolve the issue duplicate image 
output but did not allow me to specify the frequency of the image grabs. 
I will search about for something to allow the frequency to be included. 
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".

[FFmpeg-user] Output image sequence duplicate first image

2020-04-20 Thread adam smith via ffmpeg-user
Hi you lovely people,

I am trying to output a sequence of jpeg images from a video file. The command 
does indeed output a sequence of images, but the first and second are always 
duplicates, while the rest run in sequence until the maximum is reached or the 
file runs out.
I am not sure what I have done wrong. I thought I have asked for -r 10/60 so 10 
a minute regardless of frame rate.

Any ideas how to stop the duplicate being created?
Thanks in advance

Here is my full terminal…

/usr/src/app # ffmpeg -y -i /data/vod-storage-dev/source/testfile.mxf -r 20/60 
-s 283x159 -frames:v 10 -pix_fmt yuvj420p -c:v mjpeg  
/data/vod-storage-dev/temp_out/1cq8tq69tkumv1es0zxeb0ty4qa_%03d.jpeg
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.4.0 (Alpine 6.4.0)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared 
--enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab 
--enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 
--enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl 
--enable-libfdk_aac --enable-libkvazaar --enable-libaom --extra-libs=-lpthread 
--enable-postproc --enable-small --enable-version3 
--extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib 
--extra-libs=-ldl --prefix=/opt/ffmpeg
  libavutil  56. 31.100 / 56. 31.100
  libavcodec 58. 54.100 / 58. 54.100
  libavformat58. 29.100 / 58. 29.100
  libavdevice58.  8.100 / 58.  8.100
  libavfilter 7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc55.  5.100 / 55.  5.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Guessed Channel Layout for Input Stream #0.6 : mono
Guessed Channel Layout for Input Stream #0.7 : mono
Guessed Channel Layout for Input Stream #0.8 : mono
Input #0, mxf, from '/data/vod-storage-dev/source/testfile.mxf':
  Metadata:
operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
uid : adab4424-2f25-4dc7-92ff-29bd000c
generation_uid  : adab4424-2f25-4dc7-92ff-29bd000c0001
company_name: FFmpeg
product_name: OP1a Muxer
product_version : 58.12.100
product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002
material_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2400
timecode: 00:00:00:00
  Duration: 00:00:38.44, start: 0.00, bitrate: 59978 kb/s
Stream #0:0: Video: mpeg2video, yuv422p(tv, top first), 1920x1080 [SAR 1:1 
DAR 16:9], 5 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:2: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:3: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:4: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:5: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:6: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:7: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream #0:8: Audio: pcm_s24le, 48000 Hz, mono, s32 (24 bit), 1152 kb/s
Metadata:
  file_package_umid: 
0x060A2B340101010501010D001324CF5D529471346A24CF5D00529471346A2401
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x5573b7c37180] deprecated pixel format used, make sure you did set 
range correctly
Output #0, image2, to 
'/data/vod-storage-dev/temp_out/1cq8tq69tkumv1es0zxeb0ty4qa_%03d.jpeg':
  Metadata:
operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
uid : 

[FFmpeg-user] Using SEI timecode data as -timecode value

2019-04-17 Thread adam smith via ffmpeg-user
Hi you lovely people,

I am trying to find a way of using the SEI timecode data in a TS file to add 
timecode to an XDCAM.MXF output file.
I have done a fair amount of googling, but don’t seem to be getting very far.

I did try this…

ffmpeg -i /Users/adam.smith/Downloads/media-with-sei.ts -vcodec mpeg2video 
-profile:v 0 -level:v 2 -s 1920x1080 -b:v 5k -maxrate 5k -bufsize 3835k 
-minrate 5k -r 25 -flags ilme -top 1 -acodec pcm_s24le -ar 48000 -pix_fmt 
yuv422p -timecode `exiftool -TimeCode -s3 
/Users/adam.smith/Downloads/media-with-sei.ts` 
/Users/adam.smith/Downloads/media-with-sei.mxf

Which was attempting to use another command line tool to read the data and 
insert it as -timecode; but that seems a little misguided as I am pretty sure 
that it was just trying to read a TimeCode value in the basic metadata which 
was not present.

If any of you lovely people could point me in the right direction it would be 
very much appreciated.

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

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