<p>@user2248 is on the money. The only software I know of that can do this sort of thing is ffmpeg. I'll expand on his answer:</p>

<ul>
<li>Import <em>mymovie.mp4</em> into Premiere Pro, or audition or whatever.</li>
<li>Do your sound edit, and export just the audio to <em>myfixedaudio.wav</em> (or .aiff). </li>
<li>Now comes the scary command line stuff:</li>
</ul>



<pre><code>ffmpeg -i mymovie.mp4 -i myfixedaudio.wav -c:v copy -map 0:v -map 1:a myfixedmp4.mp4
</code></pre>

<p>Wow, a whole line of typing, that's going to take forever. Seriously, it might seem that it's mysterious and difficult, but it's actually less work than doing it with the GUI. let's break down that command so you can see what it's doing:</p>

<ul>
<li><code>-i mymovie.mp4 -i myfixedaudio.wav</code> import the movie, and the audio. FFMPEG numbers from 0, so <em>mymovie.mp4</em> is source 0 and <em>myfixedaudio.wav</em> is source 1</li>
<li><code>-c:v copy</code> set the codec for video to copy, aka completely lossless copy of the original encoded video, copied bit for bit. We don't need to set the codec for audio because it sets the appropriate audio codec for mp4 by default (aac).</li>
<li><code>-map 0:v -map 1:a</code> map the video from the first source and the audio from the second source to the first and second streams of the output. I.e. the output now has an identical video stream to the original movie, and a re-encoded audio stream from the fixed version in the wav file.</li>
<li><code>myfixedmp4.mp4</code> ffmpeg uses the first thing it sees as a filename without a -option in front of it as the output.</li>
<li>if you wanted to preserve more audio quality, you could muck around with the audio settings, you'd do that before the output name.</li>
</ul>

<p>Compare that to what you'd do in Premiere:</p>

<ul>
<li>import the movie and the audio</li>
<li>create a new timeline</li>
<li>add the just video to the timeline by deactivating the audio and then dragging the video into the timeline, or by selecting the original audio track from the movie and deleting it</li>
<li>add the new audio</li>
<li>export the movie, after adjusting the export settings</li>
</ul>

<p>Same same, only you do it with a lot more clicking and dragging and keystrokes. Not to mention that it can't actually do what ffmpeg can.</p>

<p>This will not preserve your audio losslessly, but nothing will. It will however avoid a generation loss with your video, and it is the <em>only</em> way I know of that will.</p>

CC BY-SA 4.0
2018-06-09T13:41:43.493Z
Thanks. I used your method for this, and then verified that the video is identical to the last pixel afterwards. So it worked. However, it really bothers me that the audio couldn't be identical as well for all the non-cut parts. Also, when I was done, I compared all three versions' audio track and noticed heavy differences in both volume and when they start. Very unexpected. And frustrating. No idea why it changes where it starts. Also, I tried to upvote your solution, but this site wouldn't let me because it's a POS.
coolmap
CC BY-SA 4.0
2018-06-08T08:22:12.493Z
2018-06-08T14:22:46.463Z
2018-06-08T14:22:46.463Z
stib
<p>I have previously made an .mp4 video file in Adobe Premiere Pro. I don't have any of the original files (or the project file) still. I've now noticed a very small mistake that really bothers me, but if I were to import the .mp4 file into Premiere, cut out the split-second mistake (it's an unwanted sound that I for some reason didn't catch when I made it) and then re-export/encode it, it would "lose a generation" of picture (and sound?) quality.</p>

<p>This is unacceptable to me.</p>

<p>I want to export the exact same video minus the split-second mistake. Zero changes in video/audio quality. Note that I cannot export it losslessly, because then it's no longer an .mp4 and will take a HUGE amount of storage space.</p>

<p>Is there really no way to accomplish this? It's so annoying that I will have to suffer serious loss of quality unless I keep all the lossless source files around forever for everything. It's just not practical, and I frankly see no reason why it couldn't allow us to do this.</p>

CC BY-SA 4.0
2018-06-07T14:48:12.937Z
Nope, no way for that to happen. This isn't just a feature feature that wasn't included in Premiere, it is an inherent property of the math of lossy codecs. FWIW, most professionals don't usually keep losslessly encoded source files. However, they do usually keep lossy encoded source files, either using the original acquisition codec or an intermediate company standard format called a mezzanine format.
Michael Liebman
CC BY-SA 4.0
2018-06-07T14:59:32.180Z
But... Since "the math" for the algorithms has already been performed once, couldn't it "reconstruct" all the parts except the small part that I want to remove, and then "splice" them together again, without actually re-encoding?
coolmap
CC BY-SA 4.0
2018-06-07T16:00:44.170Z
No. H.264 is a lossy codec, which, as the name implies, losses information in the encode process. You can "reconstruct" a close approximation of the original, but you will always lose quality because you are starting from less information than you originally had. That will always introduce artifacts because of the additional generation. A lossless codec, on the other hand, does exactly what you are describing. Math that saves all the information to make the file smaller on encode and the opposite math to get back the exact original on the decode.
Michael Liebman
CC BY-SA 4.0
2018-06-07T17:03:34.603Z
Do you just want to remove a sound or the corresponding part of the video as well?
Gyan
CC BY-SA 4.0
2018-06-07T17:35:37.537Z
In this case, the audio would do, but in other cases, also the video.
coolmap
<video><premiere><video-editor><adobe>
Is there any way to avoid losing a generation of quality when re-exporting an .mp4 after making changes to it?
coolmap
# Is there any way to avoid losing a generation of quality when re-exporting an .mp4 after making changes to it?

