concatenating files in FFMPEG causing the wrong file length

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

concatenating files in FFMPEG causing the wrong file length

Philip Orrill
Hi there

I have an input coming from an rtsp source in 2 second increments to convert
to a HLS stream. The stream itself seems fine. However I do sometimes get
the warning:

*Non-monotonous DTS in output stream 0:0*

my current command for obtaining the stream is

*-stimeout 60000000 -y -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i
{url} -c:v copy -hls_segment_type mpegts -hls_time 2 -hls_list_size 5 -f hls
output.m3u8*

The idea was to then concatenate these together to get a full file. However
the concatenation generates a file with a very different length. I may do a
10 minute video. When concatenated this comes out to be 15 minutes or more.

I figured this was due to the warnings. I thought I could process each
segment and re-generate the timestamps. I know all my files are around 2
second long for instance. So re-generate and then concatenate.

I am so far having no luck.

*I have tried a few different commands below are some examples:*

*Reset timestamps* -i "D:\TestFiles\output18.ts" -c:v libx264 -crf 17
-preset veryfast -reset_timestamps 1 "D:\TestFiles\output18_new.ts"

*setting framerate and fflags* -i "D:\TestFiles\output18.ts" -r 20 -c:v
libx264 -preset veryfast -g 20 -fflags +genpts "D:\TestFiles\output18.mp4"

*Vsync and wall clock* -i "D:\TestFiles\output18.ts" -r 20
-use_wallclock_as_timestamps 1 -c:v libx264 -preset veryfast -vsync drop
"D:\TestFiles\output18.mp4"

The files are generated and I can concatenate them but the time is still off
by a lot.

Interestingly even when converting a single file from just a ts to an mp4
the files changes more then I expect.

For example the file size goes from 260KB to 694KB

I have done a lot of tests and they all seem to produce slightly different
wrong results.

Here is an example from FFPROBE on the 2 files I have run.

*ts file*
ffprobe version git-2019-11-11-20c5f4d Copyright (c) 2007-2019 the FFmpeg
developers
  built with gcc 9.2.1 (GCC) 20191010
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf
  libavutil      56. 35.101 / 56. 35.101
  libavcodec     58. 61.100 / 58. 61.100
  libavformat    58. 34.101 / 58. 34.101
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 66.100 /  7. 66.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mpegts, from 'D:\TestFiles\output18.ts':
  Duration: 00:00:01.99, start: 38.121067, bitrate: 1034 kb/s
  Program 1
    Metadata:
      service_name    : Media Presentation
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt709, progressive), 1920x1080, 20 fps, 24.92 tbr, 90k tbn, 40
tbc

*MP4*
ffprobe version git-2019-11-11-20c5f4d Copyright (c) 2007-2019 the FFmpeg
developers
  built with gcc 9.2.1 (GCC) 20191010
  configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libdav1d --enable-libbluray --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
--enable-libopenmpt --enable-amf
  libavutil      56. 35.101 / 56. 35.101
  libavcodec     58. 61.100 / 58. 61.100
  libavformat    58. 34.101 / 58. 34.101
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 66.100 /  7. 66.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\TestFiles\output18.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.34.101
  Duration: 00:00:02.05, start: 0.000000, bitrate: 1151 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080, 1145 kb/s, 20 fps, 20 tbr, 10240 tbn, 40 tbc (default)
    Metadata:
      handler_name    : VideoHandler


The file length is slightly longer on the mp4 at 2.05 instead of 1.99. Some
other items have also changed. The length seems to be consistently 2.05 but
the bits and tbn seem to change slightly depending on what inputs I use for
encoding to the mp4.

All I am trying to achieve.
I have 10 minutes of ts files. I concatenate them and have a 10 minute
video. My guess is that due to the issues with timestamps or an inconsistent
frame rate it is causing the issues with the concatenation.

I don't mind re-encoding the files and generating new timestamps etc. I
can't seem to quite get it to work. I'm not sure if i'm missing something. I
have been banging my head against this for a few days now.

I know the length of the file (ffprobe gets it correct). I know the fps it
should be, so I can add add/remove frames if needed.

It would be appreciated if someone could point me in the correct direction.

