I've got many MP4 movies encoded with Handbrake with h.264 and MP3 codecs, so they should be error-free.
But I converted them including the ad blocks, and now I want to remove them.
I recently switched from Handbrake to VirtualDub + Avisynth to compress my new movies (cutting ads with the preview screen + conversion to AVI h.264+MP3), but VirtualDub doesn't save with the MP4 container, so I need something else (with a similar GUI) to cut the ads away from the older MP4 movies encoded by Handbrake.
## 1a ##
I tried Avidemux and it works quite well, but not with the "MP4 Muxer" (the conversion stops after a couple of minutes). I need to use the "MP4v2 Muxer": what's the difference between them? Is there any compatibility issue?
## 1b ##
Is there any other freeware to try? (also combination of them, like VirtualDub + Avisynth, if it's not difficult)
## 2 ##
Is there a simple way to change the container format of my new movies, the ones in the AVI container but still h.264+MP3, to the MP4 container? I tried "ffmpeg input.avi -c copy output.mp4" and the result seems ok, except for the conversion log:
And for the conversion of a one minute long movie I got almost 15 errors of that kind ("pts has no value").[mp4 @ 03f731a0] st:0 PTS: 25334 DTS: 25334 < 28735 invalid, clipping
[mp4 @ 03f731a0] st:0 PTS: 27001 DTS: 27001 < 28736 invalid, clipping
[mp4 @ 03f731a0] st:0 PTS: 28115 DTS: 28115 < 28737 invalid, clipping
[mp4 @ 03f731a0] pts has no value
Last message repeated 102 times
pts has no value0.0 q=-1.0 size= 147kB time=00:00:05.00 bitrate= 239.7kbits/s
[mp4 @ 03f731a0] pts has no value
Last message repeated 137 times
pts has no value242 q=-1.0 size= 355kB time=00:00:10.51 bitrate= 276.2kbits/s
[mp4 @ 03f731a0] pts has no value
Last message repeated 64 times
pts has no value205 q=-1.0 size= 456kB time=00:00:13.11 bitrate= 285.0kbits/s
[mp4 @ 03f731a0] pts has no value
Last message repeated 60 times
pts has no value183 q=-1.0 size= 566kB time=00:00:15.64 bitrate= 296.5kbits/s
[...]
Is it a real problem? And if so, is there a different method to change a container?
Thanks a lot![]()
+ Reply to Thread
Results 1 to 6 of 6
-
Falco2000, video newbie.
Let's everyone help each other. -
I think there's software designed to remove and detect ads, but I can't recommend any. I also think MeGUI would be a better choice for x264 encoding than VirtualDub.
If you open a file to be encoded from the File/Open menu, MeGUI will step you through the process of indexing the video and extracting the audio, then creating an AVISynth script for encoding. If you want to cut sections of the video you'd probably create a single script to encode the whole lot, save it, then use MeGUI's script cutter (under the Tools menu) to do the editing. It lets you add multiple cuts to a script by specifying the start and end frames using a preview window. The "cuts" are actually the parts you want to encode. It can also save a corresponding "cuts file" to use for re-encoding the audio (or alternatively MeGUI can cut most audio without re-encoding it). Of course you can still create a script manually or modify MeGUI's script before encoding if need be. The script creator also has the ability to save script templates which is quite handy.
Once that's done you select/configure the video/audio encoders in the main window, add the encoding jobs to the job queue and run them. You can use either an MKV or MP4 container for h264 video, and you can add the audio and video encoding jobs separately or use the AutoEncode button, which gets MeGUI to mux them as a single MP4/MKV when it's done. It also allows you to add the original audio without re-encoding it etc (although you'd need to manually cut it first).
MeGUI is probably the most versatile AVISynth based encoder GUI, which also means it can take a bit of getting used to, but it's worth it, and as you're already familiar with much of the encoding process that should make it a lot easier.
MeGUI has an MP4 muxer under the Tools menu which will use AVI video as the source, but I think you need to extract the audio in order to add it too. Or try YAMB for remuxing AVIs. It can be a bit hit and miss. Sometimes it won't remux an AVI as an MP4 without an error, but extracting the audio first and adding it that way often works better.
Do you really need MP4? Unless you do, MKV is so much easier to work with. MKVMergeGUI also tends to be a lot faster than using YAMB/MP4Box and you can generally just open a file with it and remux it as an MKV without having to extract streams to get it to work.Last edited by hello_hello; 15th Feb 2013 at 07:15.
-
Thank you, I was removing them manually anyway...
Thank you very much for your long explanation, I'll give MeGUI a second try since I installed it some time ago but I couldn't manage to make it workFalco2000, video newbie.
Let's everyone help each other. -
No problem.... I'm pretty familiar with it so if you get stuck I'll help out if I can. If you haven't done so before, change to the development update server in MeGUI's options and restart it and let it update itself. That way you might experience a new bug once in a while, but you also get any new fun stuff. The version on the development server is updated very regularly (often the same day if a bug is found) but you can change back to the stable update server if need be and MeGUI should roll itself back to the stable version.
I'd also start by opening the AVS Script Creator from the Tools menu and you'll see a "config" button next to the AVISynth profile dropdown box. If you use it to open the configuration, that's where you set up AVISynth script templates. I mention it though, because there's a couple of options which are kind of hidden away in there, such as the setting which tells MeGUI it's allowed to resize a video "up" and whether to resize to mod16/8/4/2 by default. You don't need to change/save anything, it's just to let you know where some of those options are.
In case it's not obvious the script templates and the configuration for each encoder have what's called a "scratchpad". If you use an encoder or script preset but want to change the configuration without saving the change as a new preset or without altering an existing one, selecting "ok" after making the change will cause MeGUI to offer to save the changes for you. Telling it "no" will copy the preset, along with the changes you made, to the "scratchpad". -
There is a good write up at http://frapsforum.com/threads/virtualdub-save-direct-to-mp4-fraps-to-youtube-with-exte...encoders.2446/ that allows VirtualDub to save directly to MP4 format via External Encoders. I've used it with version 1.10.2 and it worked fine although I was using AAC as my audio format but the setup should be similar for the MP3 format.
-
I'd wish to thank each of you for the help you gave me.
I've been able to put myself "at work" again only now, after some weeks.
Here's the continuation of my attempts, if you should be interested in:
https://forum.videohelp.com/threads/353776-MP2-audio-cutting-problem-in-MeGUI-%280-bytes-rejoin%29
Falco2000, video newbie.
Let's everyone help each other.
Similar Threads
-
Sync issue when changing ts to mkv container using txmuxer
By mt123 in forum Newbie / General discussionsReplies: 3Last Post: 18th Dec 2012, 11:34 -
Changing Container Problems
By zack28 in forum Video ConversionReplies: 1Last Post: 22nd Oct 2012, 10:20 -
need to put content of FLV container into MP4 container
By arraboy in forum Newbie / General discussionsReplies: 3Last Post: 29th Jun 2012, 19:52 -
Changing Container from MOV to MP4 in bulk?
By anonymous99 in forum Video ConversionReplies: 13Last Post: 28th May 2012, 09:24 -
Changing mp4 container to avi
By 24fps in forum Video ConversionReplies: 3Last Post: 27th Jun 2010, 07:24