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 > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th November 2020, 16:45   #1  |  Link
For Fun
Registered User
 
Join Date: Oct 2020
Posts: 11
How to cut video frame accurate without encoding?

How can I cut video by frame number? when I cut the video
With ffmpeg it skips to next keyframe I want to cut video with specific frame number or specific time I set how can I do this?

İs there a free program for this? Or how can I do this with ffmpeg?

Last edited by For Fun; 4th November 2020 at 17:27.
For Fun is offline   Reply With Quote
Old 4th November 2020, 16:57   #2  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,998
If your video is MPEG2 elementary streams (DVD format) then you can use Cuttermaran. No longer maintained, but very reliable.

For other formats the only free solution I am aware of is VidCutter. But it is not very reliable. A commercial software for frame accurate cutting is Smart Cutter, it works nicely most of the time, but it costs $.
manolito is offline   Reply With Quote
Old 4th November 2020, 17:19   #3  |  Link
For Fun
Registered User
 
Join Date: Oct 2020
Posts: 11
I thank you for your reply. I will look at the programs you specified

Last edited by For Fun; 4th November 2020 at 17:27.
For Fun is offline   Reply With Quote
Old 4th November 2020, 17:24   #4  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 202
Without re-encoding, you can only cut on keyframes in h264/h265.

Partial re-encoding might be what you are looking for, aka "smart rendering", but AFAIK no free program does it.
butterw2 is offline   Reply With Quote
Old 5th November 2020, 14:52   #5  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,826
Quote:
Originally Posted by butterw2 View Post
Without re-encoding, you can only cut on keyframes in h264/h265.

Partial re-encoding might be what you are looking for, aka "smart rendering", but AFAIK no free program does it.
In the past I've used VirtualDub2 to find the keyframes timecodes. And TSmuxerGUI to cut them.

It's quite a faff but it works
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 5th November 2020, 15:44   #6  |  Link
NanoBot
Registered User
 
Join Date: Sep 2003
Posts: 192
What do you think about this program:

https://github.com/mifi/lossless-cut/

I did only a few tests by myself and therefore cannot decide, if it would fit your needs.
NanoBot is offline   Reply With Quote
Old 5th November 2020, 16:46   #7  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,998
Lossless Cut is nice, but just like other free solutions it only cuts at key frames. From the readme:
Quote:
Known issues & limitations
Cutting times are not accurate! Start cut time will be "rounded" to the nearest previous keyframe.
One thing which gave me acceptable results in the past:
TSDoctor (commercial, but has a 30 days trial period) has an option for AVC streams to cut not only on key frames, but also on P-frames. I did not expect good cuts from this option, but surprisingly it worked really well in most cases. Of course you cannot say that this is frame accurate, but still much better than only cutting on I-frames.
manolito is offline   Reply With Quote
Old 5th November 2020, 17:04   #8  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 202
Quote:
Originally Posted by SeeMoreDigital View Post
In the past I've used VirtualDub2 to find the keyframes timecodes. And TSmuxerGUI to cut them.

It's quite a faff but it works
Provided you know the encoding parameters and can replicate them, smart render could possibly be done manually with free tools (avidemux, or the ones you mention ?). It's a fair bit of trouble though ...and for less expert users may not always work. Cutting isn't so much the issue as merging.

Lossless-cut is another lossless cutter (cut sequence must start on a keyframe).
butterw2 is offline   Reply With Quote
Reply

Tags
ffmpeg gui, ffmpeg x264 mp4 quicktime, ffmpeg.mkv, video converter help

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 20:39.


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