thanks




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
hi,
try this patch :
http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180316/739542e4/attachment.obj
(explained here:
https://ffmpeg.org/pipermail/ffmpeg-devel/2018-March/226706.html)
but it works up to 4.1.3 .
&rei

On Wed, Oct 7, 2020 at 1:46 PM Philip Orrill <[hidden email]>
wrote:

> Hi there
>
> I have an input coming from an rtsp source in 2 second increments to
> convert
> to a HLS stream. The stream itself seems fine. However I do sometimes get
> the warning:
>
> *Non-monotonous DTS in output stream 0:0*
>
> my current command for obtaining the stream is
>
> *-stimeout 60000000 -y -rtsp_transport tcp -use_wallclock_as_timestamps 1
> -i
> {url} -c:v copy -hls_segment_type mpegts -hls_time 2 -hls_list_size 5 -f
> hls
> output.m3u8*
>
> The idea was to then concatenate these together to get a full file. However
> the concatenation generates a file with a very different length. I may do a
> 10 minute video. When concatenated this comes out to be 15 minutes or more.
>
> I figured this was due to the warnings. I thought I could process each
> segment and re-generate the timestamps. I know all my files are around 2
> second long for instance. So re-generate and then concatenate.
>
> I am so far having no luck.
>
> *I have tried a few different commands below are some examples:*
>
> *Reset timestamps* -i "D:\TestFiles\output18.ts" -c:v libx264 -crf 17
> -preset veryfast -reset_timestamps 1 "D:\TestFiles\output18_new.ts"
>
> *setting framerate and fflags* -i "D:\TestFiles\output18.ts" -r 20 -c:v
> libx264 -preset veryfast -g 20 -fflags +genpts "D:\TestFiles\output18.mp4"
>
> *Vsync and wall clock* -i "D:\TestFiles\output18.ts" -r 20
> -use_wallclock_as_timestamps 1 -c:v libx264 -preset veryfast -vsync drop
> "D:\TestFiles\output18.mp4"
>
> The files are generated and I can concatenate them but the time is still
> off
> by a lot.
>
> Interestingly even when converting a single file from just a ts to an mp4
> the files changes more then I expect.
>
> For example the file size goes from 260KB to 694KB
>
> I have done a lot of tests and they all seem to produce slightly different
> wrong results.
>
> Here is an example from FFPROBE on the 2 files I have run.
>
> *ts file*
> ffprobe version git-2019-11-11-20c5f4d Copyright (c) 2007-2019 the FFmpeg
> developers
>   built with gcc 9.2.1 (GCC) 20191010
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libdav1d --enable-libbluray --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
> --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
> --enable-libopenmpt --enable-amf
>   libavutil      56. 35.101 / 56. 35.101
>   libavcodec     58. 61.100 / 58. 61.100
>   libavformat    58. 34.101 / 58. 34.101
>   libavdevice    58.  9.100 / 58.  9.100
>   libavfilter     7. 66.100 /  7. 66.100
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> Input #0, mpegts, from 'D:\TestFiles\output18.ts':
>   Duration: 00:00:01.99, start: 38.121067, bitrate: 1034 kb/s
>   Program 1
>     Metadata:
>       service_name    : Media Presentation
>       service_provider: FFmpeg
>     Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
> yuv420p(tv, bt709, progressive), 1920x1080, 20 fps, 24.92 tbr, 90k tbn, 40
> tbc
>
> *MP4*
> ffprobe version git-2019-11-11-20c5f4d Copyright (c) 2007-2019 the FFmpeg
> developers
>   built with gcc 9.2.1 (GCC) 20191010
>   configuration: --enable-gpl --enable-version3 --enable-sdl2
> --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
> --enable-libdav1d --enable-libbluray --enable-libfreetype
> --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
> --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy
> --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
> --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
> --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
> --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va
> --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
> --enable-libopenmpt --enable-amf
>   libavutil      56. 35.101 / 56. 35.101
>   libavcodec     58. 61.100 / 58. 61.100
>   libavformat    58. 34.101 / 58. 34.101
>   libavdevice    58.  9.100 / 58.  9.100
>   libavfilter     7. 66.100 /  7. 66.100
>   libswscale      5.  6.100 /  5.  6.100
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\TestFiles\output18.mp4':
>   Metadata:
>     major_brand     : isom
>     minor_version   : 512
>     compatible_brands: isomiso2avc1mp41
>     encoder         : Lavf58.34.101
>   Duration: 00:00:02.05, start: 0.000000, bitrate: 1151 kb/s
>     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
> 1920x1080, 1145 kb/s, 20 fps, 20 tbr, 10240 tbn, 40 tbc (default)
>     Metadata:
>       handler_name    : VideoHandler
>
>
> The file length is slightly longer on the mp4 at 2.05 instead of 1.99. Some
> other items have also changed. The length seems to be consistently 2.05 but
> the bits and tbn seem to change slightly depending on what inputs I use for
> encoding to the mp4.
>
> All I am trying to achieve.
> I have 10 minutes of ts files. I concatenate them and have a 10 minute
> video. My guess is that due to the issues with timestamps or an
> inconsistent
> frame rate it is causing the issues with the concatenation.
>
> I don't mind re-encoding the files and generating new timestamps etc. I
> can't seem to quite get it to work. I'm not sure if i'm missing something.
> I
> have been banging my head against this for a few days now.
>
> I know the length of the file (ffprobe gets it correct). I know the fps it
> should be, so I can add add/remove frames if needed.
>
> It would be appreciated if someone could point me in the correct direction.
>
> thanks
>
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
Thanks for the fast reply.

I am quite new to the FFMPEG source code world. I have version 4.2.3. I am
on windows and used chocolatey to get a build initially. The command doesn't
exist (which i'm not surprised about since you said it was a patch).

I have visual studio and cloned the branch from git.

How do I apply the patch?

Do I need to get the code changes that you displayed from git. Copy them
into the code and re-compile?

How can I find the change-set on github? I can see the added and removed
lines from what you provided.

I feel like i'm more likely to make a mistake copying and pasting like that
then taking the code from git.

I want to make sure I am on the right page to test this fix:
1) Get source code.
2) Override existing code with the code provided in the patch.
3)Recompile ffmpeg
4) test

