Hot answers tagged

41

First run ffmpeg -i file.mp4 to see which streams exists in your file. You should see something like this: Stream #0.0: Video: mpeg4, yuv420p, 720x304 [PAR 1:1 DAR 45:19], 23.98 tbr, 23.98 tbn, 23.98 tbc Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s Stream #0.2: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s Then run ffmpeg -i file.mp4 -map 0:0 -map 0:2 ...


39

Related issue—removing all audio tracks from an mp4 file can be done thus: ffmpeg -i input_file.mp4 -vcodec copy -an output_file.mp4


26

$ ffmpeg -i source-file.foo -ss 0 -t 600 first-10-min.m4v $ ffmpeg -i source-file.foo -ss 600 -t 600 second-10-min.m4v $ ffmpeg -i source-file.foo -ss 1200 -t 600 third-10-min.m4v ... Wrapping this up into a script to do it in a loop wouldn't be hard. Beware that if you try to calculate the number of iterations based on the duration output from an ffprobe ...


17

Yes, it is possible. But not all formats support it. ffmpeg FAQ: A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to join video files by merely concatenating them. When converting to RAW formats you also have a high chance that the files can be concatenated. ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg ffmpeg -i input2.avi -qscale:v 1 ...


6

There are different ways of rating video edition software, and depending on which attribute (features ? user-friendliness?) you want to focus on, the answer to your question will be different. Assuming you mean "Which Open Source video edition software is the most complete (it terms of features)", then the answer is probably Cinelerra. To get an idea of ...


6

You can use PiTiVi. PiTiVi will let you to flexibly adjust the volume of parallel audio tracks (among many other typical tasks: splice, rejoin, add a new soundtrack, fade the soundtrack in and out, fade the image in and out, etc). On top of doing what you need (unless I understood it wrong) it is quite easy to use and comes with most linux distros. ...


6

There is a pretty extensive number of applications which you could use to do this. Avidemux Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Openshot Video Editing program OpenShots Features include: * ...


5

You probably want to use -acodec copy to copy the original audio, instead of -an: ffmpeg -i infile.mp4 -vf "transpose=1" -acodec copy -vcodec mpeg4 outfile.mp4


5

If you're looking for opensource professional level software unfortunately currently there is nothing like that. We're all waiting for lightworks gnu/linux port. It'll be opensource. They announced about public beta 3 months ago, but still nothing was published. Hope it'll be available soon. However, there are some a little bit amateur level software: ...


5

there are two kinds of media files streamable non-streamable the main difference is how the two file-formats embed meta-information. with non-streamable formats, the meta-informationc ("header") is stored at a specific position in the file, usually at the beginning, sometimes at the end. you cannot simply concatenate such files, as the meta-information ...


5

There are two possibilities presented here, using. (1) AviSynth (2) convert (imagemagick) EDIT: Both scripts have now been condensed and modified to play only a single frame for the duration of however many seconds are specified. mplayer can handle very low FPS (eg. 0.008547009 and 0.003154574 FPS worked fine, ie. 117 and 317 seconds playing time). ...


4

The Matroska (mkv) container format supports text-based subtitles embedded as a separate stream into the file. You could use mkvmerge to remux the file to .mkv and include the subtitles in the output, which you can enable/disable when playing the video. Note that this method will NOT re-encode the video or audio, it's just putting the same data into a ...


4

Maybe because you're encoding is going to take hours after you leave and you don't really want to keep the computer running when you're not using it to save power.


4

Cinelerra is the only tool I'm aware of that can do this in Linux. There is a tutorial on just this topic.


4

I found the answer. It turns out I was having problems because I didn't have the proper FFmpeg installed, but a fork of ffmpeg. This code works for me: ffmpeg -i fff.avi -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 -an fff%d.avi fff.avi is the name of the source clip. Change -segment_time 10 to the general duration you ...


3

