Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th February 2020, 00:38   #1  |  Link
kromak
Registered User
 
Join Date: Sep 2019
Posts: 7
Ffmpeg too slow when simultaneously splits and reencode videos

Hello, I frequently only need to reencode part of video files, so I try to use the ffmpeg command to split while also instruct ffmpeg to reencode it. Something like this:

Code:
ffmpeg -i input.mkv -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -ss 2:19:00 -t 3000 input.avi
The problem is that when I try to do so, it seems ffmpeg becomes stuck in a line like this
Code:
frame=    0 fps=0.0 q=0.0 size=      10kB time=00:00:00.00 bitrate=N/A speed=   0x
Due to the enormous time it take when the starting point is far away from the beginning, the impression I have is that ffmpeg is re-encoding since the start of the video file, which is perhaps quite unnecessary?

I don't know a way to avoid it, except by first to split the video, and then re-encode the second half. Which, unfortunately, is usually not acceptable, since I frequently do not have the spare space to store the intermediate split file so.
kromak is offline   Reply With Quote
Old 6th March 2020, 21:10   #2  |  Link
communist
Registered User
 
Join Date: Jul 2003
Posts: 1,152
The order of parameters is important. Put the -ss further up. This way ffmpeg will skip up to that point and then start encoding:
Code:
ffmpeg -ss 2:19:00 -i input.mkv -c:a libmp3lame -b:a 48k -ac 1 -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k -t 3000 input.avi
In your command it will not encode for a long time as it is decoding the input file up the 'start time'. You will notice that the bitrate stays around zero with your command until it hits the 'start time'.
communist is offline   Reply With Quote
Reply

Tags
ffmpeg, reencode, split

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.