Does that sound correct?
Thanks again





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
personally I wouldn't bother with windoze recompiling on a modern machine
unless you're badly dependent windoze's gui etc.  installing ubuntu in vm
is a matter of 5-10 mins today
(or 2 mins on aws, aws's free tiny instances can do sooo much stuff)...
after your get linux you'd install docker in 3 commands and next, get
dockerfile file for building ffmpeg's docker
(i can actually give you docker file for building ffmpeg with this dts
correction patch, cuz that patch a vital for one playout system used
production (kind of diy vod to live system)).
dockerfile has all the commands sequence for building ffmpeg.. i'm useless
for helping with win/mac builds, the last time i recompiled ffmpeg was like
5 yrs ago and it was with cygwin/mingw gcc stuff :-P
&rei

On Wed, Oct 7, 2020 at 3:53 PM Philip Orrill <[hidden email]>
wrote:

> Thanks for the fast reply.
>
> I am quite new to the FFMPEG source code world. I have version 4.2.3. I am
> on windows and used chocolatey to get a build initially. The command
> doesn't
> exist (which i'm not surprised about since you said it was a patch).
>
> I have visual studio and cloned the branch from git.
>
> How do I apply the patch?
>
> Do I need to get the code changes that you displayed from git. Copy them
> into the code and re-compile?
>
> How can I find the change-set on github? I can see the added and removed
> lines from what you provided.
>
> I feel like i'm more likely to make a mistake copying and pasting like that
> then taking the code from git.
>
> I want to make sure I am on the right page to test this fix:
> 1) Get source code.
> 2) Override existing code with the code provided in the patch.
> 3)Recompile ffmpeg
> 4) test
>
> Does that sound correct?
> Thanks again
>
>
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
In reply to this post by Philip Orrill
oups, correction: dts patch works ok 1:1 up to 4.2.1 ...
.
say; if patch file is in /tmp/patch.txt,  in docker (bask) commands (for
getting to ffmpeg's configure & make are like (patch is command, guess it'd
be patch.exe for win)  :

FFMPEG_VERSION=4.2.1
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
    tar -zxf ffmpeg-${FFMPEG_VERSION}.tar.gz  --strip-components=1 && \
    patch -p1  --ignore-whitespace <  /tmp/patch.txt && \
    ./configure...  \
   ....  && make...

On Wed, Oct 7, 2020 at 3:53 PM Philip Orrill <[hidden email]>
wrote:

> Thanks for the fast reply.
>
> I am quite new to the FFMPEG source code world. I have version 4.2.3. I am
> on windows and used chocolatey to get a build initially. The command
> doesn't
> exist (which i'm not surprised about since you said it was a patch).
>
> I have visual studio and cloned the branch from git.
>
> How do I apply the patch?
>
> Do I need to get the code changes that you displayed from git. Copy them
> into the code and re-compile?
>
> How can I find the change-set on github? I can see the added and removed
> lines from what you provided.
>
> I feel like i'm more likely to make a mistake copying and pasting like that
> then taking the code from git.
>
> I want to make sure I am on the right page to test this fix:
> 1) Get source code.
> 2) Override existing code with the code provided in the patch.
> 3)Recompile ffmpeg
> 4) test
>
> Does that sound correct?
> Thanks again
>
>
>
>
>
> --
> Sent from: http://www.ffmpeg-archive.org/
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
Thanks a lot for the details.
I am busy with some other bits at the moment but will look at this a bit
later and give it a go.

I posted this not expecting to hear back this quick.

I do seem to have some commands that seem to fix the timing on the video
(but the audio gets muddled).

If this patch fixes it then I might not need this. I just want to sanity
check my understanding.

My fix that seems to work for video is to run this on each segment:

*-y -r {fps} -use_wallclock_as_timestamps 1 -i {video} -vf scale=1920:-1 -r
{fps} -c:a copy*

