Author Topic: Looking for an encoder/editor frontend for x264  (Read 2989 times)

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Looking for an encoder/editor frontend for x264
« on: October 13, 2010, 10:09:11 AM »
I'm looking for something like tmpgenc 4, but based on x264. This is what I'm planning to do:

1. input a few files.
2. cut the unwanted parts from each file.
3. join the remaining parts together and output it as a single file. It would be nice to have a pass-through option so that the file won't be re-encoded.

Tmpgenc 4 is very good at this, but it doesn't have a pass-through option and of course it can't output a x264 file. Also, it almost always crashes while editing MP4 files. I guess that's haali's fault.

Thanks
« Last Edit: October 13, 2010, 10:49:26 AM by eddman »

Offline Dark Shikari

  • x264 developer
  • Administrator
  • Member
  • *****
  • Posts: 650
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #1 on: October 13, 2010, 11:40:26 AM »
Avidemux?

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #2 on: October 13, 2010, 01:06:29 PM »
Avidemux?

Ok. I downloaded it and managed to cut the first file and save it, however, I get an error when I try to save the second file"

"keyframe error:  the beginning frame is not a key frame. Please move the A marker."

What does it mean by "move the A marker"? I don't want to move it because I want to cut the file from that frame, not another frame. Is there a way to set the first frame as a key frame?

EDIT: this is a strange error. I decided to move the A marker to an I frame, a few frames before the desired frame and cut from there. I managed to save the file. When I played the file, I was expecting to see a few unwanted frames but surprisingly they were gone and the file started almost from the frame that I wanted to cut in the first place. How could that be?

Isn't there any other editing software with pass-through ability?
« Last Edit: October 13, 2010, 05:17:28 PM by eddman »

Offline Chikuzen

  • typo lover
  • Member
  • Posts: 55
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #3 on: October 14, 2010, 01:27:25 AM »
>Isn't there any other editing software with pass-through ability?

why did you think that such software existed?

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #4 on: October 14, 2010, 02:18:41 AM »
>Isn't there any other editing software with pass-through ability?

why did you think that such software existed?

Ok, maybe i'm over complicating things. I'm looking for an editor that can edit x264 files and then output them without re-encoding, or maybe the proper term would be a splitter/joiner program that can work with x264.

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: Looking for an encoder/editor frontend for x264
« Reply #5 on: October 14, 2010, 04:07:50 AM »
It's tecnically impossible to cut frame exact without reencoding a h.264 video.

Depending on your needs, you may consider using a playlist (some of them allow to set start/end times of videos).

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #6 on: October 14, 2010, 06:26:00 AM »
It's tecnically impossible to cut frame exact without reencoding a h.264 video.

I don't know about that but strangely, tmpgenc 4 manages to cut my h.264 files from wherever I want. Say I cut from A to B and the frame before A and the frame after B are not keyframes. Technically, it shouldn't work but tmpgenc has a workaround for this. It sets the immediate frame, that comes after the B point, as a keyframe.
As I said before, it is a very good editor but unfortunately it can't output the edited file without doing a re-encode first and that reduces quality. Also, it crashes a lot while working with MP4 files.
Avidemux is pretty much what i'm after. It can edit with no re-encoding but it lacks the abillity to mark a frame as a keyframe, which limits its editing capabilities.

Depending on your needs, you may consider using a playlist (some of them allow to set start/end times of videos).

What do you mean by using a playlist? How do you do that?
« Last Edit: October 14, 2010, 06:42:29 AM by eddman »

Offline Dark Shikari

  • x264 developer
  • Administrator
  • Member
  • *****
  • Posts: 650
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #7 on: October 14, 2010, 06:47:54 AM »
I don't know about that but strangely, tmpgenc 4 manages to cut my h.264 files from wherever I want. Say I cut from A to B and the frame before A and the frame after B are not keyframes. Technically, it shouldn't work but tmpgenc has a workaround for this. It sets the immediate frame, that comes after the B point, as a keyframe.
As I said before, it is a very good editor but unfortunately it can't output the edited file without doing a re-encode first and that reduces quality. Also, it crashes a lot while working with MP4 files.
Avidemux is pretty much what i'm after. It can edit with no re-encoding but it lacks the abillity to mark a frame as a keyframe, which limits its editing capabilities.
What do you mean by "mark a frame as a keyframe"?  If a frame isn't a keyframe, you can't make it a keyframe unless you re-encode.  Of course, you can often get away with re-encoding only a small portion of the video, but only if your encoder can produce a stream that can be concatenated with the original stream without issues.

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #8 on: October 14, 2010, 08:21:50 AM »
What do you mean by "mark a frame as a keyframe"?  If a frame isn't a keyframe, you can't make it a keyframe unless you re-encode.

Aha, ok, I think I get what tmpgenc does here. It marks the frame as a key frame, so that it would be turned into a keyframe during the encoding process.

Now I understand. Editing a h.264 file without doing a re-encode isn't practical, so I have to re-encode anyway. On the other hand, re-encoding a h.264 file into another h.264 file will result in a lower quality file.
So let me ask this. Is it possible to encode the original h.264 file into a lossless format, edit that lossless file and then encode the end result into h.264 again? What level of quality can I expect?

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: Looking for an encoder/editor frontend for x264
« Reply #9 on: October 14, 2010, 09:27:03 AM »
the exact same quality as when you re-encode the h.264 directly.

Certain playlist formats allow to set start and end times of each media. If your purpose is to watch the video, a playlist will allow you to skip portions of the video. It won't reduce the filesize though.

Offline eddman

  • Member
  • Posts: 10
    • View Profile
Re: Looking for an encoder/editor frontend for x264
« Reply #10 on: October 14, 2010, 10:04:51 AM »
the exact same quality as when you re-encode the h.264 directly.

So you're saying that h.264 -> lossless -> h.264 method will result in the same quality as h.264 -> h.264 route, and the end result of both methods would be of lower quality than the original h.264, right?

Certain playlist formats allow to set start and end times of each media. If your purpose is to watch the video, a playlist will allow you to skip portions of the video. It won't reduce the filesize though.

Ok, It's clear now, but that's not what I want to do.

Another question. Is it even possible to create an editor that can do frame-accurate h.264 edits?
« Last Edit: October 14, 2010, 12:07:55 PM by eddman »

Offline patrick

  • Member
  • Posts: 36
    • View Profile
    • AVS2RAW
Re: Looking for an encoder/editor frontend for x264
« Reply #11 on: October 14, 2010, 01:14:25 PM »
So you're saying that h.264 -> lossless -> h.264 method will result in the same quality as h.264 -> h.264 route, and the end result of both methods would be of lower quality than the original h.264, right?
exactly
Another question. Is it even possible to create an editor that can do frame-accurate h.264 edits?
As Dark Shikari said, you need to reconvert the frames before the first I-frame, and to do so you need and encoder that "can produce a stream that can be concatenated with the original stream without issues."
So more than an editor issue, it's an encoder issue.