Hi
I am trying to combine a video and audio stream from youtube with ffmpeg on a linux (kubuntu) box. I run the command
"ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -vcodec copy -acodec copy darktablefinal.mp4"
but all I get is a small file that only has the audio. Have tried it with the 720 video stream and same result. Terminal output is listed below.
rob-carly@rob-carly-P5KR:~/Downloads$ ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -vcodec copy -acodec copy darktablefinal.mp4
ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:53:28 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '_mediumDarktable_Equalizer_module':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-02-14 14:36:55
Duration: 00:32:34.19, start: 977.095692, bitrate: 63 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
Metadata:
creation_time : 2014-02-14 14:36:55
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Darktable_Equalizer_module_hd1080.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-02-14 14:37:39
Duration: 00:32:34.00, start: 977.001000, bitrate: 759 kb/s
Stream #1.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
Metadata:
creation_time : 2014-02-14 14:37:39
Output #0, mp4, to 'darktablefinal.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-02-14 14:36:55
encoder : Lavf53.21.1
Stream #0.0(und): Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 25 tbn, 25 tbc
Metadata:
creation_time : 2014-02-14 14:37:39
Stream #0.1(und): Audio: libvo_aacenc, 44100 Hz, stereo
Metadata:
creation_time : 2014-02-14 14:36:55
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press ctrl-c to stop encoding
frame= 0 fps= 0 q=-1.0 Lsize= 15309kB time=977.10 bitrate= 128.4kbits/s
video:0kB audio:14980kB global headers:0kB muxing overhead 2.199408%
Anyone have any ideas? Am I missing a library or something?
Cheers
+ Reply to Thread
Results 1 to 24 of 24
-
-
tried this command (I presume that is the right way to use '-map 0:1' and '-map 1:0' ?)
ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -vcodec copy -acodec copy -map 0:1-map 1:0 darktablefinal.mp4
and it gave the error
"Unable to find a suitable output format for '1:0'"
Video file is as downloaded, nothing has been changed with it. -
there need to be a space, also I would rearrange the parameters
Code:ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -map 0:1 -map 1:0 -vcodec copy -acodec copy darktablefinal.mp4
Video file is as downloaded, nothing has been changed with it. -
Yep, realised the need for a space as soon as I commented haha
Using the above command I get the error
"Could not find input stream #0.1" -
try:
Code:ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -map 0:0 -map 1:0 -vcodec copy -acodec copy darktablefinal.mp4
Last edited by Selur; 25th Feb 2014 at 04:34.
-
Not sure if that was the whole command you posted? It gives the error "Missing argument for option 'vcode'"
-
thanks - now I get the error "Codec type mismatch for mapping #0.0 -> #0.0".
Full terminal output is as follows -
rob-carly@rob-carly-P5KR:~/Downloads$ ffmpeg -i _mediumDarktable_Equalizer_module -i Darktable_Equalizer_module_hd1080.mp4 -map 0:0 -map 1:0 -vcodec copy -acodec copy darktablefinal.mp4
ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:53:28 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '_mediumDarktable_Equalizer_module':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-02-14 14:36:55
Duration: 00:32:34.19, start: 977.095692, bitrate: 63 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
Metadata:
creation_time : 2014-02-14 14:36:55
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Darktable_Equalizer_module_hd1080.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-02-14 14:37:39
Duration: 00:32:34.00, start: 977.001000, bitrate: 759 kb/s
Stream #1.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
Metadata:
creation_time : 2014-02-14 14:37:39
File 'darktablefinal.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'darktablefinal.mp4':
Stream #0.0: Video: [0][0][0][0] / 0x0000, q=2-31, 200 kb/s, 90k tbn
Stream #0.1: Audio: [0][0][0][0] / 0x0000, 0 channels, 200 kb/s
Codec type mismatch for mapping #0.0 -> #0.0 -
Changing the command so the video file is first
"ffmpeg -i Darktable_Equalizer_module_hd1080.mp4 -i _mediumDarktable_Equalizer_module -map 0:0 -map 1:0 -vcodec copy -acodec copy darktablefinal.mp4"
doesn't throw an error but it doesn't create a file with any video either, just an audio file.
Full terminal output:
rob-carly@rob-carly-P5KR:~/Downloads$ ffmpeg -i Darktable_Equalizer_module_hd1080.mp4 -i _mediumDarktable_Equalizer_module -map 0:0 -map 1:0 -vcodec copy -acodec copy darktablefinal.mp4
ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:53:28 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Darktable_Equalizer_module_hd1080.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-02-14 14:37:39
Duration: 00:32:34.00, start: 977.001000, bitrate: 759 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
Metadata:
creation_time : 2014-02-14 14:37:39
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '_mediumDarktable_Equalizer_module':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2014-02-14 14:36:55
Duration: 00:32:34.19, start: 977.095692, bitrate: 63 kb/s
Stream #1.0(und): Audio: aac, 44100 Hz, stereo, s16
Metadata:
creation_time : 2014-02-14 14:36:55
File 'darktablefinal.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'darktablefinal.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-02-14 14:37:39
encoder : Lavf53.21.1
Stream #0.0(und): Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 25 tbn, 25 tbc
Metadata:
creation_time : 2014-02-14 14:37:39
Stream #0.1(und): Audio: libvo_aacenc, 44100 Hz, stereo
Metadata:
creation_time : 2014-02-14 14:36:55
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press ctrl-c to stop encoding
frame= 0 fps= 0 q=-1.0 Lsize= 15309kB time=977.10 bitrate= 128.4kbits/s s/s
video:0kB audio:14980kB global headers:0kB muxing overhead 2.199408% -
as a side note:
since audio&video length differ by 20 seconds you output will be asynchronous.
Why did you download audio and video separately?
---
Strange, just tried:
Code:ffmpeg -i test.264 -i test.aac -vcodec copy -acodec copy -map 0:0 -map 1:0 "test.mp4"
and according to your the ffmpeg output you posted both audio&video get copied.
Have you tried playback with ffplay?
What doesCode:ffmpeg -i darktablefinal.mp4
---
btw. to make your posts more readable: use code- and/or quote-tags -
as far as I can tell, youtube 1080 clips are seperate video and audio clips now - would be very happy to proved wrong on this as it means I wouldn't have to try and mux them! (clip is at https://www.youtube.com/watch?v=zzVXK4eAM5E&list=PLmvlUro_Up1NBX7VK8UUuyWo1B468zEA0&index=16)
Have only tried playback with VLC - the output file is very small as well - 15 meg when the original video file is 177 meg.
runningCode:ffmpeg -i darktablefinal.mp4
rob-carly@rob-carly-P5KR:~/Downloads$ ffmpeg -i darktablefinal.mp4
ffmpeg version 0.8.10-6:0.8.10-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:53:28 with gcc 4.8.1
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'darktablefinal.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2014-02-14 14:37:39
encoder : Lavf53.21.1
Duration: 00:16:17.09, start: 0.000000, bitrate: 128 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 125 kb/s
Metadata:
creation_time : 2014-02-14 14:37:39
At least one output file must be specified -
as far as I can tell, youtube 1080 clips are seperate video and audio clips now - would be very happy to proved wrong on this as it means I wouldn't have to try and mux them
Code:General Complete name : Darktable_ Equalizer module.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 128 MiB Duration : 16mn 17s Overall bit rate mode : Variable Overall bit rate : 1 096 Kbps Encoded date : UTC 2014-02-14 14:39:33 Tagged date : UTC 2014-02-14 14:39:33 gsst : 0 gstd : 977095 gssd : B4A7D0DA5MH1393327177241907 gshh : r19---sn-4g57lnlz.googlevideo.com Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : Yes Format settings, ReFrames : 1 frame Format settings, GOP : M=1, N=60 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 16mn 17s Bit rate : 902 Kbps Maximum bit rate : 4 526 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.039 Stream size : 105 MiB (82%) Tagged date : UTC 2014-02-14 14:39:42 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 16mn 17s Bit rate mode : Variable Bit rate : 192 Kbps Maximum bit rate : 202 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz Compression mode : Lossy Stream size : 22.4 MiB (18%) Title : IsoMedia File Produced by Google, 5-11-2011 Encoded date : UTC 2014-02-14 14:39:38 Tagged date : UTC 2014-02-14 14:39:42
----
Also as a general note:
Do not use ffmpeg for mp4 (or mkv) multiplexing use MP4Box or L-SMASH (or mkvmerge in case of mkv files) for multiplexing.
Only use ffmpeg for multiplexing (mp4/mkv files) if:
a. you only use something that is libav based for playback
b. you can't avoid it since you are doing a live capture (in that case if possible, the output should be remuxed with NMP4Box/..)
Cu SelurLast edited by Selur; 25th Feb 2014 at 05:28.
-
Yes, I think that is the 720p version not the 1080p version.
YouTube uses Dynamic Adaptive Streaming over HTTP (DASH) for delivering videos and along with that, it serves the audio and video in two separate streams for some resolutions/formats. For instance, resolutions like 1080p and 480p are available only with separate audio and video streams. (from http://www.webupd8.org/2014/02/video-downloader-youtube-dl-gets.html) -
Code:
mp4box -add "path to video" -add "path to output" -new "path to output.mp4"
-
Code:
mp4box -add Darktable_Equalizer_module_hd1080.mp4 -add _mediumDarktable_Equalizer_module -new darktable.mp4
mp4box: command not found -
Actually, think I will stick with the 720p clip - thanks for all your help Selur
-
BINGO!! Yup - that was it (not sure why I didn't check that, it's late at night here in Australia)
Files combined ok using the following command.
Code:MP4Box -add Darktable_Equalizer_module_hd1080.mp4 -add _mediumDarktable_Equalizer_module.aac -new darktable.mp4
-
Hello,
Im new to all this so here goes:
Im using ffmpeg to convert mkv to mp4 for personal use. Im trying to take my son favorite movies for use on his dlna player. The dlna server is an Iomega personal Cloud running Twonky 7.2.6-2. The player is a LG BP620c latest update applied. The player can't pause, fast forward, rewind mp4. The ones I have got from friends created with mp4box I think, do. The ones I create not at all but they do play. Here is my batch file
chcp 1252
"C:\Temp\x264\ffmpeg.exe" -i "D:\MKV\%.mkv" -vcodec libx264 -acodec libvo_aacenc -map 0:0 -map 0:1 -map_metadata 0 -metadata mime-type="video/mp4" -r:a 48000 -b:a 192k -b:a 192k -ac 2 -af volume=3.00000 -coder 1 -threads 0 -q:v 1 -b:v 1600k -minrate:v 1M -maxrate:v 25M -bufsize:v 30M -r:v 23.976 -x264opts rc_lookahead=50 -vf crop=iw-0-0:ih-40-40:0:40,scale=720:400 -s 720:400 -aspect 16:9 -pix_fmt yuv420p -level 41 -refs 6 -deblock -2:-2 -partitions all -me_method hex -me_range 32 -subq 7 -trellis 2 -b-pyramid 0 -b_strategy 2 -chromaoffset -4 -qmin 10 -qmax 51 -nal-hrd vbr -f mp4 -movflags +faststart -an -c: s copy -passlogfile "C:\Temp\%.log" -pass 1 -y "NUL.mp4"
"C:\Temp\x264\ffmpeg.exe" -y -i "D:\MKV\%.mkv" -vcodec libx264 -acodec libvo_aacenc -map 0:0 -map 0:1 -map_metadata 0 -metadata mime-type="video/mp4" -r:a 48000 -b:a 192k -b:a 192k -ac 2 -af volume=3.00000 -coder 1 -threads 0 -q:v 1 -b:v 1600k -minrate:v 1M -maxrate:v 25M -bufsize:v 30M -r:v 23.976 -x264opts rc_lookahead=50 -vf crop=iw-0-0:ih-40-40:0:40,scale=720:400 -s 720:400 -aspect 16:9 -pix_fmt yuv420p -level 41 -refs 6 -deblock -2:-2 -partitions all -me_method hex -me_range 32 -subq 7 -trellis 2 -b-pyramid 0 -b_strategy 2 -chromaoffset -4 -qmin 10 -qmax 51 -nal-hrd vbr -f mp4 -movflags +faststart -c: s copy -passlogfile "C:\Temp\%.log" -pass 2 "C:\Temp\%.mp4"
"C:\Temp\x264\playsound.exe" C:\Temp\x264\Done.mp3
pause
Can you see a reason for my issue or a better was to improve the script?Last edited by PATTERSON108; 2nd Mar 2014 at 18:00.
Similar Threads
-
how can i mux to mp4 from h264/aac using ffmpeg
By DKhanh in forum Video ConversionReplies: 3Last Post: 24th Aug 2013, 11:50 -
Batch Mux with ffmpeg
By hbelouf in forum Video ConversionReplies: 1Last Post: 3rd Jul 2012, 07:38 -
How to mux .264 and .wav files to .m2ts or .mp4 using FFmpeg????
By rallymax in forum EditingReplies: 1Last Post: 31st Oct 2011, 17:04 -
AVI-Mux GUI problem
By toni-boy in forum DVD & Blu-ray PlayersReplies: 8Last Post: 23rd Oct 2010, 12:37 -
ffmpeg mux problem with 2 pcm audiotracks
By thunder25 in forum Video ConversionReplies: 1Last Post: 15th Jun 2010, 08:41