Here is a solution using yad, bash only (no php), with one dialog: #!/bin/bash eval $(yad --width=400 --form --field=input:FL --field=start --field=end --field=output:SFL "" "00:00:00" "00:00:00" "" | awk -F'|' '{printf "INPUT=\"%s\"\nSTART=%s\nEND=%s\nOUTPUT=\"%s\"\n", $1, $2, $3, $4}') [[ -z $INPUT || -z $START || -z $END || -z $OUTPUT ]] && ...


3

I would recommend doing as you said, extract the audio, use Audacity or something similar to "cuff" the audio, then use kdenlive or a similar video editor to re-add the audio. Their are multiple methods for censoring words in Audacity. - First, the method you specified, you can simply reverse the audio. - You can select the audio, mute it with Generate > ...


3

Not sure about kdenlive, but when using Cinelerra the max file size was only limited by the file system (ie. ext3 upper limit). I would be surprised if you hit any limit, but that is depending on how you split up your clips. http://www.kdenlive.org/forum/working-many-gb-data-one-project has a bit more info, but I think your RAM is going to have more effect ...


3

Not very quicktime-like, but this is what I do: You can use avconv (Or ffmpeg, with a slightly different syntax than the one below), first open the file in any player, take the time at the start point, then the time at the end point, and then in a terminal: avconv -ss 0:01:00 -i source.mp4 -codec:a copy -codec:v copy -t 00:02:00 a.mp4 For ffmpeg, it has ...


3

You could try avidemux which handles only one audio file internally (and therefore forces you to select one specific track). I've never tried it with .mp4 but it works with other formats.


3

http://www.linuxalt.com/ shows Linux equivalents for Windows software; that might help


2

Kdenlive I've only had a little experience with this, but I rarely need to edit video. It crashed a few times when I used it about a year ago, but maybe it was just me or it's improved. It's fairly easy to use as well. The screenshots on the site show it in KDE, but I don't think it depends on KDE. I could be wrong though.


2

In a package called gpac, there is a CLI utility called MP4Box Here is an example of what worked for me.. MP4Box -add ~/file.noaudio.mp4 \ -add ~/file.mp3 \ -add ~/file.srt \ ~/file.MP4Box.mp4 I used a video-only and audio-only, but it will surely(?) work with a normal audio+video "movie" .... It's very late so I'll ...


2

Identify stream numbers: $ ffmpeg -i in.mp4 ... Stream #0:0: Video: ... Stream #0:1: Audio: ... Stream #0:2: Audio: ... Use -map _file_:_stream_ to select which streams to process and output $ ffmpeg -i in.mp4 -map 0:0 -map 0:2 -vcodec copy -acodec copy out.mp4 see: https://ffmpeg.org/ffmpeg.html#Advanced-options


2

Be sure to check out MLT and it's videostab2 filter.


2

Faced the same problem earlier and put together a simple Python script to do just that (using FFMpeg). Available here: https://github.com/c0decracker/video-splitter, and pasted below: #!/usr/bin/env python import subprocess import re import math from optparse import OptionParser length_regexp = 'Duration: (\d{2}):(\d{2}):(\d{2})\.\d+,' re_length = ...


2

mencoder can definitely do it, although the folks I know tend to use one of the free Windows apps (so I'm guessing you could run one of them under Wine) Also bmovl should be able to do it. Check out this thread.


2

I think stopmotion is the technique you are looking for. After a short search I found this application, maybe this might help you. But I guess there are several other similar tools around.


2

You can use mencoder (in your distribution, it should come in the package mplayer). If you wanted to extract 3 minutes starting at 21:50, you would do mencoder -ss 21:50 -endpos 3:00 your-video.mp4 -o output.mp4 -oac copy -ovc copy It's not exact: the starting point will be adjusted to the beginning of a frame. It's possible to work around this, if it's a ...


2

No, it is not possible, because every video file has a header. To merge videos you need to use a tool (like for example ffmpeg or mencoder).



Only top voted, non community-wiki answers of a minimum length are eligible