- Thread starter
- #101
Hi.
A little preview of what's to come...
I have now installed an editing function in Media-Buddy, with which you can edit the videos with frame precision during normal playback. At the moment this is only active when you re-code. Without re-encoding you cannot edit frame-accurate. This only works on keyframes, as this is the only place where a real image exists. Everything between two keyframes is only saved as a "difference", not as a whole image, which is what makes the enormous compression possible in the first place. Since the keyframes are rarely where they would be used for editing, you have no choice but to re-encode them. Otherwise you could just cut at the keyframes. and they can be several seconds apart. Theoretically, you could also care less about the accuracy and only do the editing on key frames. That's not precise enough for me. That's why my urge to incorporate the editing function into remuxing isn't particularly strong.
For cutting, a cutting list in .csv format is required, such as can be generated by the open source tool Lossless Cut. Since the .csv format is a pure text file, you can create it with any editor. In a .csv, data is saved one after the other, separated by commas. If you use Lossless Cut, you can edit the video directly there. However, you still have to do the other actions later in Media-Buddy. There's also the so-called "Smart Cut" here, which tries to recode only the area around the cut and simply reux everything else. With h264 in the .ts container this usually works. But with .mkv, .mp4 or more modern codecs like h265 this goes wrong 99% of the time.
I open the video in question in Lossless Cut and specify the cuts there. But instead of encoding the video in Lossless Cut, I just export the cutting list. To do this, go to Export project > Timestamp (csv) in the file menu.
Now the cutting list is created next to the video file in a fraction of a second. This cut list can be processed directly by Media-Buddy.
A cutting list like the attached example looks like this from the "inside":
Coding only starts at 0 hours, 0 minutes and 10,000 seconds and the encoding ends at 0 hours, 58 minutes and 24,576 seconds. The timestamp is accurate to 1/1000th of a second, which is more than enough. In addition, FFMpeg can understand these timestamps directly. In this example, the first 10,000 seconds are cut out and anything after 58 minutes and 24,576 seconds is also not processed. This is the "famous" title sponsorship, i.e. "This show is presented by..." at the beginning and end of the show, which I don't want to have in my finished video.
In this case there is no advertising within the actual film (series episode) because it comes from a public broadcaster. But you can also remove advertising within the episode (the film), which is unfortunately always extremely annoying on private channels. Then there are not just 2 values, but 4, 6, 8,... values in the cut list, depending on the number of advertising blocks.
Since FFMpeg can only process two such values (beginning and end) at once, the film is then divided into a corresponding number of parts, which are then reassembled without loss at the end. To do this, temporary files must be created in the Media-Buddy_Temp folder, which is why there must be enough space available there. The assembly takes place fully automatically and within a few seconds. So you don't notice anything about it. If only the beginning and end are cleaned as in the example above, there is no need to create temporary videos.
The cut list must be named exactly like the actual video, only with the ending .csv. So “Video.mp4” includes “Video.mp4.csv” as a cutting list, although “Video.csv” also works. Lossless Cut creates a “Video.mp4.csv”. But you can also use any other program that can generate such cutting lists. I don't know Comskip, but I can imagine that you can also use a Comskip list for cutting. If necessary, the cutting list can also be created manually in the editor. As long as the content can be identified as a comma-separated list of timestamps, it should work. Lossless Cut is freely available and works well. That's why the cutting function was designed for the cutting list generated by Lossless Cut.
The editing function is automatically activated for all modules that (can) re-encode videos. So no matter whether it's a series assistant or transcoding videos, as soon as a cutting list is available, it will be processed. If there is no cutting list, everything goes as usual. That's why you don't have to configure anything extra here.
The function is ready and is currently in the testing phase.
Unfortunately, there are two other issues that need to be fixed for a new version.
Firstly, the trailer download no longer works. YouTube changed something that caused the operation to be aborted. Until the new version you should deactivate the trailer download for the time being.
On the other hand, no graphics apart from the poster are currently being loaded from TVDB. As long as the relevant graphics are either available locally or can be found on fanart.tv, no problem. But if they are only available on TVDB, you currently have to load and insert them manually. We don't yet know why this is the case.
The new version will only come out when at least the TVDB problem is solved. If possible, the trailer download should also work again.
I have attached a preview version for the brave ones. Simply swap the files in the Media Buddy folder for those from the attached archive and the editing function should be available. If you have any problems with this, please let us know, thank you.
In
A little preview of what's to come...
I have now installed an editing function in Media-Buddy, with which you can edit the videos with frame precision during normal playback. At the moment this is only active when you re-code. Without re-encoding you cannot edit frame-accurate. This only works on keyframes, as this is the only place where a real image exists. Everything between two keyframes is only saved as a "difference", not as a whole image, which is what makes the enormous compression possible in the first place. Since the keyframes are rarely where they would be used for editing, you have no choice but to re-encode them. Otherwise you could just cut at the keyframes. and they can be several seconds apart. Theoretically, you could also care less about the accuracy and only do the editing on key frames. That's not precise enough for me. That's why my urge to incorporate the editing function into remuxing isn't particularly strong.
For cutting, a cutting list in .csv format is required, such as can be generated by the open source tool Lossless Cut. Since the .csv format is a pure text file, you can create it with any editor. In a .csv, data is saved one after the other, separated by commas. If you use Lossless Cut, you can edit the video directly there. However, you still have to do the other actions later in Media-Buddy. There's also the so-called "Smart Cut" here, which tries to recode only the area around the cut and simply reux everything else. With h264 in the .ts container this usually works. But with .mkv, .mp4 or more modern codecs like h265 this goes wrong 99% of the time.
I open the video in question in Lossless Cut and specify the cuts there. But instead of encoding the video in Lossless Cut, I just export the cutting list. To do this, go to Export project > Timestamp (csv) in the file menu.
Now the cutting list is created next to the video file in a fraction of a second. This cut list can be processed directly by Media-Buddy.
A cutting list like the attached example looks like this from the "inside":
Code:
00:00:10.000,00:58:24.576,
Coding only starts at 0 hours, 0 minutes and 10,000 seconds and the encoding ends at 0 hours, 58 minutes and 24,576 seconds. The timestamp is accurate to 1/1000th of a second, which is more than enough. In addition, FFMpeg can understand these timestamps directly. In this example, the first 10,000 seconds are cut out and anything after 58 minutes and 24,576 seconds is also not processed. This is the "famous" title sponsorship, i.e. "This show is presented by..." at the beginning and end of the show, which I don't want to have in my finished video.
In this case there is no advertising within the actual film (series episode) because it comes from a public broadcaster. But you can also remove advertising within the episode (the film), which is unfortunately always extremely annoying on private channels. Then there are not just 2 values, but 4, 6, 8,... values in the cut list, depending on the number of advertising blocks.
Since FFMpeg can only process two such values (beginning and end) at once, the film is then divided into a corresponding number of parts, which are then reassembled without loss at the end. To do this, temporary files must be created in the Media-Buddy_Temp folder, which is why there must be enough space available there. The assembly takes place fully automatically and within a few seconds. So you don't notice anything about it. If only the beginning and end are cleaned as in the example above, there is no need to create temporary videos.
The cut list must be named exactly like the actual video, only with the ending .csv. So “Video.mp4” includes “Video.mp4.csv” as a cutting list, although “Video.csv” also works. Lossless Cut creates a “Video.mp4.csv”. But you can also use any other program that can generate such cutting lists. I don't know Comskip, but I can imagine that you can also use a Comskip list for cutting. If necessary, the cutting list can also be created manually in the editor. As long as the content can be identified as a comma-separated list of timestamps, it should work. Lossless Cut is freely available and works well. That's why the cutting function was designed for the cutting list generated by Lossless Cut.
The editing function is automatically activated for all modules that (can) re-encode videos. So no matter whether it's a series assistant or transcoding videos, as soon as a cutting list is available, it will be processed. If there is no cutting list, everything goes as usual. That's why you don't have to configure anything extra here.
The function is ready and is currently in the testing phase.
Unfortunately, there are two other issues that need to be fixed for a new version.
Firstly, the trailer download no longer works. YouTube changed something that caused the operation to be aborted. Until the new version you should deactivate the trailer download for the time being.
On the other hand, no graphics apart from the poster are currently being loaded from TVDB. As long as the relevant graphics are either available locally or can be found on fanart.tv, no problem. But if they are only available on TVDB, you currently have to load and insert them manually. We don't yet know why this is the case.
The new version will only come out when at least the TVDB problem is solved. If possible, the trailer download should also work again.
I have attached a preview version for the brave ones. Simply swap the files in the Media Buddy folder for those from the attached archive and the editing function should be available. If you have any problems with this, please let us know, thank you.
In