I'm trying to cut some commercials in some h264 avi files. Sometimes the P frames aren't exactly at the beginning of the commercial part, so I cut and reencode the surrounding part (using avidemux). This way I limit the quality loss to this part.
Then I rejoin the avi files using mencoder. The resulting video looks fine, at least up to mplayer SVN-r29796-4.4.3.
But with mplayer SVN-r30554-4.4.3, the reencoded parts of the video play with a different aspect ratio than the rest (not reencoded), i.e. mplayer changes the aspect ratio during the playback.
Since I don't want to reencode all my files, I'm searching for a method to get rid of the aspect ratios stored in the files.
doesnt help, even if I split the avi, apply this command to each segment and rejoin it.Code:mencoder -ovc copy -oac copy -force-avi-aspect 16:9 -o outfile infile
The funny thing is that i can set the correct aspect ratio for each single segment. But after joining them, their "original" / wrong aspect ratios come back.
Is somebody familiar with this behaviour?
+ Reply to Thread
Results 1 to 8 of 8
-
-
i think you can change aspect ratio after with MPEG4 Modifier
have you tried removing the force-avi-aspect 16:9 from the script and let mencoder do that on its own, i think it detects aspect ratio, fps, resolution without the user specifying it.
try another player that doesnt use mplayer, mpc-hc or vlcI love it when a plan comes together! -
Thanks for your reply!
i think you can change aspect ratio after with MPEG4 Modifier
By the way: if I put the merged video in a mkv the same change of aspect ratio occurs (even if I first put all parts in different mkv with correct aspect ratio and then merge them).
have you tried removing the force-avi-aspect 16:9 from the script and let mencoder do that on its own, i think it detects aspect ratio, fps, resolution without the user specifying it.
vlc doesn't change the aspect ratio. It plays the video in 4:3 if I leave it as an avi, but it plays it in 16:9 if I put it in a mkv container. -
-
another solution would be to convert the commercials to DV and then use virtualdub to edit/join at will without reconverting.
Code:ffmpeg -i video.mkv -target pal-dv video.dv
2- cut edit each video from folder DV with virtualdub and save it again (without reconverting it) to folder EDITED
3- join all dv files from folder EDITED with virtualdub and save it (no recompression) to Folder FINAL
4- convert the video from the FINAL folder to avi with virtual dubLast edited by ricardouk; 28th Aug 2010 at 13:36.
I love it when a plan comes together! -
OK, but with my file or with one segment, I get "This is not a valid MPEG-4 video (startcode not found at beginning of frame). Codec: H264."
-
ah i thought you were converting to avi (xvid+mp3) i don't normally associate avi with h264...
try to convert them to dv (minimal quality loss) and then edit/join with virtualdub and then convert the final dv to your favourite format, with the DV format you can cut and join without worrying about special keyframes.I love it when a plan comes together!
Similar Threads
-
MPlayer aspect ratio
By nic3 in forum Software PlayingReplies: 4Last Post: 10th Jan 2011, 12:13 -
Mplayer pipe output to Mencoder possible ?
By neapandele in forum Video ConversionReplies: 1Last Post: 28th Oct 2009, 02:43 -
MPLAYER pipe to MENCODER possible?
By neapandele in forum Newbie / General discussionsReplies: 0Last Post: 27th Oct 2009, 05:56 -
Having to reload mpeg2enc/mencoder/mplayer each start
By SeveralButchersApron in forum ffmpegX general discussionReplies: 5Last Post: 31st Aug 2008, 10:41 -
mencoder and mplayer packages
By mattr in forum ffmpegX general discussionReplies: 1Last Post: 30th Dec 2007, 08:05