(Asked by: username_0 on 2018-06-07)

I have previously made an .mp4 video file in Adobe Premiere Pro. I don't have any of the original files (or the project file) still. I've now noticed a very small mistake that really bothers me, but if I were to import the .mp4 file into Premiere, cut out the split-second mistake (it's an unwanted sound that I for some reason didn't catch when I made it) and then re-export/encode it, it would "lose a generation" of picture (and sound?) quality.

This is unacceptable to me.

I want to export the exact same video minus the split-second mistake. Zero changes in video/audio quality. Note that I cannot export it losslessly, because then it's no longer an .mp4 and will take a HUGE amount of storage space.

Is there really no way to accomplish this? It's so annoying that I will have to suffer serious loss of quality unless I keep all the lossless source files around forever for everything. It's just not practical, and I frankly see no reason why it couldn't allow us to do this.

**Tags:** video, premiere, video-editor, adobe

> **Comments:**
> **username_1**: Nope, no way for that to happen. This isn't just a feature feature that wasn't included in Premiere, it is an inherent property of the math of lossy codecs. FWIW, most professionals don't usually keep losslessly encoded source files. However, they do usually keep lossy encoded source files, either using the original acquisition codec or an intermediate company standard format called a mezzanine format.  
> **username_0**: But... Since "the math" for the algorithms has already been performed once, couldn't it "reconstruct" all the parts except the small part that I want to remove, and then "splice" them together again, without actually re-encoding?  
> **username_1**: No. H.264 is a lossy codec, which, as the name implies, losses information in the encode process. You can "reconstruct" a close approximation of the original, but you will always lose quality because you are starting from less information than you originally had. That will always introduce artifacts because of the additional generation. A lossless codec, on the other hand, does exactly what you are describing. Math that saves all the information to make the file smaller on encode and the opposite math to get back the exact original on the decode.  
> **username_2**: Do you just want to remove a sound or the corresponding part of the video as well?  
> **username_0**: In this case, the audio would do, but in other cases, also the video.  

---

## 1 answers

### Answer by username_3 on 2018-06-08. Score: 2 | Accepted answer

@user2248 is on the money. The only software I know of that can do this sort of thing is ffmpeg. I'll expand on his answer:

Import mymovie.mp4 into Premiere Pro, or audition or whatever.
Do your sound edit, and export just the audio to myfixedaudio.wav (or .aiff). 
Now comes the scary command line stuff:

ffmpeg -i mymovie.mp4 -i myfixedaudio.wav -c:v copy -map 0:v -map 1:a myfixedmp4.mp4

Wow, a whole line of typing, that's going to take forever. Seriously, it might seem that it's mysterious and difficult, but it's actually less work than doing it with the GUI. let's break down that command so you can see what it's doing:

-i mymovie.mp4 -i myfixedaudio.wav import the movie, and the audio. FFMPEG numbers from 0, so mymovie.mp4 is source 0 and myfixedaudio.wav is source 1
-c:v copy set the codec for video to copy, aka completely lossless copy of the original encoded video, copied bit for bit. We don't need to set the codec for audio because it sets the appropriate audio codec for mp4 by default (aac).
-map 0:v -map 1:a map the video from the first source and the audio from the second source to the first and second streams of the output. I.e. the output now has an identical video stream to the original movie, and a re-encoded audio stream from the fixed version in the wav file.
myfixedmp4.mp4 ffmpeg uses the first thing it sees as a filename without a -option in front of it as the output.
if you wanted to preserve more audio quality, you could muck around with the audio settings, you'd do that before the output name.

Compare that to what you'd do in Premiere:

import the movie and the audio
create a new timeline
add the just video to the timeline by deactivating the audio and then dragging the video into the timeline, or by selecting the original audio track from the movie and deleting it
add the new audio
export the movie, after adjusting the export settings

Same same, only you do it with a lot more clicking and dragging and keystrokes. Not to mention that it can't actually do what ffmpeg can.
This will not preserve your audio losslessly, but nothing will. It will however avoid a generation loss with your video, and it is the only way I know of that will.

> **Comments:**
> **username_0**: Thanks. I used your method for this, and then verified that the video is identical to the last pixel afterwards. So it worked. However, it really bothers me that the audio couldn't be identical as well for all the non-cut parts. Also, when I was done, I compared all three versions' audio track and noticed heavy differences in both volume and when they start. Very unexpected. And frustrating. No idea why it changes where it starts. Also, I tried to upvote your solution, but this site wouldn't let me because it's a POS.  

---