My understanding is this tells the segment how many fps should be on the
input and resets the timestamps. The output will then set the scale and
regenerate the file to be the expected fps.

When this is run on all the files and then concatenated it seems to be the
expected result.

I don't know if this actually changes the pts and if this will be a "full
fix" or if this is more putting a plaster over the issue.

If I can get your suggestion running and it works then that would be a much
cleaner result.





--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
In reply to this post by andrei ka
Hi
I now have a ubuntu instance running and have installed docker. I ran the
little hello world app they give and that ran.

I ran the command you gave $ curl -sLO
https://ffmpeg.org/releases/ffmpeg-$4.2.1.tar.gz && tar -zxf
ffmpeg-$4.2.1.tar.gz --strip-components=1 && path -p1 --ignore-whitespace <
/tmp/patch.txt && ./configure... ....&& make...

This gives an error that

gzip: stdin: not in gzip format
tar: child returned status 1
tar: Error is not recoverable: existing now

Have I missed installing something?

Thanks again




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
you're doing well, almost there :-) just leave 4.1.2  w/o $ sign, $ is for
var's values in unix sh...
&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
That makes sense. Sorry my lack of linux showing now.

I have updated the command and now get bash: /tmp/patch.txt "No such file or
directory". Do I need to create the directory and paste in the code you
provided. Or should docker do something to pick it up from git?

Thought it would be best to ask before I create directories I don't need
etc.



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
save into patch.txt the part of URL
http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180316/739542e4/attachment.obj
starting from --- (till the end) (rather do wget  URL && vi to del the
useles mail header part, if you edit in win editor make sure you save in it
unix format, txt files in win have different cr/lf format, or use texpad in
win, it has save in unix format option)  :

---
 fftools/ffmpeg.c     | 54 +++++++++++++++++++++++++++++++++++++++++++++++-----
 fftools/ffmpeg.h     |  7 +++++++
....

&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
In reply to this post by Philip Orrill
or grab this :
https://drive.google.com/file/d/1ByK7u-uOyPpUaIjVx7Ilq5tnY4rEad5e/view?usp=sharing
:-)
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
I have downloaded the file from the drive thanks.

I have created a directory called /tmp on my machine and copied the file
into that.

I have the command $ curl -sLO
https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.gz && tar -zxf
ffmpeg-4.2.1.tar.gz --strip-components=1 && patch -p1 --ignore-whitespace <
/tmp/patch.txt && ./configure... .... && make...

This gives me the error:
/tmp/patch.txt: No such file or directory

I assume i'm doing something really silly.

Thanks for the help again.




--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
go to /tmp and check what you've got where, like (ls is likz dir) :

cd /tmp
ls

if you patch* is whre but not .txt rename it : /bin/mv patch* patch.txt

&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

Philip Orrill
I'm getting further thank you for your patience.

It feels like the home stretch now.

I run the command and it half works. It runs some but errors at the end.

It seems to suggest it has patched some items. But then says a directory
does not exist.

Do I need to specify a directory instead of ....?

patching file fftools/ffmpeg.c
Hunk #1 succeeded at 4435 (offset 48 lines).
Hunk #2 succeeded at 4470 (offset 48 lines).
Hunk #3 succeeded at 4510 (offset 51 lines).
patching file fftools/ffmpeg.h
Hunk #2 succeeded at 588 (offset -2 lines).
patching file fftools/ffmpeg_opt.c
Hunk #2 succeeded at 1207 (offset 50 lines).
Hunk #3 succeeded at 3479 (offset 72 lines).
bash: ./configure...: No such file or directory



--
Sent from: http://www.ffmpeg-archive.org/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
you should join the dockerfile you're executing, i can't know what commands
you're executing and from where.
./configure is the conf command in ffmpeg src uncompressed dir, your
commands batch (shell or docker) is not located in that folder at
the time it issues the command, so, cd ffmpeg_unzipped_dir command is
missing or you cd-ed somewhere else meanwhile...

in a correct docker file all commands are ok for correct navigation b/w
folders (temporary or packages git trunks etc)

&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: concatenating files in FFMPEG causing the wrong file length

andrei ka
In reply to this post by Philip Orrill
fyi, this is example of ffmpeg docker file with gpu encoding capabilities :
https://hub.docker.com/r/jrottenberg/ffmpeg/dockerfile
you take it, mod it for taking 4.1.2 ( FFMPEG_VERSION=4.2.1) , and make
patch mod in docker file

DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
        ./configure \

DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
patch -p1  --ignore-whitespace <  /tmp/patch.txt && \
./configure \

and you fire:

docker build --tag ffmpeg:4.2.1.dts .

and you should be fine...


&rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".